INNER CODE UNIT · Python
check
stp/stp · scripts/fuzz/fuzz_test.py:256
def check(self, fname, fnameSolution=None, needSolve=True, needToLimitTime=False):
currTime = time.time()
# Do we need to solve the problem, or is it already solved?
if needSolve:
consoleOutput = self.execute(fname, needToLimitTime)
else:
if not os.path.isfile(fnameSolution):
print("ERROR! Solution file '%s' is not a file!" % fnameSolution)
exit(-1)
f = open(fnameSolution, "r")
consoleOutput = f.read()
f.close()
print("Read solution from file ", fnameSolution)
# if time was limited, we need to know if we were over the time limit
# and that is why there is no solution
if needToLimitTime: