From 659ec79245a9d9e5d45c380e8b82ec6236999032 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Wed, 26 Oct 2011 13:38:15 +1100 Subject: selftest: Have only one set of selftest knownfail and skip files Listing tests that are not ever proposed (eg samba4.* in the samba3 selftest) is not an error, so just combine the lists. This is being done because some folks trying to learn how our 'make test' works are having trouble following the distributed nature of the selftest system. Andrew Bartlett --- selftest/wscript | 30 ++++-------------------------- 1 file changed, 4 insertions(+), 26 deletions(-) (limited to 'selftest/wscript') diff --git a/selftest/wscript b/selftest/wscript index c34658a1a7..4d3d8f2841 100644 --- a/selftest/wscript +++ b/selftest/wscript @@ -70,19 +70,6 @@ def set_options(opt): def configure(conf): conf.env.SELFTEST_PREFIX = Options.options.SELFTEST_PREFIX -def combine_files(file1, file2, outfile): - - f1 = open(file1) - f2 = open(file2) - of = open(outfile, mode='w') - for line in f1: - of.write(line) - for line in f2: - of.write(line) - f1.close() - f2.close() - of.close() - def cmd_testonly(opt): '''run tests without doing a build first''' env = LOAD_ENVIRONMENT() @@ -101,7 +88,7 @@ def cmd_testonly(opt): env.SUBUNIT_FORMATTER = os.getenv('SUBUNIT_FORMATTER') if not env.SUBUNIT_FORMATTER: env.SUBUNIT_FORMATTER = '${PYTHON} -u ${srcdir}/selftest/format-subunit --prefix=${SELFTEST_PREFIX} --immediate' - env.FILTER_XFAIL = '${PYTHON} -u ${srcdir}/selftest/filter-subunit --expected-failures=${SELFTEST_DIR}/knownfail' + env.FILTER_XFAIL = '${PYTHON} -u ${srcdir}/selftest/filter-subunit --expected-failures=${srcdir}/selftest/knownfail' if Options.options.FAIL_IMMEDIATELY: env.FILTER_XFAIL += ' --fail-immediately' @@ -123,9 +110,9 @@ def cmd_testonly(opt): env.OPTIONS = '--binary-mapping=%s' % binary_mapping if not Options.options.SLOWTEST: - env.OPTIONS += ' --exclude=${SELFTEST_DIR}/slow' + env.OPTIONS += ' --exclude=${srcdir}/selftest/slow' if Options.options.QUICKTEST: - env.OPTIONS += ' --quick --include=${SELFTEST_DIR}/quick' + env.OPTIONS += ' --quick --include=${srcdir}/selftest/quick' if Options.options.LOAD_LIST: env.OPTIONS += ' --load-list=%s' % Options.options.LOAD_LIST if Options.options.TESTENV: @@ -185,20 +172,11 @@ def cmd_testonly(opt): if not os.path.isdir(env.SELFTEST_PREFIX): os.makedirs(env.SELFTEST_PREFIX, int('755', 8)) - env.SELFTEST_TARGET = "samba" - - for f in ["knownfail", "slow", "quick", "skip" ]: - combine_files(env.srcdir + "/source4/selftest/" + f, - env.srcdir + "/source3/selftest/" + f, - env.SELFTEST_PREFIX + "/" + f) - - env.SELFTEST_DIR = env.SELFTEST_PREFIX - env.TESTLISTS = ('--testlist="${PYTHON} ${srcdir}/source3/selftest/tests.py|" ' + '--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=${SELFTEST_DIR}/skip ${TESTLISTS} ${OPTIONS} --socket-wrapper ${TESTS} && touch ${SELFTEST_PREFIX}/st_done) | ${FILTER_OPTIONS} | tee ${SELFTEST_PREFIX}/subunit' + 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}' -- cgit