Parse infer-sv output and return correct results
import benchexec.tools.template
from collections.abc import Mapping
+import benchexec.result as result
class Tool(benchexec.tools.template.BaseTool2):
@@ -23,7 +24,7 @@ class Tool(benchexec.tools.template.BaseTool2):
return tool_locator.find_executable(Tool._SCRIPT_NAME)
def version(self, executable):
- return self._version_from_tool(executable, line_prefix="infer version ")
+ return self._version_from_tool(executable)
def name(self):
return Tool._TOOL_NAME
@@ -37,4 +38,9 @@ class Tool(benchexec.tools.template.BaseTool2):
return cmd
def determine_result(self, run):
- return run.output[-1].split(":", maxsplit=2)[-1]
+ run_result = run.output[-1].split(":", maxsplit=2)[-1]
+ if run_result == "true":
+ return result.RESULT_TRUE_PROP
+ if run_result == "false":
+ return result.RESULT_FALSE_PROP
+ return result.RESULT_UNKNOWN
