Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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
def executable(self):
return util.find_executable("run-gacal.py")
# 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"
def executable(self):
return util.find_executable("legion-sv")
def executable(self):
return util.find_executable('threader.sh')
def executable(self):
return util.find_executable("AProVE.sh")
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')
def executable(self):
return util.find_executable("threader.sh")
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