summaryrefslogtreecommitdiff
path: root/filters
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2010-01-17 18:47:37 +1300
committerJelmer Vernooij <jelmer@samba.org>2010-01-17 18:47:37 +1300
commitbb2fb48920a17001b51db6c0affe9e5481fd5a07 (patch)
tree3c308536e3b4d2b563e0f4ff3152bd87ec3cda16 /filters
parentccbb167b82d2d99a689b9a6d5c5d4385e23f0ce3 (diff)
downloadsubunit-bb2fb48920a17001b51db6c0affe9e5481fd5a07.tar.gz
Add --forward option to notify.
Diffstat (limited to 'filters')
-rwxr-xr-xfilters/subunit-notify9
1 files changed, 8 insertions, 1 deletions
diff --git a/filters/subunit-notify b/filters/subunit-notify
index 076487e..c08cc10 100755
--- a/filters/subunit-notify
+++ b/filters/subunit-notify
@@ -31,13 +31,20 @@ if not pynotify.init("Subunit-notify"):
parser = OptionParser(description=__doc__)
parser.add_option("--no-passthrough", action="store_true",
help="Hide all non subunit input.", default=False, dest="no_passthrough")
+parser.add_option("-f", "--forward", action="store_true", default=False,
+ help="Forward subunit stream on stdout.")
(options, args) = parser.parse_args()
result = TestResultStats(sys.stdout)
if options.no_passthrough:
passthrough_stream = DiscardStream()
else:
passthrough_stream = None
-test = ProtocolTestCase(sys.stdin, passthrough=passthrough_stream)
+if options.forward:
+ forward_stream = sys.stdout
+else:
+ forward_stream = None
+test = ProtocolTestCase(sys.stdin, passthrough=passthrough_stream,
+ forward=forward_stream)
test.run(result)
if result.failed_tests > 0:
summary = "Test run failed"