diff options
author | Tim Beale <timbeale@catalyst.net.nz> | 2019-02-18 12:52:41 +1300 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2019-02-20 02:10:00 +0100 |
commit | 96472306bf13bd2a4d39d5fdd63a73f6140f8b44 (patch) | |
tree | 3488025920f50923e3cbe0660f7b135f5f5d6426 /selftest/wscript | |
parent | bcd007532820a077320fe21f246c5ba0195e87d5 (diff) | |
download | samba-96472306bf13bd2a4d39d5fdd63a73f6140f8b44.tar.gz |
selftest: Add basic sanity-check tests for nopython target
Previously we were only checking samba compiled OK with
--disable-python, not that it actually ran.
The main problem is all the make test framework is based around
subunit/smbtorture, neither of which we seem to build with
disable-python. However, for just a simple sanity-check, we can just
bypass all the subunit-filter work and just call the Perl code directly.
This works OK as long as it's just simple shell script tests that we're
running, as we can check the script's exit code directly.
The main thing that we really want to test is that we can start up the
smbd testenv and connect to it (i.e. a simple smbclient test).
This patch adds a new 'make test-nopython' target. This disables the
subunit filtering, and runs a small test-list that was generated manually.
Note that currently this has the limitation that it doesn't support known
failures or flapping tests. However, just checking that smd starts up OK
is probably OK for now.
Signed-off-by: Tim Beale <timbeale@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Wed Feb 20 02:10:00 CET 2019 on sn-devel-144
Diffstat (limited to 'selftest/wscript')
-rw-r--r-- | selftest/wscript | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/selftest/wscript b/selftest/wscript index b7eec2c2605..727adcf3126 100644 --- a/selftest/wscript +++ b/selftest/wscript @@ -90,6 +90,10 @@ def options(opt): help=("use tests listed here, not defaults " "(--test-list='FOO|' will execute FOO; " "--test-list='FOO' will read it)")) + gr.add_option('--no-subunit-filter', + help=("no (xfail) subunit filtering"), + action="store_true", dest='NO_SUBUNIT_FILTER', default=False) + def configure(conf): conf.env.SELFTEST_PREFIX = Options.options.SELFTEST_PREFIX @@ -305,7 +309,12 @@ def cmd_testonly(opt): else: env.OPTIONS += ' --socket-wrapper' cmd = '(${CORE_COMMAND} && touch ${SELFTEST_PREFIX}/st_done) | ${FILTER_OPTIONS}' - if (os.environ.get('RUN_FROM_BUILD_FARM') is None and + + if Options.options.NO_SUBUNIT_FILTER: + # Skip subunit filtering (i.e. because python is disabled). + # Use --one to bail out upon any failure + cmd = '(${CORE_COMMAND} --one && touch ${SELFTEST_PREFIX}/st_done)' + elif (os.environ.get('RUN_FROM_BUILD_FARM') is None and not Options.options.FILTERED_SUBUNIT): subunit_cache = os.path.join(env.SELFTEST_PREFIX, "subunit") cmd += ' | tee %s | ${FORMAT_TEST_OUTPUT}' % subunit_cache |