Enable stdout passthrough for subunit-trace

One of the biggest issues with subunit-trace is when non-subunit data
is passed into it gets dropped by subunit trace. This patch is an
attempt (based on a similar patch to subunit-2to1) to allow non subunit
data existing before the subunit stream to be printed on stdout. After the
stream is detected however any other stdin unrelated content will still be
lost.

Closes-Bug: #1420067

Change-Id: I94c428120892b987c372473ac2128d73e9ba8f2d
This commit is contained in:
Matthew Treinish
2015-02-11 11:16:42 -05:00
parent c70c26d05c
commit 21e3f6a29a

View File

@@ -251,6 +251,9 @@ def main():
failonly=args.failonly))
summary = testtools.StreamSummary()
result = testtools.CopyStreamResult([outcomes, summary])
result = testtools.StreamResultRouter(result)
cat = subunit.test_results.CatFiles(sys.stdout)
result.add_rule(cat, 'test_id', test_id=None)
start_time = datetime.datetime.utcnow()
result.startTestRun()
try: