split into three tasks, check OneOf, add fast prime test, try multiple workers
This commit is contained in:
+6
-2
@@ -17,8 +17,12 @@ install:
|
|||||||
- python setup.py install
|
- python setup.py install
|
||||||
- cd ..
|
- cd ..
|
||||||
env:
|
env:
|
||||||
- TASK=ANGR_BASIC DEEPSTATE_CMD=deepstate-angr
|
- TASK=PRIMES DEEPSTATE_CMD=deepstate-angr
|
||||||
- TASK=MANTICORE_BASIC DEEPSTATE_CMD=deepstate-manticore
|
- TASK=PRIMES DEEPSTATE_CMD=deepstate-manticore
|
||||||
|
- TASK=ONEOF DEEPSTATE_CMD=deepstate-angr
|
||||||
|
- TASK=ONEOF DEEPSTATE_CMD=deepstate-manticore
|
||||||
|
- TASK=ARITHMETIC DEEPSTATE_CMD=deepstate-angr
|
||||||
|
- TASK=ARITHMETIC DEEPSTATE_CMD=deepstate-manticore
|
||||||
script:
|
script:
|
||||||
- pyflakes bin/deepstate/*.py
|
- pyflakes bin/deepstate/*.py
|
||||||
- pyflakes tests/*.py
|
- pyflakes tests/*.py
|
||||||
|
|||||||
@@ -10,11 +10,32 @@ class TestBasicFunctionality(TestCase):
|
|||||||
if deepstate is None:
|
if deepstate is None:
|
||||||
deepstate = "deepstate-angr" # default to angr in an environment without a defined command
|
deepstate = "deepstate-angr" # default to angr in an environment without a defined command
|
||||||
|
|
||||||
(r, output) = logrun.logrun([deepstate, "build/examples/IntegerArithmetic"],
|
if os.getenv("TASK") is None or os.getenv("TASK") == "PRIMES":
|
||||||
"deepstate.out", 1800)
|
(r, output) = logrun.logrun([deepstate, "build/examples/Primes"],
|
||||||
self.assertEqual(r, 0)
|
"deepstate.out", 1800)
|
||||||
|
|
||||||
self.assertTrue("Passed: Arithmetic_AdditionIsCommutative" in output)
|
self.assertEqual(r, 0)
|
||||||
self.assertTrue("Passed: Arithmetic_AdditionIsAssociative" in output)
|
|
||||||
self.assertTrue("Passed: Arithmetic_InvertibleMultiplication_CanFail" in output)
|
self.assertTrue("Failed: PrimePolynomial_OnlyGeneratesPrimes" in output)
|
||||||
self.assertTrue("Failed: Arithmetic_InvertibleMultiplication_CanFail" in output)
|
self.assertTrue("Failed: PrimePolynomial_OnlyGeneratesPrimes_NoStreaming" in output)
|
||||||
|
|
||||||
|
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") == "ONEOF":
|
||||||
|
(r, output) = logrun.logrun([deepstate, "build/examples/OneOf"],
|
||||||
|
"deepstate.out", 1800)
|
||||||
|
|
||||||
|
self.assertEqual(r, 0)
|
||||||
|
|
||||||
|
self.assertTrue("Failed: OneOfExample_ProduceSixtyOrHigher" in output)
|
||||||
|
self.assertTrue("Passed: OneOfExample_ProduceSixtyOrHigher" 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)
|
||||||
|
|
||||||
|
self.assertTrue("Failed: Arithmetic_InvertibleMultiplication_CanFail" in output)
|
||||||
|
self.assertTrue("Passed: Arithmetic_AdditionIsCommutative" in output)
|
||||||
|
self.assertTrue("Passed: Arithmetic_AdditionIsAssociative" in output)
|
||||||
|
self.assertTrue("Passed: Arithmetic_InvertibleMultiplication_CanFail" in output)
|
||||||
|
|||||||
Reference in New Issue
Block a user