summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--selftest/wscript19
1 files changed, 11 insertions, 8 deletions
diff --git a/selftest/wscript b/selftest/wscript
index b469709a8a..1509b1a5a4 100644
--- a/selftest/wscript
+++ b/selftest/wscript
@@ -121,8 +121,6 @@ def cmd_testonly(opt):
env.OPTIONS += ' --socket-wrapper-pcap'
if Options.options.SOCKET_WRAPPER_KEEP_PCAP:
env.OPTIONS += ' --socket-wrapper-keep-pcap'
- if Options.options.LIST:
- env.OPTIONS += ' --list'
if os.environ.get('RUN_FROM_BUILD_FARM') is not None:
env.FILTER_OPTIONS = '${FILTER_XFAIL} --strip-passed-output'
else:
@@ -176,17 +174,22 @@ def cmd_testonly(opt):
'--testlist="${PYTHON} ${srcdir}/source4/selftest/tests.py|"')
# We use the full path rather than relative path because it cause problems on some plateforms (ie. solaris 8).
- cmd = '(${PERL} ${srcdir}/selftest/selftest.pl --target=samba --prefix=${SELFTEST_PREFIX} --srcdir=${srcdir} --exclude=${srcdir}/selftest/skip ${TESTLISTS} ${OPTIONS} --socket-wrapper ${TESTS} && touch ${SELFTEST_PREFIX}/st_done) | ${FILTER_OPTIONS} | tee ${SELFTEST_PREFIX}/subunit'
-
- if os.environ.get('RUN_FROM_BUILD_FARM') is None and not Options.options.FILTERED_SUBUNIT:
- cmd += ' | ${FORMAT_TEST_OUTPUT}'
+ env.CORE_COMMAND = '${PERL} ${srcdir}/selftest/selftest.pl --target=samba --prefix=${SELFTEST_PREFIX} --srcdir=${srcdir} --exclude=${srcdir}/selftest/skip ${TESTLISTS} ${OPTIONS} ${TESTS}'
+ if Options.options.LIST:
+ cmd = '${CORE_COMMAND} --list'
else:
- cmd += ' | ${PYTHON} -u ${srcdir}/selftest/filter-subunit'
+ env.OPTIONS += ' --socket-wrapper'
+ cmd = '(${CORE_COMMAND} && touch ${SELFTEST_PREFIX}/st_done) | ${FILTER_OPTIONS} | tee ${SELFTEST_PREFIX}/subunit'
+ if (os.environ.get('RUN_FROM_BUILD_FARM') is None and
+ not Options.options.FILTERED_SUBUNIT):
+ cmd += ' | ${FORMAT_TEST_OUTPUT}'
+ else:
+ cmd += ' | ${PYTHON} -u ${srcdir}/selftest/filter-subunit'
runcmd = EXPAND_VARIABLES(opt, cmd)
print("test: running %s" % runcmd)
ret = RUN_COMMAND(cmd, env=env)
- if os.path.exists(".testrepository"):
+ if os.path.exists(".testrepository") and not Options.options.LIST:
# "testr load -q" isn't
testrcmd = 'testr load -q < ${SELFTEST_PREFIX}/subunit > /dev/null'
runcmd = EXPAND_VARIABLES(opt, testrcmd)