From ae5324884ffcc2cd50dff35811ae8af445ee1cb4 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sat, 11 Dec 2010 18:21:27 +0100 Subject: [PATCH] filter-subunit: Add --list argument. (cherry picked from commit 3b1ed52f2f067c8bb895c6058de08c0b07e6f80c) Signed-off-by: Stefan Metzmacher --- selftest/filter-subunit | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/selftest/filter-subunit b/selftest/filter-subunit index 84b66104800..5f062d12a29 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: -- 2.11.4.GIT