From c12f1a1e912aeca8645b68c0ef720466c13ce8bb Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sun, 26 Sep 2010 18:58:05 -0700 Subject: s4-selftest: added a --fail-immediately option to s4 test this can be used to force an immediate test failure on the first failed test case. You can also use: make test FAIL_IMMEDIATELY=1 --- source4/selftest/wscript | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'source4/selftest/wscript') diff --git a/source4/selftest/wscript b/source4/selftest/wscript index d07ae0ff35..58cddb4053 100644 --- a/source4/selftest/wscript +++ b/source4/selftest/wscript @@ -51,6 +51,9 @@ def set_options(opt): gr.add_option('--gdbtest', help=("run the testsuite within a gdb xterm window"), action="store_true", dest='GDBTEST', default=False) + gr.add_option('--fail-immediately', + help=("stop tests on first failure"), + action="store_true", dest='FAIL_IMMEDIATELY', default=False) gr.add_option('--socket-wrapper-pcap', help=("create a pcap file for each failing test"), action="store_true", dest='SOCKET_WRAPPER_PCAP', default=False) @@ -76,6 +79,10 @@ def cmd_testonly(opt): env.SUBUNIT_FORMATTER = '${PYTHON} -u ../selftest/format-subunit --prefix=${SELFTEST_PREFIX} --immediate' env.FILTER_XFAIL = '${PYTHON} -u ../selftest/filter-subunit --expected-failures=./selftest/knownfail' + + if Options.options.FAIL_IMMEDIATELY: + env.FILTER_XFAIL += ' --fail-immediately' + env.FORMAT_TEST_OUTPUT = '${SUBUNIT_FORMATTER}' env.OPTIONS = '' -- cgit