From 4c4d3c86f0430d38f78d16dcb5d365b577ef4227 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Fri, 26 Oct 2012 13:03:32 -0800 Subject: selftesthelpers: Share code for listing smbtorture4 tests. --- selftest/selftesthelpers.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'selftest') 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) -- cgit