summaryrefslogtreecommitdiff
path: root/selftest
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2012-10-26 13:03:32 -0800
committerJelmer Vernooij <jelmer@samba.org>2012-10-27 05:16:18 -0800
commit4c4d3c86f0430d38f78d16dcb5d365b577ef4227 (patch)
tree6de9de4611e956f25721ffed7e1aa2a3d95dad67 /selftest
parent868c8c058306b66fb3baa4a36bfe91d6461805d5 (diff)
downloadsamba-4c4d3c86f0430d38f78d16dcb5d365b577ef4227.tar.gz
samba-4c4d3c86f0430d38f78d16dcb5d365b577ef4227.tar.bz2
samba-4c4d3c86f0430d38f78d16dcb5d365b577ef4227.zip
selftesthelpers: Share code for listing smbtorture4 tests.
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)