Skip to content

Commit

Permalink
Merge pull request #982 from sosy-lab/witness-linter
Browse files Browse the repository at this point in the history
Refactor witness output interpretation
  • Loading branch information
PhilippWendler authored Dec 11, 2023
2 parents dd42180 + bfae39a commit 19a85ac
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions benchexec/tools/witnesslint.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,13 @@ def determine_result(self, run):
witness_version_match = self.get_value_from_output(
run.output, "Witness Version-Match"
)
if (
len(run.output) == 0
or "witnesslint finished" not in run.output[-1]
or exit_code == 7
):

if not run.output:
return result.RESULT_ERROR + " (no output)"
elif exit_code == 7 or any(line.startswith("Traceback") for line in run.output):
return "EXCEPTION"
elif "witnesslint finished" not in run.output[-1]:
return result.RESULT_ERROR + " (linter did not finish)"
elif exit_code == 1:
return result.RESULT_ERROR + " (invalid witness syntax)"
elif exit_code == 5:
Expand All @@ -62,5 +63,4 @@ def determine_result(self, run):
elif exit_code == 0:
return result.RESULT_DONE

else:
return result.UNKNOWN
return result.RESULT_ERROR + " (could not determine output)"

0 comments on commit 19a85ac

Please sign in to comment.