selftest: don't hardcode '.python3' for extra-python tests
authorNoel Power <noel.power@suse.com>
Thu, 29 Nov 2018 21:18:07 +0000 (21:18 +0000)
committerNoel Power <npower@samba.org>
Mon, 10 Dec 2018 09:38:25 +0000 (10:38 +0100)
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 <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
selftest/selftesthelpers.py
source4/selftest/tests.py

index b0fc79bd18e1357a33b27c0364422cb7b9ff69ed..ebdae12866a7a74a87f8eb65b08d35aec1efd685 100644 (file)
@@ -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():
index 62ecd6edcff08c890bf81c67184123273ebfeb5c..e8ff47c5ef49d540317b91f90073dc22e1a05d70 100755 (executable)
@@ -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