summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Collins <robertc@robertcollins.net>2014-12-11 22:16:43 +1300
committerRobert Collins <robertc@robertcollins.net>2014-12-11 22:16:43 +1300
commit669f0dbc8a993d203c0dbc874419cc2fb8c5441c (patch)
tree6f18c6306c78349c4ef2f0d7fe56caa512ed9f0d
parentacfc653d083d09772df32f67f90d7cc1603ed3fe (diff)
downloadsubunit-669f0dbc8a993d203c0dbc874419cc2fb8c5441c.tar.gz
Forward stdout content in subunit-2to1.
It was always intended to be forwarded. Closes-Bug: #1400519
-rw-r--r--NEWS3
-rwxr-xr-xfilters/subunit-2to110
2 files changed, 11 insertions, 2 deletions
diff --git a/NEWS b/NEWS
index 307c645..f6221a8 100644
--- a/NEWS
+++ b/NEWS
@@ -8,6 +8,9 @@ NEXT (In development)
BUGFIXES
~~~~~~~~
+* Unencapsulated strings and encapsulated stdout will be forwarded by
+ subunit-2to1. (Robert Collins, #1400519)
+
* SUBUNIT_FORMATTER which has not been honoured for years is now removed from
the codebase. (Jelmer Vernooij)
diff --git a/filters/subunit-2to1 b/filters/subunit-2to1
index 0072307..d358f66 100755
--- a/filters/subunit-2to1
+++ b/filters/subunit-2to1
@@ -19,10 +19,14 @@
from optparse import OptionParser
import sys
-from testtools import StreamToExtendedDecorator
+from testtools import (
+ StreamToExtendedDecorator,
+ StreamResultRouter,
+ )
from subunit import ByteStreamToStreamResult, TestProtocolClient
from subunit.filters import find_stream, run_tests_from_stream
+from subunit.test_results import CatFiles
def make_options(description):
@@ -36,7 +40,9 @@ def main():
case = ByteStreamToStreamResult(
find_stream(sys.stdin, args), non_subunit_name='stdout')
result = StreamToExtendedDecorator(TestProtocolClient(sys.stdout))
- # What about stdout chunks?
+ result = StreamResultRouter(result)
+ cat = CatFiles(sys.stdout)
+ result.add_rule(cat, 'test_id', test_id=None)
result.startTestRun()
case.run(result)
result.stopTestRun()