Commit 5099cd9f authored by Isaac Oscar Gariano's avatar Isaac Oscar Gariano

Attempt to fix test_rypthon

parent b287c95d
......@@ -153,7 +153,7 @@ testjit:otherops:
testjit:rpython:
stage: test
script:
- cd tests/test_jit; MU_LOG_LEVEL=info pytest test_rpython*.py -v --color=yes
- cd tests/test_jit; LD_LIBRARY_PATH=./emit:$LD_LIBRARY_PATH MU_LOG_LEVEL=info pytest test_rpython*.py -v --color=yes
testjit:som:
stage: test
......
......@@ -18,6 +18,10 @@ export RPYSOM=$CI_HOME/RPySOM
export PYPY=$CI_HOME/mu-client-pypy
export MUC=$CI_HOME/mu-tool-compiler/muc
if [ ! -d $MU_ZEBU/tests/test_jit/mu-client-pypy ]; then
ln -s $CI_HOME/mu-client-pypy $MU_ZEBU/tests/test_jit/
fi
if [ ! -d $CI_HOME/venv2 ]; then
virtualenv -p python2 $CI_HOME/venv2
source $CI_HOME/venv2/bin/activate
......
......@@ -102,7 +102,6 @@ def ctypes_fncptr_from_lib(libpath, fnc_name, argtypes=[], restype=ctypes.c_long
fnp.restype = restype
return fnp, lib
def rffi_fncptr_from_lib(libpath, fnc_name, llargtypes, restype, mode=ctypes.RTLD_GLOBAL):
from rpython.rtyper.lltypesystem import rffi
from rpython.translator.platform import platform
......@@ -113,6 +112,7 @@ def rffi_fncptr_from_lib(libpath, fnc_name, llargtypes, restype, mode=ctypes.RTL
libname = libpath.basename[3:libpath.basename.index(libext)]
if mode == ctypes.RTLD_GLOBAL:
sys.stderr.write(libpath.strpath)
lib = ctypes.CDLL(libpath.strpath, mode) # preload lib using RTLD_GLOBAL
return rffi.llexternal(fnc_name, llargtypes, restype,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment