-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Have benchexec installed with the following tools (if you want, the tool fragments can be in a separate folder here, and then we can pass them to the benchexec Dockerfile at build time (still need clarity on this).
For the following executable types:
- xfta
- xfta2
- scram
For example:
import benchexec.result as result
import benchexec.tools.template
class Tool(benchexec.tools.template.BaseTool2):
def executable(self, tool_locator):
return tool_locator.find_executable("xfta")
def name(self):
return "xfta"
def version(self, executable):
return self._version_from_tool(executable)
def cmdline(self, executable, options, task, rlimits):
cmd = [executable] + options
if task.property_file:
cmd.append(task.property_file)
return cmd + list(task.input_files)
def determine_result(self, run):
status = result.RESULT_ERROR
if run.output.any_line_contains("== ERROR"):
status = result.RESULT_FALSE_PROP
elif run.output.any_line_contains("== OK"):
status = result.RESULT_TRUE_PROP
elif run.output.any_line_contains("== DONT-KNOW"):
status = result.RESULT_UNKNOWN
return status
arjun@Arjuns-MacBookPro-7 tools % cat scram.py
import benchexec.result as result
import benchexec.tools.template
class Tool(benchexec.tools.template.BaseTool2):
def executable(self, tool_locator):
return tool_locator.find_executable("scram")
def name(self):
return "SCRAM"
def version(self, executable):
return self._version_from_tool(executable)
def cmdline(self, executable, options, task, rlimits):
cmd = [executable] + options
if task.property_file:
cmd.append(task.property_file)
return cmd + list(task.input_files)
def determine_result(self, run):
status = result.RESULT_ERROR
if run.output.any_line_contains("results"):
status = result.RESULT_DONE
if run.output.any_line_contains("warning"):
status = result.RESULT_UNKNOWN
return status
arjun@Arjuns-MacBookPro-7 tools % cat saphsolve.py
import benchexec.result as result
import benchexec.tools.template
class Tool(benchexec.tools.template.BaseTool2):
def executable(self, tool_locator):
return tool_locator.find_executable("saphsolve")
def name(self):
return "SaphSolve"
def version(self, executable):
return self._version_from_tool(executable)
def cmdline(self, executable, options, task, rlimits):
cmd = [executable]
if task.property_file:
cmd.append(task.property_file)
options = list(filter(None, options))
cmd = cmd + list(task.input_files) + options
return cmd
def determine_result(self, run):
status = result.RESULT_UNKNOWN
return status
Metadata
Metadata
Assignees
Labels
No labels