about summary refs log tree commit diff stats
path: root/test/test_all.py
diff options
context:
space:
mode:
authorajax <devnull@localhost>2014-09-30 10:35:02 +0200
committerajax <devnull@localhost>2014-09-30 10:35:02 +0200
commit9ab363a5a34f35ce9d9f31d93ae28a09b7f10195 (patch)
treeee1134cb4d4e192a32160d2ed6f2ca2849a2fd6d /test/test_all.py
parentaba9a01a0efabb1666966a46a2943b33418ee98f (diff)
downloadmiasm-9ab363a5a34f35ce9d9f31d93ae28a09b7f10195.tar.gz
miasm-9ab363a5a34f35ce9d9f31d93ae28a09b7f10195.zip
TestAll: Assert on test successes
Diffstat (limited to 'test/test_all.py')
-rw-r--r--test/test_all.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/test/test_all.py b/test/test_all.py
index a4cb1063..ad551827 100644
--- a/test/test_all.py
+++ b/test/test_all.py
@@ -330,6 +330,7 @@ def run_test(test, coveragerc=None):
         write_colored("ERROR", "red", len(s))
         print outputs[1]
 
+    return testpy.returncode
 
 def run_test_parallel(test, current, global_state):
 
@@ -438,10 +439,14 @@ if llvm is False:
 
 if multiproc is False:
     done = list()
+    status = 0
     for test in test_iter(done):
-        run_test(test, coveragerc=coveragerc)
+        status |= run_test(test, coveragerc=coveragerc)
         done.append(test)
 
+    # Return an error code if a test failed
+    assert(status == 0)
+
 else:
     # Parallel version
     cpu_c = cpu_count()