mirror of
https://github.com/samba-team/samba.git
synced 2025-09-28 21:44:20 +03:00
selftest/selftesthelpers: Share environment handling for extra smbtorture options.
This commit is contained in:
@@ -198,3 +198,14 @@ def plansmbtorture4testsuite(name, env, options, modname=None):
|
|||||||
|
|
||||||
def smbtorture4_testsuites(prefix):
|
def smbtorture4_testsuites(prefix):
|
||||||
return filter(lambda x: x.startswith(prefix), smbtorture4_testsuite_list)
|
return filter(lambda x: x.startswith(prefix), smbtorture4_testsuite_list)
|
||||||
|
|
||||||
|
|
||||||
|
def get_env_torture_options():
|
||||||
|
ret = []
|
||||||
|
if not os.getenv("SELFTEST_VERBOSE"):
|
||||||
|
ret.append("--option=torture:progress=no")
|
||||||
|
if os.getenv("SELFTEST_QUICK"):
|
||||||
|
ret.append("--option=torture:quick=yes")
|
||||||
|
return ret
|
||||||
|
|
||||||
|
|
||||||
|
@@ -33,18 +33,17 @@ ntlm_auth = binpath('ntlm_auth3')
|
|||||||
dbwrap_tool = binpath('dbwrap_tool')
|
dbwrap_tool = binpath('dbwrap_tool')
|
||||||
vfstest = binpath('vfstest')
|
vfstest = binpath('vfstest')
|
||||||
|
|
||||||
torture_options = [configuration, "--maximum-runtime=$SELFTEST_MAXTIME",
|
torture_options = [configuration,
|
||||||
"--basedir=$SELFTEST_TMPDIR",
|
'--maximum-runtime=$SELFTEST_MAXTIME',
|
||||||
|
'--basedir=$SELFTEST_TMPDIR',
|
||||||
'--option="torture:winbindd_netbios_name=$SERVER"',
|
'--option="torture:winbindd_netbios_name=$SERVER"',
|
||||||
'--option="torture:winbindd_netbios_domain=$DOMAIN"',
|
'--option="torture:winbindd_netbios_domain=$DOMAIN"',
|
||||||
'--option=torture:sharedelay=100000',
|
'--option=torture:sharedelay=100000',
|
||||||
'--option=torture:writetimeupdatedelay=500000' ]
|
'--option=torture:writetimeupdatedelay=500000',
|
||||||
|
'--format=subunit'
|
||||||
|
]
|
||||||
|
|
||||||
if not os.getenv("SELFTEST_VERBOSE"):
|
torture_options.extend(env_get_torture_options())
|
||||||
torture_options.append("--option=torture:progress=no")
|
|
||||||
torture_options.append("--format=subunit")
|
|
||||||
if os.getenv("SELFTEST_QUICK"):
|
|
||||||
torture_options.append("--option=torture:quick=yes")
|
|
||||||
|
|
||||||
smbtorture4 += " " + " ".join(torture_options)
|
smbtorture4 += " " + " ".join(torture_options)
|
||||||
|
|
||||||
|
@@ -38,12 +38,12 @@ subprocess.call([smbtorture4, "-V"], stdout=sys.stderr)
|
|||||||
|
|
||||||
bbdir = os.path.join(srcdir(), "testprogs/blackbox")
|
bbdir = os.path.join(srcdir(), "testprogs/blackbox")
|
||||||
|
|
||||||
torture_options = [configuration, "--maximum-runtime=$SELFTEST_MAXTIME", "--target=samba4", "--basedir=$SELFTEST_TMPDIR"]
|
torture_options = [configuration,
|
||||||
if not os.getenv("SELFTEST_VERBOSE"):
|
"--maximum-runtime=$SELFTEST_MAXTIME",
|
||||||
torture_options.append("--option=torture:progress=no")
|
"--target=samba4",
|
||||||
torture_options.append("--format=subunit")
|
"--basedir=$SELFTEST_TMPDIR",
|
||||||
if os.getenv("SELFTEST_QUICK"):
|
"--format=subunit"]
|
||||||
torture_options.append("--option=torture:quick=yes")
|
torture_options.extend(get_env_torture_options())
|
||||||
smbtorture4 += " " + " ".join(torture_options)
|
smbtorture4 += " " + " ".join(torture_options)
|
||||||
|
|
||||||
print >>sys.stderr, "OPTIONS %s" % " ".join(torture_options)
|
print >>sys.stderr, "OPTIONS %s" % " ".join(torture_options)
|
||||||
|
Reference in New Issue
Block a user