summaryrefslogtreecommitdiff
path: root/regtest
diff options
context:
space:
mode:
authorCarlos Garcia Campos <carlosgc@gnome.org>2012-10-21 17:48:57 +0200
committerCarlos Garcia Campos <carlosgc@gnome.org>2012-10-21 17:50:42 +0200
commit74d6217ba164fdfe263b4edac8047b60506e39a6 (patch)
tree216092c8c52bc10df53fa7c920c0b09c0277b8ab /regtest
parent4e9b8d2cca44241a501bb8095b3980d17fcda6c5 (diff)
regstest: Add print_test_result_ln() and use it for failed test results
To make sure they are always shown.
Diffstat (limited to 'regtest')
-rw-r--r--regtest/Printer.py3
-rw-r--r--regtest/TestRun.py10
2 files changed, 8 insertions, 5 deletions
diff --git a/regtest/Printer.py b/regtest/Printer.py
index 1aafe02c..008f46bf 100644
--- a/regtest/Printer.py
+++ b/regtest/Printer.py
@@ -80,6 +80,9 @@ class Printer:
def print_test_result(self, msg):
self.printout_update(msg)
+ def print_test_result_ln(self, msg):
+ self.printout_update(self._ensure_new_line(msg))
+
def print_default(self, msg):
if self._verbose:
self.printout_ln(msg)
diff --git a/regtest/TestRun.py b/regtest/TestRun.py
index 24afa2fd..f4e50519 100644
--- a/regtest/TestRun.py
+++ b/regtest/TestRun.py
@@ -74,14 +74,14 @@ class TestRun:
self.printer.print_test_result("PASS")
self._n_passed += 1
else:
- print("FAIL")
+ self.printer.print_test_result_ln("FAIL")
self._failed.append("%s (%s)" % (doc_path, backend.get_name()))
return
elif test_has_md5:
if ref_is_crashed:
- self.printer.print_test_result("DOES NOT CRASH")
+ self.printer.print_test_result_ln("DOES NOT CRASH")
elif ref_is_failed:
- self.printer.print_test_result("DOES NOT FAIL")
+ self.printer.print_test_result_ln("DOES NOT FAIL")
return
test_is_crashed = backend.is_crashed(test_path)
@@ -98,12 +98,12 @@ class TestRun:
return
if test_is_crashed:
- self.printer.print_test_result("CRASH")
+ self.printer.print_test_result_ln("CRASH")
self._crashed.append("%s (%s)" % (doc_path, backend.get_name()))
return
if test_is_failed:
- self.printer.print_test_result("FAIL (status error %d)" % (test_is_failed))
+ self.printer.print_test_result_ln("FAIL (status error %d)" % (test_is_failed))
self._failed_status_error("%s (%s)" % (doc_path, backend.get_name()))
return