Test: Fix mangled "run_all --verbose" output

For lack of being able to reproduce the problem, this is a "fix by
guessing at the root cause" commit.  Don't do this at home.

FreeBSD was showing a 100.04% test suite run because the output of
"test/problems --summary" was intertwined with TAP output.

The only somewhat sane way for this to happen that does not involve
magic is that Python's sys.stdout buffer is not flushed before calling
subprocess.call(), which uses the raw file descriptors.

A quick check of the sources seems to support this theory.
This commit is contained in:
Wilhelm Schuermann 2015-11-17 21:54:14 +01:00
parent f7d0f500fc
commit 01b5d0a66b

View file

@ -175,6 +175,8 @@ class TestRunner(object):
def show_report(self):
self.tap.flush()
sys.stdout.flush()
sys.stderr.flush()
log.debug("Calling 'problems --summary' for report")
return call([os.path.abspath("problems"), "--summary", cmd_args.tapfile])