Skip to content

Commit

Permalink
Make TestCov info module understand "ERROR" verdict (#476)
Browse files Browse the repository at this point in the history
And be more strict about the patterns for other verdicts.
  • Loading branch information
lembergerth authored and dbeyer committed Nov 1, 2019
1 parent a05a7ad commit 284dcc8
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions benchexec/tools/testcov.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,16 @@ def determine_result(self, returncode, returnsignal, output, isTimeout):
return "TIMEOUT"
else:
return "ERROR ({0})".format(returncode)
elif line.startswith("Result:") and "FALSE" in line:
elif line.startswith("Result: FALSE"):
return result.RESULT_FALSE_REACH
elif line.startswith("Result:") and "TRUE" in line:
elif line.startswith("Result: TRUE"):
return result.RESULT_TRUE_PROP
elif line.startswith("Result") and "DONE" in line:
elif line.startswith("Result: DONE"):
return result.RESULT_DONE
elif line.startswith("Result: ERROR"):
# matches ERROR and ERROR followed by some reason in parantheses
# e.g., "ERROR (TRUE)" or "ERROR(TRUE)"
return re.search("ERROR(\s*\(.*\))?", line).group(0)
return result.RESULT_UNKNOWN

def get_value_from_output(self, lines, identifier):
Expand Down

0 comments on commit 284dcc8

Please sign in to comment.