summaryrefslogtreecommitdiff
path: root/selftest/wscript
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2011-10-26 13:38:15 +1100
committerAndrew Bartlett <abartlet@samba.org>2011-10-28 13:10:27 +0200
commit659ec79245a9d9e5d45c380e8b82ec6236999032 (patch)
tree14d0af27c28e82f2396a9b7ec1ca6573c3252af9 /selftest/wscript
parent8dcfe2e5c44184298b0aa5bb1a13e2108b31a9c4 (diff)
downloadsamba-659ec79245a9d9e5d45c380e8b82ec6236999032.tar.gz
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
Diffstat (limited to 'selftest/wscript')
-rw-r--r--selftest/wscript30
1 files changed, 4 insertions, 26 deletions
diff --git a/selftest/wscript b/selftest/wscript
index c34658a1a7b..4d3d8f2841f 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}'