From 3b1ed52f2f067c8bb895c6058de08c0b07e6f80c Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sat, 11 Dec 2010 18:21:27 +0100 Subject: filter-subunit: Add --list argument. --- selftest/filter-subunit | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'selftest') 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: -- cgit