keep alive long silent tests, add integer overflow
This commit is contained in:
parent
8713846044
commit
96fc87f781
@ -33,6 +33,8 @@ env:
|
||||
- TASK=STREAMINGANDFORMATTING DEEPSTATE_CMD=deepstate-manticore
|
||||
- TASK=ONEOF DEEPSTATE_CMD=deepstate-angr
|
||||
- TASK=ONEOF DEEPSTATE_CMD=deepstate-manticore
|
||||
- TASK=OVERFLOW DEEPSTATE_CMD=deepstate-angr
|
||||
- TASK=OVERFLOW DEEPSTATE_CMD=deepstate-manticore
|
||||
- TASK=ARITHMETIC DEEPSTATE_CMD=deepstate-angr
|
||||
- TASK=ARITHMETIC DEEPSTATE_CMD=deepstate-manticore
|
||||
script:
|
||||
|
||||
@ -12,13 +12,18 @@ def logrun(cmd, file, timeout):
|
||||
p = subprocess.Popen(cmd, stdout=outf, stderr=outf)
|
||||
start = time.time()
|
||||
oldContents = ""
|
||||
lastOutput = time.time()
|
||||
while (p.poll() is None) and ((time.time() - start) < timeout):
|
||||
if (time.time() - lastOutput) > 300:
|
||||
sys.stderr.write("\n\n** FIVE MINUTE KEEPALIVE FROM TEST LOGGING **\n\n")
|
||||
sys.stderr.flush()
|
||||
with open(file, 'r') as inf:
|
||||
contents = inf.read()
|
||||
if len(contents) > len(oldContents):
|
||||
sys.stderr.write(contents[len(oldContents):])
|
||||
sys.stderr.flush()
|
||||
oldContents = contents
|
||||
lastOutput = time.time()
|
||||
time.sleep(0.05)
|
||||
totalTime = time.time() - start
|
||||
sys.stderr.write("\n")
|
||||
|
||||
@ -108,6 +108,16 @@ class TestBasicFunctionality(TestCase):
|
||||
self.assertTrue("Failed: OneOfExample_ProduceSixtyOrHigher" in output)
|
||||
self.assertTrue("Passed: OneOfExample_ProduceSixtyOrHigher" in output)
|
||||
|
||||
if os.getenv("TASK") is None or os.getenv("TASK") == "OVERFLOW":
|
||||
(r, output) = logrun.logrun([deepstate, "build/examples/IntegerOverflow"],
|
||||
"deepstate.out", 1800)
|
||||
self.assertEqual(r, 0)
|
||||
|
||||
self.assertTrue("Failed: SignedInteger_AdditionOverflow" in output)
|
||||
self.assertTrue("Passed: SignedInteger_AdditionOverflow" in output)
|
||||
self.assertTrue("Failed: SignedInteger_MultiplicationOverflow" in output)
|
||||
self.assertTrue("Passed: SignedInteger_MultiplicationOverflow" in output)
|
||||
|
||||
if os.getenv("TASK") is None or os.getenv("TASK") == "ARITHMETIC":
|
||||
(r, output) = logrun.logrun([deepstate, "build/examples/IntegerArithmetic", "--num_workers", "4"],
|
||||
"deepstate.out", 1800)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user