From: Andrew Bartlett Date: Fri, 15 Feb 2019 03:31:32 +0000 (+1300) Subject: selftest: Remove support for running multiple tests against python versions in a... X-Git-Tag: talloc-2.2.0~9 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=beda359bdd01fb944783a2cdffbdfc459c9f096b;p=thirdparty%2Fsamba.git selftest: Remove support for running multiple tests against python versions in a single run The extra_python support was added to aid the python3 transition Signed-off-by: Andrew Bartlett Reviewed-by: Douglas Bagnall --- diff --git a/selftest/selftesthelpers.py b/selftest/selftesthelpers.py index acce6d24cce..35c3acc2a05 100644 --- a/selftest/selftesthelpers.py +++ b/selftest/selftesthelpers.py @@ -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(): diff --git a/selftest/wscript b/selftest/wscript index 7d8300f055a..2fd38e20a4a 100644 --- a/selftest/wscript +++ b/selftest/wscript @@ -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|" ' + diff --git a/source4/selftest/tests.py b/source4/selftest/tests.py index c6355f3a41f..0af64934c0d 100755 --- a/source4/selftest/tests.py +++ b/source4/selftest/tests.py @@ -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