diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2014-11-02 12:36:13 -0800 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2014-11-30 18:31:08 +0100 |
commit | 4323504921ff0a566c43dada90443bdad3162f9b (patch) | |
tree | f8353af782329ef0c9ae4db0695b86923aa83a89 /selftest/wscript | |
parent | 02e063bd5be06925489f735c51225b65ff961d6b (diff) | |
download | samba-4323504921ff0a566c43dada90443bdad3162f9b.tar.gz samba-4323504921ff0a566c43dada90443bdad3162f9b.tar.xz samba-4323504921ff0a566c43dada90443bdad3162f9b.zip |
Don't assume st/subunit being present means it was generated by the current process.
This fixes --list.
Change-Id: I75fc765757e06861cf3bb489246e0845564a1123
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'selftest/wscript')
-rw-r--r-- | selftest/wscript | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/selftest/wscript b/selftest/wscript index cf57adc83f..d1d7425983 100644 --- a/selftest/wscript +++ b/selftest/wscript @@ -214,6 +214,7 @@ def cmd_testonly(opt): env.OPTIONS += " --socket_wrapper_so_path=" + CONFIG_GET(opt, 'LIBSOCKET_WRAPPER_SO_PATH') env.OPTIONS += " --uid_wrapper_so_path=" + CONFIG_GET(opt, 'LIBUID_WRAPPER_SO_PATH') + subunit_cache = None # We use the full path rather than relative path to avoid problems on some platforms (ie. solaris 8). env.CORE_COMMAND = '${PERL} ${srcdir}/selftest/selftest.pl --target=${SELFTEST_TARGET} --prefix=${SELFTEST_PREFIX} --srcdir=${srcdir} --exclude=${srcdir}/selftest/skip ${TESTLISTS} ${OPTIONS} ${TESTS}' if Options.options.LIST: @@ -223,7 +224,8 @@ def cmd_testonly(opt): cmd = '(${CORE_COMMAND} && touch ${SELFTEST_PREFIX}/st_done) | ${FILTER_OPTIONS}' if (os.environ.get('RUN_FROM_BUILD_FARM') is None and not Options.options.FILTERED_SUBUNIT): - cmd += ' | tee ${SELFTEST_PREFIX}/subunit | ${FORMAT_TEST_OUTPUT}' + subunit_cache = os.path.join(Options.options.SELFTEST_PREFIX, "subunit") + cmd += ' | tee %s | ${FORMAT_TEST_OUTPUT}' % subunit_cache else: cmd += ' | ${FILTER_OPTIONS}' runcmd = EXPAND_VARIABLES(opt, cmd) @@ -233,15 +235,15 @@ def cmd_testonly(opt): if (os.path.exists(".testrepository") and not Options.options.LIST and - not Options.options.LOAD_LIST): - testrcmd = 'testr load -q < ${SELFTEST_PREFIX}/subunit > /dev/null' + not Options.options.LOAD_LIST and + subunit_cache is not None): + testrcmd = 'testr load -q < %s > /dev/null' % subunit_cache runcmd = EXPAND_VARIABLES(opt, testrcmd) RUN_COMMAND(runcmd, env=env) - subunit_file = "%s/subunit" % env.SELFTEST_PREFIX - if os.path.exists(subunit_file): + if subunit_cache is not None: nb = Options.options.NB_SLOWEST - cmd = "./script/show_testsuite_time %s %d" % (subunit_file, nb) + cmd = "./script/show_testsuite_time %s %d" % (subunit_cache, nb) runcmd = EXPAND_VARIABLES(opt, cmd) RUN_COMMAND(runcmd, env=env) |