diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2012-10-26 13:38:32 -0800 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2012-10-27 05:16:18 -0800 |
commit | 8237e2727da0d04b82cb3cf644dd337a4c77fe34 (patch) | |
tree | 3a26826ceedd4074a626077bfa40bcc5a21529f0 /selftest | |
parent | fcb7926ce544a8d4b0e5aa6577fe21712b38bb53 (diff) | |
download | samba-8237e2727da0d04b82cb3cf644dd337a4c77fe34.tar.gz samba-8237e2727da0d04b82cb3cf644dd337a4c77fe34.tar.bz2 samba-8237e2727da0d04b82cb3cf644dd337a4c77fe34.zip |
selftest: Move determining of smbtorture4 options to selftesthelpers.
Diffstat (limited to 'selftest')
-rw-r--r-- | selftest/selftesthelpers.py | 30 |
1 files changed, 18 insertions, 12 deletions
diff --git a/selftest/selftesthelpers.py b/selftest/selftesthelpers.py index 66402903b7..40efc1f7ef 100644 --- a/selftest/selftesthelpers.py +++ b/selftest/selftesthelpers.py @@ -179,6 +179,15 @@ def planpythontestsuite(env, module, name=None, extra_path=[]): plantestsuite_idlist(name, env, args) +def get_env_torture_options(): + ret = [] + if not os.getenv("SELFTEST_VERBOSE"): + ret.append("--option=torture:progress=no") + if os.getenv("SELFTEST_QUICK"): + ret.append("--option=torture:quick=yes") + return ret + + samba4srcdir = source4dir() bbdir = os.path.join(srcdir(), "testprogs/blackbox") configuration = "--configfile=$SMB_CONF_PATH" @@ -186,26 +195,23 @@ configuration = "--configfile=$SMB_CONF_PATH" smbtorture4 = binpath("smbtorture4") smbtorture4_testsuite_list = subprocess.Popen([smbtorture4, "--list-suites"], stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate("")[0].splitlines() +smbtorture4_options = [ + configuration, + "--maximum-runtime=$SELFTEST_MAXTIME", + "--basedir=$SELFTEST_TMPDIR", + "--format=subunit" + ] + get_env_torture_options() -def plansmbtorture4testsuite(name, env, options, modname=None): + +def plansmbtorture4testsuite(name, env, options, target, modname=None): if modname is None: modname = "samba4.%s" % name if isinstance(options, list): options = " ".join(options) + options += " " + " ".join(smbtorture4_options + ["--target=%s" % target]) cmdline = "%s $LISTOPT %s %s" % (valgrindify(smbtorture4), options, name) plantestsuite_loadlist(modname, env, cmdline) def smbtorture4_testsuites(prefix): return filter(lambda x: x.startswith(prefix), smbtorture4_testsuite_list) - - -def get_env_torture_options(): - ret = [] - if not os.getenv("SELFTEST_VERBOSE"): - ret.append("--option=torture:progress=no") - if os.getenv("SELFTEST_QUICK"): - ret.append("--option=torture:quick=yes") - return ret - - |