summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--selftest/selftesthelpers.py11
-rwxr-xr-xsource3/selftest/tests.py15
-rwxr-xr-xsource4/selftest/tests.py12
3 files changed, 24 insertions, 14 deletions
diff --git a/selftest/selftesthelpers.py b/selftest/selftesthelpers.py
index ae0a756823..66402903b7 100644
--- a/selftest/selftesthelpers.py
+++ b/selftest/selftesthelpers.py
@@ -198,3 +198,14 @@ def plansmbtorture4testsuite(name, env, options, modname=None):
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"):
+ ret.append("--option=torture:progress=no")
+ if os.getenv("SELFTEST_QUICK"):
+ ret.append("--option=torture:quick=yes")
+ return ret
+
+
diff --git a/source3/selftest/tests.py b/source3/selftest/tests.py
index 01fbf0aee5..c4b2aeeba5 100755
--- a/source3/selftest/tests.py
+++ b/source3/selftest/tests.py
@@ -33,18 +33,17 @@ ntlm_auth = binpath('ntlm_auth3')
dbwrap_tool = binpath('dbwrap_tool')
vfstest = binpath('vfstest')
-torture_options = [configuration, "--maximum-runtime=$SELFTEST_MAXTIME",
- "--basedir=$SELFTEST_TMPDIR",
+torture_options = [configuration,
+ '--maximum-runtime=$SELFTEST_MAXTIME',
+ '--basedir=$SELFTEST_TMPDIR',
'--option="torture:winbindd_netbios_name=$SERVER"',
'--option="torture:winbindd_netbios_domain=$DOMAIN"',
'--option=torture:sharedelay=100000',
- '--option=torture:writetimeupdatedelay=500000' ]
+ '--option=torture:writetimeupdatedelay=500000',
+ '--format=subunit'
+ ]
-if not os.getenv("SELFTEST_VERBOSE"):
- torture_options.append("--option=torture:progress=no")
-torture_options.append("--format=subunit")
-if os.getenv("SELFTEST_QUICK"):
- torture_options.append("--option=torture:quick=yes")
+torture_options.extend(env_get_torture_options())
smbtorture4 += " " + " ".join(torture_options)
diff --git a/source4/selftest/tests.py b/source4/selftest/tests.py
index 7f10cd1652..b36f43bb4b 100755
--- a/source4/selftest/tests.py
+++ b/source4/selftest/tests.py
@@ -38,12 +38,12 @@ 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"]
-if not os.getenv("SELFTEST_VERBOSE"):
- torture_options.append("--option=torture:progress=no")
-torture_options.append("--format=subunit")
-if os.getenv("SELFTEST_QUICK"):
- torture_options.append("--option=torture:quick=yes")
+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)