summaryrefslogtreecommitdiff
path: root/selftest/filter-subunit
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2011-12-04 00:23:02 +0100
committerJelmer Vernooij <jelmer@samba.org>2011-12-05 23:11:04 +0100
commite62654578b3aa1ddafd8faf85b65d9702f49fba3 (patch)
treef6ab370e1d31389220acc5678f55d4097dc78686 /selftest/filter-subunit
parent5643d37a000971070b22af7c2710f66b49b57eff (diff)
downloadsamba-e62654578b3aa1ddafd8faf85b65d9702f49fba3.tar.gz
samba-e62654578b3aa1ddafd8faf85b65d9702f49fba3.tar.bz2
samba-e62654578b3aa1ddafd8faf85b65d9702f49fba3.zip
selftest: Add --flapping argument to filter-subunit.
Diffstat (limited to 'selftest/filter-subunit')
-rwxr-xr-xselftest/filter-subunit15
1 files changed, 12 insertions, 3 deletions
diff --git a/selftest/filter-subunit b/selftest/filter-subunit
index 5f062d12a2..ef3172171e 100755
--- a/selftest/filter-subunit
+++ b/selftest/filter-subunit
@@ -17,9 +17,11 @@ parser = optparse.OptionParser("filter-subunit [options] < instream > outstream"
parser.add_option("--expected-failures", type="string",
help="File containing list of regexes matching tests to consider known "
"failures")
-parser.add_option("--strip-passed-output", action="store_true",
+parser.add_option("--flapping", type="string",
+ help="File containing list of flapping tests, of which to ignore results.")
+parser.add_option("--strip-passed-output", action="store_true",
help="Whether to strip output from tests that passed")
-parser.add_option("--fail-immediately", action="store_true",
+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")
@@ -42,6 +44,12 @@ if opts.expected_failures:
else:
expected_failures = {}
+
+if opts.flapping:
+ flapping = subunithelper.read_test_regexes(opts.flapping)
+else:
+ flapping = []
+
statistics = {
'TESTS_UNEXPECTED_OK': 0,
'TESTS_EXPECTED_OK': 0,
@@ -58,7 +66,8 @@ signal.signal(signal.SIGINT, handle_sigint)
out = subunithelper.SubunitOps(sys.stdout)
msg_ops = subunithelper.FilterOps(out, opts.prefix, expected_failures,
opts.strip_passed_output,
- fail_immediately=opts.fail_immediately)
+ fail_immediately=opts.fail_immediately,
+ flapping=flapping)
try:
ret = subunithelper.parse_results(msg_ops, statistics, sys.stdin)