diff options
Diffstat (limited to 'source4/selftest/wscript')
-rw-r--r-- | source4/selftest/wscript | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/source4/selftest/wscript b/source4/selftest/wscript index 7020779baf..a348345dfd 100644 --- a/source4/selftest/wscript +++ b/source4/selftest/wscript @@ -85,8 +85,8 @@ def cmd_testonly(opt): env.TESTS = Options.options.TESTS - env.SUBUNIT_FORMATTER = '${PYTHON} -u ../selftest/format-subunit --prefix=${SELFTEST_PREFIX} --immediate' - env.FILTER_XFAIL = '${PYTHON} -u ../selftest/filter-subunit --expected-failures=./selftest/knownfail' + env.SUBUNIT_FORMATTER = '${PYTHON} -u ${srcdir}/selftest/format-subunit --prefix=${SELFTEST_PREFIX} --immediate' + env.FILTER_XFAIL = '${PYTHON} -u ${srcdir}/selftest/filter-subunit --expected-failures=${srcdir}/source4/selftest/knownfail' if Options.options.FAIL_IMMEDIATELY: env.FILTER_XFAIL += ' --fail-immediately' @@ -103,9 +103,9 @@ def cmd_testonly(opt): env.OPTIONS = '' if not Options.options.SLOWTEST: - env.OPTIONS += ' --exclude=./selftest/slow' + env.OPTIONS += ' --exclude=${srcdir}/source4/selftest/slow' if Options.options.QUICKTEST: - env.OPTIONS += ' --quick --include=./selftest/quick' + env.OPTIONS += ' --quick --include=${srcdir}/source4/selftest/quick' if Options.options.LOAD_LIST: env.OPTIONS += ' --load-list=%s' % Options.options.LOAD_LIST if Options.options.TESTENV: @@ -129,13 +129,13 @@ def cmd_testonly(opt): server_wrapper='' if Options.options.VALGRIND_SERVER: - server_wrapper = '../selftest/valgrind_run _DUMMY=X' + server_wrapper = '${srcdir}/selftest/valgrind_run _DUMMY=X' elif Options.options.GDBTEST: - server_wrapper = '../selftest/gdb_run _DUMMY=X' + server_wrapper = '${srcdir}/selftest/gdb_run _DUMMY=X' if Options.options.SCREEN: - server_wrapper = '%s/../selftest/in_screen %s' % (os.getcwd(), server_wrapper) - os.environ['TERMINAL'] = '%s/../selftest/in_screen' % os.getcwd() + server_wrapper = '${srcdir}selftest/in_screen %s' % server_wrapper + os.environ['TERMINAL'] = '${srcdir}/selftest/in_screen' elif server_wrapper != '': server_wrapper = 'xterm -n server -l -e %s' % server_wrapper @@ -152,7 +152,12 @@ def cmd_testonly(opt): os.environ['LDB_MODULES_PATH'] = 'bin/modules/ldb' # tell build system where to find config.h - os.environ['CONFIG_H'] = 'bin/default/source4/include/config.h' + config_paths = [ 'bin/default/source4/include/config.h', + 'bin/default/include/config.h' ] + for p in config_paths: + if os.path.exists(p): + os.environ['CONFIG_H'] = p + break st_done = os.path.join(env.SELFTEST_PREFIX, 'st_done') if os.path.exists(st_done): @@ -162,11 +167,11 @@ def cmd_testonly(opt): os.makedirs(env.SELFTEST_PREFIX, int('755', 8)) # We use the full path rather than relative path because it cause problems on some plateforms (ie. solaris 8). - cmd = '(${PERL} %s/../selftest/selftest.pl --prefix=${SELFTEST_PREFIX} --builddir=. --srcdir=. --exclude=./selftest/skip --testlist="${PYTHON} ./selftest/tests.py|" ${OPTIONS} --socket-wrapper ${TESTS} && touch ${SELFTEST_PREFIX}/st_done) | ${FILTER_OPTIONS} | tee ${SELFTEST_PREFIX}/subunit' % (os.getcwd()) + cmd = '(${PERL} ${srcdir}/selftest/selftest.pl --prefix=${SELFTEST_PREFIX} --builddir=. --srcdir=${srcdir} --exclude=${srcdir}/source4/selftest/skip --testlist="${PYTHON} ${srcdir}/source4/selftest/tests.py|" ${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}' else: - cmd += ' | ${PYTHON} -u ../selftest/filter-subunit' + cmd += ' | ${PYTHON} -u ${srcdir}/selftest/filter-subunit' cmd = EXPAND_VARIABLES(opt, cmd) print("test: running %s" % cmd) |