Fix some bugs in metaval discovered via testing
import argparse
import benchexec.util as util
import benchexec.tools.template
-from benchexec.tools.template import BaseTool2
+import os
import re
import threading
+from benchexec.tools.template import BaseTool2
+
class Tool(benchexec.tools.template.BaseTool2):
"""
@@ -46,10 +48,10 @@ class Tool(benchexec.tools.template.BaseTool2):
def name(self):
return "metaval"
- def determine_result(self, returncode, returnsignal, output, isTimeout):
+ def determine_result(self, run):
verifierDir = None
regex = re.compile("verifier used in MetaVal is (.*)")
- for line in output[:20]:
+ for line in run.output[:20]:
match = regex.match(line)
if match is not None:
verifierDir = match.group(1)
@@ -66,7 +68,7 @@ class Tool(benchexec.tools.template.BaseTool2):
assert isinstance(
tool, BaseTool2
), "we expect that all wrapped tools extend BaseTool2"
- return tool.determine_result(returncode, returnsignal, output, isTimeout)
+ return tool.determine_result(run)
def cmdline(self, executable, options, task, rlimits):
parser = argparse.ArgumentParser(add_help=False, usage=argparse.SUPPRESS)
@@ -101,7 +103,7 @@ class Tool(benchexec.tools.template.BaseTool2):
BaseTool2.ToolLocator(tool_directory=self.TOOL_TO_PATH_MAP[verifierName])
)
wrappedtask = BaseTool2.Task(
- input_files=["../output/ARG.c"],
+ input_files=["output/ARG.c"],
identifier=task.identifier,
property_file=task.property_file,
options=task.options,
@@ -123,7 +125,7 @@ class Tool(benchexec.tools.template.BaseTool2):
]
+ additionalPathArgument
+ witnessTypeArgument
- + list(task.single_input_file)
+ + [task.single_input_file]
+ ["--"]
+ wrappedOptions
)
