diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2010-12-11 18:21:27 +0100 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2010-12-11 18:48:05 +0100 |
commit | 3b1ed52f2f067c8bb895c6058de08c0b07e6f80c (patch) | |
tree | bd3016592a7312c2aca258f6bddfbf85888b6a0f | |
parent | 13bb9e7046ac253980d3aefafb3de88b0379bdb7 (diff) | |
download | samba-3b1ed52f2f067c8bb895c6058de08c0b07e6f80c.tar.gz samba-3b1ed52f2f067c8bb895c6058de08c0b07e6f80c.tar.bz2 samba-3b1ed52f2f067c8bb895c6058de08c0b07e6f80c.zip |
filter-subunit: Add --list argument.
-rwxr-xr-x | selftest/filter-subunit | 10 |
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: |