From 21e3f6a29a368840b66fe6fccd60abd431bbc727 Mon Sep 17 00:00:00 2001 From: Matthew Treinish Date: Wed, 11 Feb 2015 11:16:42 -0500 Subject: 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 --- tempest_lib/cmd/subunit_trace.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tempest_lib/cmd/subunit_trace.py b/tempest_lib/cmd/subunit_trace.py index 5ffaa7c..eb78610 100755 --- a/tempest_lib/cmd/subunit_trace.py +++ b/tempest_lib/cmd/subunit_trace.py @@ -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: -- cgit v1.2.1