]> rtime.felk.cvut.cz Git - omk.git/blobdiff - tests/tester.py
Use wvtool for testing instead of wvtestrun
[omk.git] / tests / tester.py
index 6e47730811e2e47b1013f57748ea5e4da2ee868b..0cf21b8541bb5e49253f4a926ff1a10bb26ebd75 100755 (executable)
@@ -293,7 +293,7 @@ class TestCase:
 
     def run(self):
         self.results = TestCaseResult(self)
-        print "Testing %s:\n" % self.name,
+        print "Testing \"%s\" in %s:\n" % (self.name, self.executable),
         os.chdir(os.path.join(testsRoot, self.directory))
         # Chose how to run the test - currently there is only one option
 #         if os.path.exists("Makefile.test"):
@@ -356,15 +356,22 @@ class TestCase:
     
     def _doRun(self, log):
         "Runs the teset in current directory."
-        print "    ",os.environ['OMK_RULES'],
-        sys.stdout.flush()
+        print "    ",os.environ['OMK_RULES'],
+        sys.stdout.flush()
         ret = self._exec(log)
-        if log.canttest: retstr = "--"
-        elif ret == 0: retstr = "OK"
+#         if log.canttest: retstr = "--"
+#         elif ret == 0: retstr = "ok"
+#         else:
+#             retstr = "FAILED"
+#             self.failed = True
+#         print "%*s%s" % (20-len(os.environ['OMK_RULES']), "", retstr)
+        if log.canttest: retstr = "[not tested] ok"
+        elif ret == 0: retstr = "ok"
         else:
             retstr = "FAILED"
             self.failed = True
-        print "%*s%s" % (20-len(os.environ['OMK_RULES']), "", retstr)
+        print "! %s (%s) %s" % (self.name, os.environ['OMK_RULES'], retstr)
+        sys.stdout.flush()
 
 
 results = Results()