summaryrefslogtreecommitdiff
path: root/source3/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 /source3/selftest
parent868c8c058306b66fb3baa4a36bfe91d6461805d5 (diff)
downloadsamba-4c4d3c86f0430d38f78d16dcb5d365b577ef4227.tar.gz
samba-4c4d3c86f0430d38f78d16dcb5d365b577ef4227.tar.bz2
samba-4c4d3c86f0430d38f78d16dcb5d365b577ef4227.zip
selftesthelpers: Share code for listing smbtorture4 tests.
Diffstat (limited to 'source3/selftest')
-rwxr-xr-xsource3/selftest/tests.py18
1 files changed, 6 insertions, 12 deletions
diff --git a/source3/selftest/tests.py b/source3/selftest/tests.py
index 7168bfd327..05a14f9514 100755
--- a/source3/selftest/tests.py
+++ b/source3/selftest/tests.py
@@ -22,7 +22,6 @@ import os, sys
sys.path.insert(0, os.path.normpath(os.path.join(os.path.dirname(__file__), "../../selftest")))
from selftesthelpers import *
import subprocess
-smb4torture = binpath("smbtorture4")
samba3srcdir = srcdir() + "/source3"
configuration = "--configfile=$SMB_CONF_PATH"
scriptdir=os.path.join(samba3srcdir, "../script/tests")
@@ -48,17 +47,12 @@ torture_options.append("--format=subunit")
if os.getenv("SELFTEST_QUICK"):
torture_options.append("--option=torture:quick=yes")
-smb4torture_testsuite_list = subprocess.Popen([smb4torture, "--list-suites"], stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate("")[0].splitlines()
+smbtorture4 += " " + " ".join(torture_options)
-smb4torture += " " + " ".join(torture_options)
-
-sub = subprocess.Popen("%s --version 2> /dev/null" % smb4torture, stdout=subprocess.PIPE, stdin=subprocess.PIPE, shell=True)
+sub = subprocess.Popen("%s --version 2> /dev/null" % smbtorture4, stdout=subprocess.PIPE, stdin=subprocess.PIPE, shell=True)
sub.communicate("")
-smb4torture_possible = (sub.returncode == 0)
-
+smbtorture4_possible = (sub.returncode == 0)
-def smb4torture_testsuites(prefix):
- return filter(lambda x: x.startswith(prefix), smb4torture_testsuite_list)
def plansmbtorturetestsuite(name, env, options, description=''):
target = "samba3"
@@ -67,8 +61,8 @@ def plansmbtorturetestsuite(name, env, options, description=''):
else:
modname = "%s.%s %s" % (target, name, description)
- cmdline = "%s $LISTOPT %s --target=%s %s" % (valgrindify(smb4torture), options, target, name)
- if smb4torture_possible:
+ cmdline = "%s $LISTOPT %s --target=%s %s" % (valgrindify(smbtorture4), options, target, name)
+ if smbtorture4_possible:
plantestsuite_loadlist(modname, env, cmdline)
@@ -283,7 +277,7 @@ raw = ["raw.acls", "raw.chkpath", "raw.close", "raw.composite", "raw.context", "
"raw.bench-oplock", "raw.bench-lock", "raw.bench-open", "raw.bench-tcon",
"raw.samba3checkfsp", "raw.samba3closeerr", "raw.samba3oplocklogoff", "raw.samba3badnameblob"]
-smb2 = smb4torture_testsuites("smb2.")
+smb2 = smbtorture4_testsuites("smb2.")
rpc = ["rpc.authcontext", "rpc.samba3.bind", "rpc.samba3.srvsvc", "rpc.samba3.sharesec",
"rpc.samba3.spoolss", "rpc.samba3.wkssvc", "rpc.samba3.winreg",