Changeset: e9058660d41a for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=e9058660d41a
Modified Files:
monetdb5/mal/mal.c
testing/Mtest.py.in
Branch: default
Log Message:
Merge with Apr2019 branch.
diffs (72 lines):
diff --git a/monetdb5/mal/mal.c b/monetdb5/mal/mal.c
--- a/monetdb5/mal/mal.c
+++ b/monetdb5/mal/mal.c
@@ -90,7 +90,7 @@ int mal_init(void){
MT_lock_init( &mal_copyLock, "mal_copyLock");
MT_lock_init( &mal_delayLock, "mal_delayLock");
MT_lock_init( &mal_beatLock, "mal_beatLock");
- MT_lock_init( &mal_oltpLock, "mal_beatLock");
+ MT_lock_init( &mal_oltpLock, "mal_oltpLock");
#endif
/* Any error encountered here terminates the process
diff --git a/testing/Mtest.py.in b/testing/Mtest.py.in
--- a/testing/Mtest.py.in
+++ b/testing/Mtest.py.in
@@ -32,6 +32,14 @@ import struct
import signal
import fnmatch
import glob
+try:
+ import winreg # Python 3 on Windows
+except ImportError:
+ try:
+ import _winreg as winreg # Python 2 on Windows
+ except ImportError:
+ winreg = None # not on Windows
+
procdebug = False
verbose = False
@@ -2988,11 +2996,32 @@ def DoIt(env, SERVER, CALL, TST, EXT, PR
if (not all_tests or (COND != None and "HAVE_LIBR" in COND)) and
CONDITIONALS['HAVE_LIBR'] and CONDITIONALS['NOT_WIN32']:
Srvr.extend(['--set', 'embedded_r=yes'])
+ savepath = None
if (COND != None and "HAVE_LIBPY3" in COND) and
CONDITIONALS['HAVE_LIBPY3']:
# enable Python 3 integration in server
+ if winreg is not None:
+ try:
+ with winreg.OpenKey(winreg.HKEY_LOCAL_MACHINE,
r'SOFTWARE\Python\PythonCore\3.7\InstallPath') as key:
+ instpath = winreg.QueryValue(key, None)
+ os.environ['PYTHONHOME'] = instpath
+ os.environ['PYTHONPATH'] = instpath + 'Lib'
+ savepath = os.environ['PATH']
+ os.environ['PATH'] = instpath.rstrip('\\') +
os.pathsep + savepath
+ except WindowsError:
+ pass
Srvr.extend(['--set', 'embedded_py=3'])
elif (not all_tests or (COND != None and "HAVE_LIBPY" in COND))
and CONDITIONALS['HAVE_LIBPY']:
# enable Python integration in server
+ if winreg is not None:
+ try:
+ with winreg.OpenKey(winreg.HKEY_LOCAL_MACHINE,
r'SOFTWARE\Python\PythonCore\2.7\InstallPath') as key:
+ instpath = winreg.QueryValue(key, None)
+ os.environ['PYTHONHOME'] = instpath
+ os.environ['PYTHONPATH'] = instpath + 'Lib'
+ savepath = os.environ['PATH']
+ os.environ['PATH'] = instpath.rstrip('\\') +
os.pathsep + savepath
+ except WindowsError:
+ pass
Srvr.extend(['--set', 'embedded_py=2'])
# enable C integration in server
@@ -3000,6 +3029,8 @@ def DoIt(env, SERVER, CALL, TST, EXT, PR
pSrvr, pSrvrTimer = LaunchIt(Srvr,
'\nio.printf("\\nReady.\\n");\n', SrvrOut, SrvrErr, TIMEOUT)
+ if savepath is not None:
+ os.environ['PATH'] = savepath
ln="dummy"
while 0 < len(ln) and not ln.startswith('Ready.'):
ln=pSrvr.stdout.readline()
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list