mirror of
https://github.com/samba-team/samba.git
synced 2025-01-03 01:18:10 +03:00
selftest: Move determining of smbtorture4 options to selftesthelpers.
This commit is contained in:
parent
fcb7926ce5
commit
8237e2727d
@ -179,27 +179,6 @@ def planpythontestsuite(env, module, name=None, extra_path=[]):
|
||||
plantestsuite_idlist(name, env, args)
|
||||
|
||||
|
||||
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)
|
||||
|
||||
|
||||
def get_env_torture_options():
|
||||
ret = []
|
||||
if not os.getenv("SELFTEST_VERBOSE"):
|
||||
@ -209,3 +188,30 @@ def get_env_torture_options():
|
||||
return ret
|
||||
|
||||
|
||||
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()
|
||||
|
||||
smbtorture4_options = [
|
||||
configuration,
|
||||
"--maximum-runtime=$SELFTEST_MAXTIME",
|
||||
"--basedir=$SELFTEST_TMPDIR",
|
||||
"--format=subunit"
|
||||
] + get_env_torture_options()
|
||||
|
||||
|
||||
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)
|
||||
|
@ -43,7 +43,7 @@ torture_options = [configuration,
|
||||
'--format=subunit'
|
||||
]
|
||||
|
||||
torture_options.extend(env_get_torture_options())
|
||||
torture_options.extend(get_env_torture_options())
|
||||
|
||||
smbtorture4 += " " + " ".join(torture_options)
|
||||
|
||||
|
@ -20,9 +20,16 @@
|
||||
|
||||
import os, sys
|
||||
sys.path.insert(0, os.path.join(os.path.dirname(__file__), "../../selftest"))
|
||||
import selftesthelpers
|
||||
from selftesthelpers import *
|
||||
import subprocess
|
||||
|
||||
print >>sys.stderr, "OPTIONS %s" % " ".join(smbtorture4_options)
|
||||
|
||||
def plansmbtorture4testsuite(name, env, options, modname=None):
|
||||
return selftesthelpers.plansmbtorture4testsuite(name, env, options,
|
||||
target='samba4', modname=modname)
|
||||
|
||||
samba4srcdir = source4dir()
|
||||
samba4bindir = bindir()
|
||||
validate = os.getenv("VALIDATE", "")
|
||||
@ -38,16 +45,6 @@ subprocess.call([smbtorture4, "-V"], stdout=sys.stderr)
|
||||
|
||||
bbdir = os.path.join(srcdir(), "testprogs/blackbox")
|
||||
|
||||
torture_options = [configuration,
|
||||
"--maximum-runtime=$SELFTEST_MAXTIME",
|
||||
"--target=samba4",
|
||||
"--basedir=$SELFTEST_TMPDIR",
|
||||
"--format=subunit"]
|
||||
torture_options.extend(get_env_torture_options())
|
||||
smbtorture4 += " " + " ".join(torture_options)
|
||||
|
||||
print >>sys.stderr, "OPTIONS %s" % " ".join(torture_options)
|
||||
|
||||
# Simple tests for LDAP and CLDAP
|
||||
for options in ['-U"$USERNAME%$PASSWORD" --option=socket:testnonblock=true', '-U"$USERNAME%$PASSWORD"', '-U"$USERNAME%$PASSWORD" -k yes', '-U"$USERNAME%$PASSWORD" -k no', '-U"$USERNAME%$PASSWORD" -k no --sign', '-U"$USERNAME%$PASSWORD" -k no --encrypt', '-U"$USERNAME%$PASSWORD" -k yes --encrypt', '-U"$USERNAME%$PASSWORD" -k yes --sign']:
|
||||
plantestsuite("samba4.ldb.ldap with options %s(dc)" % options, "dc", "%s/test_ldb.sh ldap $SERVER %s" % (bbdir, options))
|
||||
|
Loading…
Reference in New Issue
Block a user