Changeset: 160ae2f8a07d for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/160ae2f8a07d
Modified Files:
        sql/test/mapi/Tests/python3_dbapi.SQL.bat
        sql/test/mapi/Tests/python3_dbapi.SQL.sh
        sql/test/mapi/Tests/python3_dec38.SQL.bat
        sql/test/mapi/Tests/python3_dec38.SQL.sh
        sql/test/mapi/Tests/python3_int128.SQL.bat
        sql/test/mapi/Tests/python3_int128.SQL.sh
        testing/Mtest.py.in
        testing/Mz.py.in
Branch: Jul2021
Log Message:

We'll always have a Python, and it's in sys.executable.


diffs (160 lines):

diff --git a/sql/test/mapi/Tests/python3_dbapi.SQL.bat 
b/sql/test/mapi/Tests/python3_dbapi.SQL.bat
--- a/sql/test/mapi/Tests/python3_dbapi.SQL.bat
+++ b/sql/test/mapi/Tests/python3_dbapi.SQL.bat
@@ -3,8 +3,5 @@
 rem must be aligned with the installation directory chosen in
 rem clients/examples/python
 set testpath=%TSTSRCBASE%\clients\examples\python
-rem ignore PYTHONPATH from Mtest, it is hardcoded to the dirs for the
-rem Python that runs Mtest
-set PYTHONPATH=%PYTHON3PATH%
 
-"%PYTHON3%" "%testpath%/sqlsample.py" %MAPIPORT% %TSTDB% %MAPIHOST%
+"%PYTHON%" "%testpath%/sqlsample.py" %MAPIPORT% %TSTDB% %MAPIHOST%
diff --git a/sql/test/mapi/Tests/python3_dbapi.SQL.sh 
b/sql/test/mapi/Tests/python3_dbapi.SQL.sh
--- a/sql/test/mapi/Tests/python3_dbapi.SQL.sh
+++ b/sql/test/mapi/Tests/python3_dbapi.SQL.sh
@@ -3,9 +3,5 @@
 # must be aligned with the installation directory chosen in
 # clients/examples/python
 testpath="$TSTSRCBASE/clients/examples/python"
-# ignore PYTHONPATH from Mtest, it is hardcoded to the dirs for the
-# Python that runs Mtest
-PYTHONPATH=${PYTHON3PATH}
-export PYTHONPATH
 
-${PYTHON3} ${testpath}/sqlsample.py $MAPIPORT $TSTDB $MAPIHOST
+${PYTHON} ${testpath}/sqlsample.py $MAPIPORT $TSTDB $MAPIHOST
diff --git a/sql/test/mapi/Tests/python3_dec38.SQL.bat 
b/sql/test/mapi/Tests/python3_dec38.SQL.bat
--- a/sql/test/mapi/Tests/python3_dec38.SQL.bat
+++ b/sql/test/mapi/Tests/python3_dec38.SQL.bat
@@ -3,10 +3,7 @@
 rem must be aligned with the installation directory chosen in
 rem clients/python/test/Makefile.ag
 set testpath=%TSTSRCDIR%
-rem ignore PYTHONPATH from Mtest, it is hardcoded to the dirs for the
-rem Python that runs Mtest (currently always Python 3)
-set PYTHONPATH=%testpath%;%PYTHON3PATH%
 
 prompt # $t $g  
 
-"%PYTHON3%" "%testpath%/python_dec38.py %MAPIPORT% %TSTDB% %MAPIHOST%"
+"%PYTHON%" "%testpath%/python_dec38.py %MAPIPORT% %TSTDB% %MAPIHOST%"
diff --git a/sql/test/mapi/Tests/python3_dec38.SQL.sh 
b/sql/test/mapi/Tests/python3_dec38.SQL.sh
--- a/sql/test/mapi/Tests/python3_dec38.SQL.sh
+++ b/sql/test/mapi/Tests/python3_dec38.SQL.sh
@@ -3,9 +3,5 @@
 # must be aligned with the installation directory chosen in
 # clients/python/test/Makefile.ag
 testpath="$TSTSRCDIR"
-# ignore PYTHONPATH from Mtest, it is hardcoded to the dirs for the
-# Python that runs Mtest (currently always Python 3)
-PYTHONPATH=$testpath:${PYTHON3PATH}
-export PYTHONPATH
 
-${PYTHON3} $testpath/python_dec38.py $MAPIPORT $TSTDB $MAPIHOST
+${PYTHON} $testpath/python_dec38.py $MAPIPORT $TSTDB $MAPIHOST
diff --git a/sql/test/mapi/Tests/python3_int128.SQL.bat 
b/sql/test/mapi/Tests/python3_int128.SQL.bat
--- a/sql/test/mapi/Tests/python3_int128.SQL.bat
+++ b/sql/test/mapi/Tests/python3_int128.SQL.bat
@@ -3,10 +3,7 @@
 rem must be aligned with the installation directory chosen in
 rem clients/python/test/Makefile.ag
 set testpath=%TSTSRCDIR%
-rem ignore PYTHONPATH from Mtest, it is hardcoded to the dirs for the
-rem Python that runs Mtest (currently always Python 3)
-set PYTHONPATH=%testpath%;%PYTHON3PATH%
 
 prompt # $t $g  
 
-"%PYTHON3%" "%testpath%/python_int128.py %MAPIPORT% %TSTDB% %MAPIHOST%"
+"%PYTHON%" "%testpath%/python_int128.py %MAPIPORT% %TSTDB% %MAPIHOST%"
diff --git a/sql/test/mapi/Tests/python3_int128.SQL.sh 
b/sql/test/mapi/Tests/python3_int128.SQL.sh
--- a/sql/test/mapi/Tests/python3_int128.SQL.sh
+++ b/sql/test/mapi/Tests/python3_int128.SQL.sh
@@ -3,9 +3,5 @@
 # must be aligned with the installation directory chosen in
 # clients/python/test/Makefile.ag
 testpath="$TSTSRCDIR"
-# ignore PYTHONPATH from Mtest, it is hardcoded to the dirs for the
-# Python that runs Mtest (currently always Python 3)
-PYTHONPATH=$testpath:${PYTHON3PATH}
-export PYTHONPATH
 
-${PYTHON3} $testpath/python_int128.py $MAPIPORT $TSTDB $MAPIHOST
+${PYTHON} $testpath/python_int128.py $MAPIPORT $TSTDB $MAPIHOST
diff --git a/testing/Mtest.py.in b/testing/Mtest.py.in
--- a/testing/Mtest.py.in
+++ b/testing/Mtest.py.in
@@ -2044,9 +2044,6 @@ def RunTest(env, TST, COND, oktests, len
     elif EXT == ".malS" and not env['exe']['mserver5'][0]:
         reason = "as %s is not available." % env['MSERVER'].split(None, 1)[0]
         elem = SkipTest(env, TST, EXT, reason, length)
-    elif CALL == "python"  and  not env['exe']['python'][0]:
-        reason = "as python is not available."
-        elem = SkipTest(env, TST, EXT, reason, length)
         #TODO:
         #elif [ "$EXT" = "java"  -a  ! "`type -path java`" ] ; then
         #elem = SkipTest(env, TST, EXT, "as java is not in $PATH.", length)
@@ -2786,7 +2783,7 @@ def DoIt(env, SERVER, CALL, TST, EXT, Te
                 cmd = [os.path.join(".", TST + EXT), TST]
                 returncode = RunIt(cmd, False, "", ClntOut, ClntErr, TIMEOUT)
             elif CALL == "python":
-                cmd = splitcommand(exe['python'][1]) + [TST + EXT, TST]
+                cmd = [sys.executable, TST + EXT, TST]
                 returncode = RunIt(cmd, False, "", ClntOut, ClntErr, TIMEOUT)
             elif CALL in ["mal", "malXs"]:
                 TSTs = []
@@ -3484,6 +3481,7 @@ def main(argv) :
     # hence, we set them at runtime.
     # X == true   =>  @X_TRUE@='',  @X_FALSE@='#'
     # X == false  =>  @X_TRUE@='#', @X_FALSE@=''
+    os.environ['PYTHON'] = sys.executable
     try:
         import pymonetdb
     except ImportError:
@@ -3759,7 +3757,6 @@ def main(argv) :
         exe = {}
         exe['mserver5']       = CheckExec('mserver5')     , '%s mserver5 
--debug=%s --set gdk_nr_threads=%s %s --set mapi_listenaddr=all --set 
mapi_port=0 %s %s %s' % \
                                                                (env['setDBG'], 
env['GDK_DEBUG'], env['GDK_NR_THREADS'], env['setMONETDB_MOD_PATH'], SOCK, not 
nomito and '--forcemito' or '', env['MSERVER_SET'])
-        exe['python']        = CheckExec(sys.executable) , sys.executable
         exe['ruby_client']   = CheckExec(env['RUBYCLIENT'].split(None, 1)[0])  
 , '%s %s' % (env['RUBYCLIENT'], '${PORT}')
         exe['MAL_Client']    = CheckExec(env['MALCLIENT'].split(None, 1)[0])  
, '%s --host=%s --port=%s' % (env['MALCLIENT'], HOST, '${PORT}')
         exe['SQL_Client']    = CheckExec(env['SQLCLIENT'].split(None, 1)[0])   
, '%s -i -e --host=%s --port=%s' % (env['SQLCLIENT'], HOST, '${PORT}')
diff --git a/testing/Mz.py.in b/testing/Mz.py.in
--- a/testing/Mz.py.in
+++ b/testing/Mz.py.in
@@ -1120,8 +1120,6 @@ def RunTest(env, test, oktests, pSrvr):
         reason = "as %s is not available." % env['MSERVER'].split(None, 1)[0]
     elif EXT == ".malS" and not env['exe']['mserver5'][0]:
         reason = "as %s is not available." % env['MSERVER'].split(None, 1)[0]
-    elif CALL == "python"  and  not env['exe']['python'][0]:
-        reason = "as python is not available."
         #TODO:
         #elif [ "$EXT" = "java"  -a  ! "`type -path java`" ] ; then
     elif MissingMods:
@@ -1665,7 +1663,7 @@ def DoIt(env, SERVER, CALL, TST, EXT, Te
                 cmd = [os.path.join(".", TST + EXT), TST]
                 returncode = RunIt(cmd, False, "", ClntOut, ClntErr, TIMEOUT)
             elif CALL == "python":
-                cmd = splitcommand(exe['python'][1]) + [TST + EXT, TST]
+                cmd = [sys.executable, TST + EXT, TST]
                 returncode = RunIt(cmd, False, "", ClntOut, ClntErr, TIMEOUT)
             elif CALL in ["mal", "malXs"]:
                 TSTs = []
@@ -2341,6 +2339,7 @@ def main(argv) :
             print("%s = %s" % (v, str(par[v])))
     STDOUT.flush()
 
+    os.environ['PYTHON'] = sys.executable
     try:
         import lz4
     except ImportError:
@@ -2571,7 +2570,6 @@ def main(argv) :
         exe = {}
         exe['mserver5']       = CheckExec('mserver5')     , '%s mserver5 
--debug=%s --set gdk_nr_threads=%s %s --set mapi_listenaddr=all --set 
mapi_port=0 %s %s %s' % \
                                                                (env['setDBG'], 
env['GDK_DEBUG'], env['GDK_NR_THREADS'], env['setMONETDB_MOD_PATH'], SOCK, not 
nomito and '--forcemito' or '', env['MSERVER_SET'])
-        exe['python']        = CheckExec(sys.executable) , sys.executable
         exe['ruby_client']   = CheckExec(env['RUBYCLIENT'].split(None, 1)[0])  
 , '%s %s' % (env['RUBYCLIENT'], '${PORT}')
         exe['MAL_Client']    = CheckExec(env['MALCLIENT'].split(None, 1)[0])  
, '%s --host=%s --port=%s' % (env['MALCLIENT'], HOST, '${PORT}')
         exe['SQL_Client']    = CheckExec(env['SQLCLIENT'].split(None, 1)[0])   
, '%s -i -e --host=%s --port=%s' % (env['SQLCLIENT'], HOST, '${PORT}')
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to