selftest: Actually run python3 tests during the selftest
authorAndrew Bartlett <abartlet@samba.org>
Tue, 2 May 2017 10:55:45 +0000 (12:55 +0200)
committerAndrew Bartlett <abartlet@samba.org>
Sat, 20 May 2017 00:26:33 +0000 (02:26 +0200)
These previously only ran if the develper was using EXTRA_PYTHON in their
OS environment

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Sat May 20 02:26:33 CEST 2017 on sn-devel-144

selftest/selftesthelpers.py
selftest/wscript

index 6b22a16bfa570f4a3860b4dab7c508e2a54345fe..8b885b59419cb27f1a76633c0e31edaf5f27f2ea 100644 (file)
@@ -140,7 +140,7 @@ def planpythontestsuite(env, module, name=None, extra_path=[], py3_compatible=Fa
     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, env, args)
+        plantestsuite_loadlist(name + ".python3", env, args)
 
 
 def get_env_torture_options():
index 2299195428f24a60d26cd991d38cd01f6a98f375..d8094af1cdcc58a96e5aca74ce6445b8520d9644 100644 (file)
@@ -209,6 +209,10 @@ 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|" ' +