diff --git a/benchexec/tools/cpachecker.py b/benchexec/tools/cpachecker.py index 86d4309fd..f998c4ad8 100644 --- a/benchexec/tools/cpachecker.py +++ b/benchexec/tools/cpachecker.py @@ -188,9 +188,11 @@ def option_present(option): task.input_files_or_empty, ) ) - assert ( - len(possible_witness_files) == 1 - ), f"Expected exactly one witness file, but found {len(possible_witness_files)}: {possible_witness_files}" + if len(possible_witness_files) != 1: + raise benchexec.tools.template.UnsupportedFeatureException( + f"Expected exactly one witness file, but found {len(possible_witness_files)}: {possible_witness_files}" + ) + options += [f"{prefix}witness", possible_witness_files[0]] else: raise benchexec.tools.template.UnsupportedFeatureException(