Skip to content

Commit

Permalink
Update concurrentwitness2test.py from feedback on PR
Browse files Browse the repository at this point in the history
  • Loading branch information
leventeBajczi authored Nov 2, 2023
1 parent 6e596d9 commit 902e7db
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions benchexec/tools/concurrentwitness2test.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@


class Tool(benchexec.tools.template.BaseTool2):
"""
Tool info for ConcurrentWitness2Test: A violation witness validator for concurrent programs
URL: https://github.com/ftsrg/ConcurrentWitness2Test
"""

def executable(self, tool_locator):
return tool_locator.find_executable("start.sh")

Expand All @@ -22,21 +27,20 @@ def cmdline(self, executable, options, task, rlimits):
return [executable, task.single_input_file] + options

def determine_result(self, run):
status = result.RESULT_UNKNOWN
for line in run.output:
if "Verdict: SOMETIMES" in line or "Verdict: ALWAYS" in line:
status = result.RESULT_FALSE_REACH
return result.RESULT_FALSE_REACH
elif "Verdict: NEVER" in line:
status = result.RESULT_TRUE_PROP
return result.RESULT_TRUE_PROP
elif "Verdict: TIMEOUT" in line:
status = result.RESULT_TIMEOUT + "(inner)"
return result.RESULT_TIMEOUT + "(inner)"
elif "Verdict: Unknown error" in line:
status = result.RESULT_ERROR
return result.RESULT_ERROR
elif "Verdict: Incompatible witness" in line:
status = result.RESULT_ERROR + "(Incompatible witness)"
return result.RESULT_ERROR + "(Incompatible witness)"
elif "Verdict: Parsing failed" in line:
status = result.RESULT_ERROR + "(Parsing failed)"
return result.RESULT_ERROR + "(Parsing failed)"
elif "Verdict: Compilation error" in line:
status = result.RESULT_ERROR + "(Compilation error)"
return result.RESULT_ERROR + "(Compilation error)"

return status
return result.RESULT_UNKNOWN

0 comments on commit 902e7db

Please sign in to comment.