selftest: Remove support for running multiple tests against python versions in a...
authorAndrew Bartlett <abartlet@samba.org>
Fri, 15 Feb 2019 03:31:32 +0000 (16:31 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Thu, 21 Mar 2019 04:06:15 +0000 (04:06 +0000)
The extra_python support was added to aid the python3 transition

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
selftest/selftesthelpers.py
selftest/wscript
source4/selftest/tests.py

index acce6d24ccefe5b0cdf21a9443a7bf8468caf7a8..35c3acc2a054311c1b8d6b8dcd4cd33dcb13d330 100644 (file)
@@ -53,7 +53,6 @@ else:
     has_perl_test_more = False
 
 python = os.getenv("PYTHON", "python")
-extra_python = os.getenv("EXTRA_PYTHON", None)
 
 tap2subunit = python + " " + os.path.join(srcdir(), "selftest", "tap2subunit")
 
@@ -147,11 +146,6 @@ def planpythontestsuite(env, module, name=None, extra_path=None,
         pypath = []
 
     plantestsuite_loadlist(name, env, pypath + args)
-    if py3_compatible and extra_python is not None:
-        # Plan one more test for Python 3 compatible module
-        args[0] = extra_python
-        python_name = os.path.basename(extra_python)
-        plantestsuite_loadlist(name + "." + python_name, env, pypath + args)
 
 
 def get_env_torture_options():
index 7d8300f055a2730c0651c75eeb0d58e6f853cc54..2fd38e20a4ad6d6a9450709a3d8d9620d36fc6f5 100644 (file)
@@ -243,10 +243,6 @@ def cmd_testonly(opt):
         env.TESTLISTS = '--testlist=%r' % Options.options.TEST_LIST
     elif Options.options.PERF_TEST:
         env.TESTLISTS = '--testlist="${PYTHON} ${srcdir}/selftest/perf_tests.py|" '
-    elif CONFIG_SET(opt, 'EXTRA_PYTHON'):
-        env.TESTLISTS = ('--testlist="EXTRA_PYTHON=${EXTRA_PYTHON} ${PYTHON} ${srcdir}/selftest/tests.py|" ' +
-                         '--testlist="EXTRA_PYTHON=${EXTRA_PYTHON} ${PYTHON} ${srcdir}/source3/selftest/tests.py|" ' +
-                         '--testlist="EXTRA_PYTHON=${EXTRA_PYTHON} ${PYTHON} ${srcdir}/source4/selftest/tests.py|"')
     else:
         env.TESTLISTS = ('--testlist="${PYTHON} ${srcdir}/selftest/tests.py|" ' +
                          '--testlist="${PYTHON} ${srcdir}/source3/selftest/tests.py|" ' +
index c6355f3a41fa1a87592584805d7d176148c5bcb2..0af64934c0dcc221ae40b45fad7b9a5003ff6cd2 100755 (executable)
@@ -26,7 +26,7 @@ import selftesthelpers
 from selftesthelpers import bindir, srcdir, binpath, python
 from selftesthelpers import configuration, plantestsuite
 from selftesthelpers import planpythontestsuite, planperltestsuite
-from selftesthelpers import plantestsuite_loadlist, extra_python
+from selftesthelpers import plantestsuite_loadlist
 from selftesthelpers import skiptestsuite, source4dir, valgrindify
 from selftesthelpers import smbtorture4_options, smbtorture4_testsuites
 from selftesthelpers import smbtorture4, ntlm_auth3, samba3srcdir
@@ -609,8 +609,6 @@ for env in ["ad_dc:local", "s4member:local", "nt4_dc:local", "ad_member:local",
         skiptestsuite("samba.nss.test using winbind(%s)" % env, "nsstest not available")
 
 subunitrun = valgrindify(python) + " " + os.path.join(samba4srcdir, "scripting/bin/subunitrun")
-if extra_python is not None:
-    subunitrun3 = valgrindify(extra_python) + " " + os.path.join(samba4srcdir, "scripting/bin/subunitrun")
 
 
 def planoldpythontestsuite(env, module, name=None, extra_path=[], environ={}, extra_args=[], py3_compatible=False):
@@ -624,10 +622,6 @@ def planoldpythontestsuite(env, module, name=None, extra_path=[], environ={}, ex
     if name is None:
         name = module
     plantestsuite_loadlist(name, env, args)
-    if py3_compatible and extra_python is not None:
-        args[args.index(subunitrun)] = subunitrun3
-        python_name = os.path.basename(extra_python)
-        plantestsuite_loadlist(name + "." + python_name, env, args)
 
 # Run complex search expressions test once for each database backend.
 # Right now ad_dc has mdb and ad_dc_ntvfs has tdb