diff options
author | Andrew Bartlett <abartlet@samba.org> | 2012-04-27 12:50:36 +1000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2012-04-27 14:51:05 +0200 |
commit | 0cb0427f134c8fdd79880642abef0ad1f115c3b3 (patch) | |
tree | b85988945b8ca31237c62370070f4f3c8de615fd /selftest/filter-subunit | |
parent | 67a851a05074d2ffd72d54a482a72859e8377b2f (diff) | |
download | samba-0cb0427f134c8fdd79880642abef0ad1f115c3b3.tar.gz samba-0cb0427f134c8fdd79880642abef0ad1f115c3b3.tar.bz2 samba-0cb0427f134c8fdd79880642abef0ad1f115c3b3.zip |
selftest: Place the test environment at the end of the failure lines
This allows a knownfail entry to be added for only one environment, rather than
all environments.
Andrew Bartlett
Diffstat (limited to 'selftest/filter-subunit')
-rwxr-xr-x | selftest/filter-subunit | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/selftest/filter-subunit b/selftest/filter-subunit index bced14b101..2ed1430b69 100755 --- a/selftest/filter-subunit +++ b/selftest/filter-subunit @@ -40,6 +40,8 @@ parser.add_option("--fail-immediately", action="store_true", help="Whether to stop on the first error", default=False) parser.add_option("--prefix", type="string", help="Add prefix to all test names") +parser.add_option("--suffix", type="string", + help="Add suffix 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, @@ -48,10 +50,13 @@ opts, args = parser.parse_args() if opts.list: prefix = opts.prefix + suffix = opts.suffix if not prefix: prefix = "" + if not suffix: + suffix = "" for l in sys.stdin: - sys.stdout.write("%s%s\n" % (prefix, l.rstrip())) + sys.stdout.write("%s%s%s\n" % (prefix, l.rstrip(), suffix)) sys.exit(0) if opts.expected_failures: @@ -79,7 +84,7 @@ def handle_sigint(sig, stack): signal.signal(signal.SIGINT, handle_sigint) out = subunithelper.SubunitOps(sys.stdout) -msg_ops = subunithelper.FilterOps(out, opts.prefix, expected_failures, +msg_ops = subunithelper.FilterOps(out, opts.prefix, opts.suffix, expected_failures, opts.strip_passed_output, fail_immediately=opts.fail_immediately, flapping=flapping) |