fix iteration over command
This commit is contained in:
@@ -23,6 +23,8 @@ env:
|
||||
- TASK=KLEE DEEPSTATE_CMD=deepstate-manticore
|
||||
- TASK=PRIMES DEEPSTATE_CMD=deepstate-angr
|
||||
- TASK=PRIMES DEEPSTATE_CMD=deepstate-manticore
|
||||
- TASK=TAKEOVER DEEPSTATE_CMD=deepstate-angr
|
||||
- TASK=TAKEOVER DEEPSTATE_CMD=deepstate-manticore
|
||||
- TASK=LISTS DEEPSTATE_CMD=deepstate-angr
|
||||
- TASK=LISTS DEEPSTATE_CMD=deepstate-manticore
|
||||
- TASK=ONEOF DEEPSTATE_CMD=deepstate-angr
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@ import sys
|
||||
def logrun(cmd, file, timeout):
|
||||
sys.stderr.write("=" * 80 + "\n")
|
||||
sys.stderr.write("RUNNING: ")
|
||||
sys.stderr.write(" ".join(cmd) + "\n")
|
||||
sys.stderr.write(str(cmd) + "\n")
|
||||
sys.stderr.flush()
|
||||
with open(file, 'w') as outf:
|
||||
p = subprocess.Popen(cmd, stdout=outf, stderr=outf)
|
||||
|
||||
@@ -11,6 +11,8 @@ class TestBasicFunctionality(TestCase):
|
||||
else:
|
||||
deepstates = ["deepstate-angr", "deepstate-manticore"]
|
||||
|
||||
print("RUNNING WITH DEEPSTATE COMMANDS:", deepstates)
|
||||
|
||||
for deepstate in deepstates:
|
||||
if os.getenv("TASK") is None or os.getenv("TASK") == "CRASH":
|
||||
(r, output) = logrun.logrun([deepstate, "build/examples/Crash"],
|
||||
@@ -43,7 +45,22 @@ class TestBasicFunctionality(TestCase):
|
||||
|
||||
self.assertTrue("Passed: PrimePolynomial_OnlyGeneratesPrimes" in output)
|
||||
self.assertTrue("Passed: PrimePolynomial_OnlyGeneratesPrimes_NoStreaming" in output)
|
||||
|
||||
if os.getenv("TASK") is None or os.getenv("TASK") == "TAKEOVER":
|
||||
(r, output) = logrun.logrun([deepstate, "build/examples/TakeOver", "--take_over"],
|
||||
"deepstate.out", 1800)
|
||||
self.assertEqual(r, 0)
|
||||
|
||||
self.assertTrue("hi" in output)
|
||||
self.assertTrue("bye" in output)
|
||||
self.assertTrue("was not greater than" in output)
|
||||
|
||||
foundPassSave = False
|
||||
for line in output.split("\n"):
|
||||
if ("Saving input to" in line) and (".pass" in line):
|
||||
foundPassSave = True
|
||||
self.assertTrue(foundPassSave)
|
||||
|
||||
if os.getenv("TASK") is None or os.getenv("TASK") == "LISTS":
|
||||
(r, output) = logrun.logrun([deepstate, "build/examples/Lists"],
|
||||
"deepstate.out", 1800)
|
||||
|
||||
Reference in New Issue
Block a user