summaryrefslogtreecommitdiff
path: root/selftest
diff options
context:
space:
mode:
Diffstat (limited to 'selftest')
-rw-r--r--selftest/selftesthelpers.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/selftest/selftesthelpers.py b/selftest/selftesthelpers.py
index 45170304e5..b22330ae0a 100644
--- a/selftest/selftesthelpers.py
+++ b/selftest/selftesthelpers.py
@@ -183,3 +183,16 @@ samba4srcdir = source4dir()
bbdir = os.path.join(srcdir(), "testprogs/blackbox")
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()
+
+def plansmbtorture4testsuite(name, env, options, modname=None):
+ if modname is None:
+ modname = "samba4.%s" % name
+ if isinstance(options, list):
+ options = " ".join(options)
+ 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)