summaryrefslogtreecommitdiff
path: root/selftest
diff options
context:
space:
mode:
Diffstat (limited to 'selftest')
-rw-r--r--selftest/selftesthelpers.py30
1 files changed, 18 insertions, 12 deletions
diff --git a/selftest/selftesthelpers.py b/selftest/selftesthelpers.py
index 66402903b78..40efc1f7efd 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
-
-