summaryrefslogtreecommitdiff
path: root/source4/selftest/wscript
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-09-26 18:58:05 -0700
committerJelmer Vernooij <jelmer@samba.org>2010-09-28 09:12:39 +0200
commitc12f1a1e912aeca8645b68c0ef720466c13ce8bb (patch)
tree9f70bb5cee203e0945da542ff6859abfce228f55 /source4/selftest/wscript
parent71f88c45a751e5f72de00dee0628b5c1b6614bf3 (diff)
downloadsamba-c12f1a1e912aeca8645b68c0ef720466c13ce8bb.tar.gz
samba-c12f1a1e912aeca8645b68c0ef720466c13ce8bb.tar.bz2
samba-c12f1a1e912aeca8645b68c0ef720466c13ce8bb.zip
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
Diffstat (limited to 'source4/selftest/wscript')
-rw-r--r--source4/selftest/wscript7
1 files changed, 7 insertions, 0 deletions
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 = ''