From: Noel Power Date: Thu, 29 Nov 2018 21:18:07 +0000 (+0000) Subject: selftest: don't hardcode '.python3' for extra-python tests X-Git-Tag: tdb-1.3.17~400 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e3c37bbad4f45124a4ae7316a67e4c223e16faf1;p=thirdparty%2Fsamba.git selftest: don't hardcode '.python3' for extra-python tests Instead of hardcoding '.python3' we now hardcode the extra python exe (which will be python2 for a default python3 build) Signed-off-by: Noel Power Reviewed-by: Andrew Bartlett --- diff --git a/selftest/selftesthelpers.py b/selftest/selftesthelpers.py index b0fc79bd18e..ebdae12866a 100644 --- a/selftest/selftesthelpers.py +++ b/selftest/selftesthelpers.py @@ -150,7 +150,8 @@ def planpythontestsuite(env, module, name=None, extra_path=None, if py3_compatible and extra_python is not None: # Plan one more test for Python 3 compatible module args[0] = extra_python - plantestsuite_loadlist(name + ".python3", env, pypath + args) + python_name = os.path.basename(extra_python) + plantestsuite_loadlist(name + "." + python_name, env, pypath + args) def get_env_torture_options(): diff --git a/source4/selftest/tests.py b/source4/selftest/tests.py index 62ecd6edcff..e8ff47c5ef4 100755 --- a/source4/selftest/tests.py +++ b/source4/selftest/tests.py @@ -625,7 +625,8 @@ def planoldpythontestsuite(env, module, name=None, extra_path=[], environ={}, ex plantestsuite_loadlist(name, env, args) if py3_compatible and extra_python is not None: args[args.index(subunitrun)] = subunitrun3 - plantestsuite_loadlist(name + ".python3", env, args) + 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