Check results for pass/fail on properties, split into angr and manticore tests
This commit is contained in:
@@ -5,11 +5,14 @@ python:
|
||||
- "2.7"
|
||||
install:
|
||||
- sudo apt-get update
|
||||
- sudo apt-get install build-essential gcc-multilib cmake python python-setuptools libffi-dev z3
|
||||
- sudo apt-get install build-essential gcc-multilib cmake python python-setuptools libffi-dev
|
||||
- mkdir build
|
||||
- cd build
|
||||
- cmake ..
|
||||
- make
|
||||
- python setup.py install
|
||||
env:
|
||||
- TASK=ANGR DEEPSTATE_CMD=deepstate-angr
|
||||
- TASK=MANTICORE DEEPSTATE_CMD=deepstate-manticore
|
||||
script:
|
||||
- deepstate-manticore examples/IntegerArithmetic
|
||||
- nosetests --verbose
|
||||
|
||||
22
tests/test_basic_functionality.py
Normal file
22
tests/test_basic_functionality.py
Normal file
@@ -0,0 +1,22 @@
|
||||
from __future__ import print_function
|
||||
import os
|
||||
import subprocess
|
||||
import glob
|
||||
from unittest import TestCase
|
||||
|
||||
|
||||
class TestBasicFunctionality(TestCase):
|
||||
def test_basic_functionality(self):
|
||||
deepstate = os.getenv("DEEPSTATE_CMD")
|
||||
|
||||
with open("deepstate.out", 'w') as outf:
|
||||
r = subprocess.call([deepstate, "examples/IntegerArithmetic"], stdout = outf, stderr = outf)
|
||||
self.assertEqual(r, 0)
|
||||
|
||||
with open("deepstate.out", 'r') as outf:
|
||||
result = outf.read()
|
||||
|
||||
self.assertTrue("Passed: Arithmetic_AdditionIsCommutative" in result)
|
||||
self.assertTrue("Passed: Arithmetic_AdditionIsAssociative" in result)
|
||||
self.assertTrue("Passed: Arithmetic_InvertibleMultiplication_CanFail" in result)
|
||||
self.assertTrue("Failed: Arithmetic_InvertibleMultiplication_CanFail" in result)
|
||||
Reference in New Issue
Block a user