How to use the benchexec.util function in BenchExec

To help you get started, we’ve selected a few BenchExec examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github sosy-lab / benchexec / benchexec / filehierarchylimit.py View on Github external
def _check_limit(self, files_count, files_size):
        if self._files_count_limit and files_count > self._files_count_limit:
            reason = "files-count"
        elif self._files_size_limit and files_size > self._files_size_limit:
            reason = "files-size"
        else:
            return None
        self._callback(reason)
        logging.debug(
            "Killing process %d due to %s limit (%d files with %d bytes).",
            self._pid_to_kill,
            reason,
            files_count,
            files_size,
        )
        util.kill_process(self._pid_to_kill)
        return reason
github sosy-lab / benchexec / benchexec / tools / gacal.py View on Github external
def executable(self):
        return util.find_executable("run-gacal.py")
github sosy-lab / benchexec / benchexec / outputhandler.py View on Github external
# store values of each run
        for run in runSet.runs:
            lines.append(run.resultline)

        lines.append(runSet.simpleLine)

        # write endline into txt_file
        if finished:
            endline = "Run set {0}".format(runSet.index)

            # format time, type is changed from float to string!
            cputime_str = (
                "None"
                if cputime is None
                else util.format_number(cputime, TIME_PRECISION)
            )
            walltime_str = (
                "None"
                if walltime is None
                else util.format_number(walltime, TIME_PRECISION)
            )
            lines.append(
                self.create_output_line(
                    runSet, endline, "done", cputime_str, walltime_str, "-", []
                )
            )

        return "\n".join(lines) + "\n"
github sosy-lab / benchexec / benchexec / tools / legion.py View on Github external
def executable(self):
        return util.find_executable("legion-sv")
github sosy-lab / cpachecker / BenchExec / benchexec / tools / threader.py View on Github external
def executable(self):
        return util.find_executable('threader.sh')
github sosy-lab / benchexec / benchexec / tools / aprove.py View on Github external
def executable(self):
        return util.find_executable("AProVE.sh")
github staticafi / symbiotic / lib / symbioticpy / symbiotic / targets / nidhugg.py View on Github external
def executable(self):
        """
        Find the path to the executable file that will get executed.
        This method always needs to be overridden,
        and most implementations will look similar to this one.
        The path returned should be relative to the current directory.
        """
        return util.find_executable('nidhugg')
github sosy-lab / benchexec / benchexec / tools / threader.py View on Github external
def executable(self):
        return util.find_executable("threader.sh")
github sosy-lab / cpachecker / BenchExec / benchexec / tools / acsar.py View on Github external
def _prepareSourcefile(self, sourcefile):
        content = open(sourcefile, "r").read()
        content = content.replace(
            "ERROR;", "ERROR_LOCATION;").replace(
            "ERROR:", "ERROR_LOCATION:").replace(
            "errorFn();", "goto ERROR_LOCATION; ERROR_LOCATION:;")
        newFilename = sourcefile + "_acsar.c"
        util.write_file(newFilename, content)
        return newFilename