summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2010-12-11 18:21:27 +0100
committerJelmer Vernooij <jelmer@samba.org>2010-12-11 18:48:05 +0100
commit3b1ed52f2f067c8bb895c6058de08c0b07e6f80c (patch)
treebd3016592a7312c2aca258f6bddfbf85888b6a0f
parent13bb9e7046ac253980d3aefafb3de88b0379bdb7 (diff)
downloadsamba-3b1ed52f2f067c8bb895c6058de08c0b07e6f80c.tar.gz
samba-3b1ed52f2f067c8bb895c6058de08c0b07e6f80c.tar.bz2
samba-3b1ed52f2f067c8bb895c6058de08c0b07e6f80c.zip
filter-subunit: Add --list argument.
-rwxr-xr-xselftest/filter-subunit10
1 files changed, 10 insertions, 0 deletions
diff --git a/selftest/filter-subunit b/selftest/filter-subunit
index 84b6610480..5f062d12a2 100755
--- a/selftest/filter-subunit
+++ b/selftest/filter-subunit
@@ -25,8 +25,18 @@ parser.add_option("--prefix", type="string",
help="Add prefix to all test names")
parser.add_option("--fail-on-empty", default=False,
action="store_true", help="Fail if there was no subunit output")
+parser.add_option("--list", default=False,
+ action="store_true", help="Operate in list mode")
opts, args = parser.parse_args()
+if opts.list:
+ prefix = opts.prefix
+ if not prefix:
+ prefix = ""
+ for l in sys.stdin:
+ sys.stdout.write("%s%s\n" % (prefix, l.rstrip()))
+ sys.exit(0)
+
if opts.expected_failures:
expected_failures = subunithelper.read_test_regexes(opts.expected_failures)
else: