diff options
author | Guido van Rossum <guido@python.org> | 2002-09-13 21:28:03 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2002-09-13 21:28:03 (GMT) |
commit | 3cda93ebf60e501350f42fdab72c18eab54718fc (patch) | |
tree | 3624b7d58160d140f3f76db072fe5c02045d5bbd /Lib/test/regrtest.py | |
parent | bcf9f9eb3bde3cdac05402d27277d8c40839e4fe (diff) | |
download | cpython-3cda93ebf60e501350f42fdab72c18eab54718fc.zip cpython-3cda93ebf60e501350f42fdab72c18eab54718fc.tar.gz cpython-3cda93ebf60e501350f42fdab72c18eab54718fc.tar.bz2 |
Add a bunch of sys.stdout.flush() calls that will hopefully improve
the usability of the output of the Xenofarm builds.
Diffstat (limited to 'Lib/test/regrtest.py')
-rwxr-xr-x | Lib/test/regrtest.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/test/regrtest.py b/Lib/test/regrtest.py index 5b3ba7f..c174083 100755 --- a/Lib/test/regrtest.py +++ b/Lib/test/regrtest.py @@ -220,6 +220,7 @@ def main(tests=None, testdir=None, verbose=0, quiet=0, generate=0, for test in tests: if not quiet: print test + sys.stdout.flush() ok = runtest(test, generate, verbose, quiet, testdir) if ok > 0: good.append(test) @@ -364,17 +365,21 @@ def runtest(test, generate, verbose, quiet, testdir = None): except (ImportError, test_support.TestSkipped), msg: if not quiet: print "test", test, "skipped --", msg + sys.stdout.flush() return -1 except KeyboardInterrupt: raise except test_support.TestFailed, msg: print "test", test, "failed --", msg + sys.stdout.flush() return 0 except: type, value = sys.exc_info()[:2] print "test", test, "crashed --", str(type) + ":", value + sys.stdout.flush() if verbose: traceback.print_exc(file=sys.stdout) + sys.stdout.flush() return 0 else: if not cfp: @@ -404,7 +409,9 @@ def runtest(test, generate, verbose, quiet, testdir = None): if output == expected: return 1 print "test", test, "produced unexpected output:" + sys.stdout.flush() reportdiff(expected, output) + sys.stdout.flush() return 0 def reportdiff(expected, output): |