diff options
author | José Fonseca <[email protected]> | 2009-03-31 16:39:11 +0100 |
---|---|---|
committer | José Fonseca <[email protected]> | 2009-03-31 16:39:11 +0100 |
commit | bdfc411b449b3eafec8fb803fba42fce58a49c32 (patch) | |
tree | 0cddcaeffc9cf06eda882fb456dc9da815b264fa /src/gallium | |
parent | 10b808156bff157d401b5b999a215d16715a1018 (diff) |
python/test: Flush stdout to keep in sync with debug info on stderr.
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/state_trackers/python/tests/base.py | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/gallium/state_trackers/python/tests/base.py b/src/gallium/state_trackers/python/tests/base.py index b338f44a252..401095fa908 100644 --- a/src/gallium/state_trackers/python/tests/base.py +++ b/src/gallium/state_trackers/python/tests/base.py @@ -237,21 +237,25 @@ class TestResult: self.rows = [] def test_start(self, test): - print "Running %s..." % test.description() + sys.stdout.write("Running %s...\n" % test.description()) + sys.stdout.flush() self.tests += 1 def test_passed(self, test): - print "PASS" + sys.stdout.write("PASS\n") + sys.stdout.flush() self.passed += 1 self.log_result(test, 'pass') def test_skipped(self, test): - print "SKIP" + sys.stdout.write("SKIP\n") + sys.stdout.flush() self.skipped += 1 #self.log_result(test, 'skip') def test_failed(self, test): - print "FAIL" + sys.stdout.write("FAIL\n") + sys.stdout.flush() self.failed += 1 self.log_result(test, 'fail') @@ -282,7 +286,8 @@ class TestResult: self.rows.append(row) def summary(self): - print "%u tests, %u passed, %u skipped, %u failed" % (self.tests, self.passed, self.skipped, self.failed) + sys.stdout.write("%u tests, %u passed, %u skipped, %u failed\n\n" % (self.tests, self.passed, self.skipped, self.failed)) + sys.stdout.flush() name, ext = os.path.splitext(os.path.basename(sys.argv[0])) filename = name + '.tsv' |