Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added new tool-info-module for "cetfuzz" #951

Closed
wants to merge 2 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions benchexec/tools/cetfuzz.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# This file is part of BenchExec, a framework for reliable benchmarking:
# https://github.com/sosy-lab/benchexec
#
# SPDX-FileCopyrightText: 2007-2020 Dirk Beyer <https://www.sosy-lab.org>
#
# SPDX-License-Identifier: Apache-2.0

from benchexec.tools.sv_benchmarks_util import get_data_model_from_task, ILP32, LP64
import benchexec.tools.template
import benchexec.result as result


class Tool(benchexec.tools.template.BaseTool2):
"""
cetfuzz
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add at least a URL here and ideally a description of the tool.

"""

def executable(self, tool_locator):

return tool_locator.find_executable("runTool.py", subdir=".")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

subdir="." is redundant.


def version(self, executable):
return self._version_from_tool(executable, use_stderr=True)

def program_files(self, executable):
return self._program_files_from_executable(
executable, self.REQUIRED_PATHS, parent_dir=True
)
Comment on lines +25 to +28
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are you overwriting this? Unless REQUIRED_PATHS is set it will not do anything.


def name(self):
return "cetfuzz"

def cmdline(self, executable, options, task, rlimits):
if task.property_file:
options = options + ["--propertyFile", task.property_file]

data_model_param = get_data_model_from_task(
task, {ILP32: "32", LP64: "64"})
if data_model_param and "--bit" not in options:
options += ["--bit", data_model_param]

return [executable] + options + [task.single_input_file]

def determine_result(self, run):
for line in run.output:
if "TEST_SUIT_CREATED" in line:
return result.RESULT_DONE
elif "NOT_SUPPORTED" in line or "CETFUZZ_UNKNOWN" in line:
return result.RESULT_UNKNOWN
return result.RESULT_ERROR
Loading