Updated Verifuzz.py tool-info module
#
# SPDX-License-Identifier: Apache-2.0
-import benchexec.util as util
import benchexec.tools.template
import benchexec.result as result
-class Tool(benchexec.tools.template.BaseTool):
+class Tool(benchexec.tools.template.BaseTool2):
"""
VeriFuzz
"""
@@ -27,8 +26,8 @@ class Tool(benchexec.tools.template.BaseTool):
"jars",
]
- def executable(self):
- return util.find_executable("scripts/verifuzz.py")
+ def executable(self, tool_locator):
+ return tool_locator.find_executable("verifuzz", subdir="scripts")
def version(self, executable):
return self._version_from_tool(executable, use_stderr=True)
@@ -41,34 +40,33 @@ class Tool(benchexec.tools.template.BaseTool):
def name(self):
return "VeriFuzz"
- def cmdline(self, executable, options, tasks, propertyfile, rlimits):
- if propertyfile:
- options = options + ["--propertyFile", propertyfile]
- return [executable] + options + tasks
+ def cmdline(self, executable, options, task, rlimits):
+ if task.property_file:
+ options = options + ["--propertyFile", task.property_file]
+ return [executable] + options + [task.single_input_file]
- def determine_result(self, returncode, returnsignal, output, isTimeout):
- lines = " ".join(output)
- if "COVER(error-call)" in lines:
+ def determine_result(self, run):
+ for line in run.output:
+ if "COVER(error-call)" in line:
return result.RESULT_DONE
- elif "COVER(branches)" in lines:
+ elif "COVER(branches)" in line:
return result.RESULT_DONE
- elif "VERIFUZZ_VERIFICATION_SUCCESSFUL" in lines:
+ elif "VERIFUZZ_VERIFICATION_SUCCESSFUL" in line:
return result.RESULT_TRUE_PROP
- elif "VERIFUZZ_VERIFICATION_FAILED" in lines:
+ elif "VERIFUZZ_VERIFICATION_FAILED" in line:
return result.RESULT_FALSE_REACH
- elif "FALSE(unreach-call)" in lines:
+ elif "FALSE(unreach-call)" in line:
return result.RESULT_FALSE_REACH
- elif "FALSE(no-overflow)" in lines:
+ elif "FALSE(no-overflow)" in line:
return result.RESULT_FALSE_OVERFLOW
- elif "FALSE(termination)" in lines:
+ elif "FALSE(termination)" in line:
return result.RESULT_FALSE_TERMINATION
- elif "FALSE(valid-deref)" in lines:
+ elif "FALSE(valid-deref)" in line:
return result.RESULT_FALSE_DEREF
- elif "FALSE(valid-free)" in lines:
+ elif "FALSE(valid-free)" in line:
return result.RESULT_FALSE_FREE
- elif "FALSE(valid-memtrack)" in lines:
+ elif "FALSE(valid-memtrack)" in line:
return result.RESULT_FALSE_MEMTRACK
- elif "NOT SUPPORTED" in lines or "VERIFUZZ_UNKNOWN" in lines:
+ elif "NOT SUPPORTED" in line or "VERIFUZZ_UNKNOWN" in line:
return result.RESULT_UNKNOWN
- else:
return result.RESULT_ERROR
