]> rtime.felk.cvut.cz Git - omk.git/blobdiff - tests/tester.py
Fixed parallel_make test to test only serialized targets
[omk.git] / tests / tester.py
index 25b04de1d72c1777498b0f9e046f0c6f41b8d921..bd849692eaceabd63e50911a3632ff90fb56398b 100755 (executable)
@@ -324,11 +324,13 @@ class TestCase:
         log.exitcode = ret
         log.stdout = output
         log.message = ''
-        if ret != 0:
-            if os.path.exists("_canttest"):
-                log.message = file("_canttest").read()
-                log.canttest = 1
-            elif os.path.exists("_error"):
+        if os.path.exists("_canttest"):
+            log.message = file("_canttest").read()
+            log.canttest = 1
+            ret = 2                     # If Makefile sets canttest, override the exit code which might be zero
+            log.exitcode = ret
+        elif ret != 0:
+            if os.path.exists("_error"):
                 log.message = file("_error").read()
         return ret
 
@@ -342,8 +344,8 @@ class TestCase:
         print "    ",os.environ['OMK_RULES'],
         sys.stdout.flush()
         ret = self._exec(log)
-        if ret == 0: retstr = "OK"
-        elif log.canttest: retstr = "--"
+        if log.canttest: retstr = "--"
+        elif ret == 0: retstr = "OK"
         else: retstr = "FAILED"
         print "%*s%s" % (20-len(os.environ['OMK_RULES']), "", retstr)