summaryrefslogtreecommitdiffstats
path: root/tests/features/ipctest.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/features/ipctest.py')
-rwxr-xr-xtests/features/ipctest.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/features/ipctest.py b/tests/features/ipctest.py
index 0592bae3bbc..857225fe0a5 100755
--- a/tests/features/ipctest.py
+++ b/tests/features/ipctest.py
@@ -3,7 +3,13 @@
import ctypes
import ctypes.util
-api = ctypes.CDLL(ctypes.util.find_library("gfapi"))
+# find_library does not lookup LD_LIBRARY_PATH and may miss the
+# function. In that case, retry with less portable but explicit name.
+libgfapi = ctypes.util.find_library("gfapi")
+if libgfapi == None:
+ libgfapi = "libgfapi.so"
+api = ctypes.CDLL(libgfapi,mode=ctypes.RTLD_GLOBAL)
+
api.glfs_ipc.argtypes = [ ctypes.c_void_p, ctypes.c_int ]
api.glfs_ipc.restype = ctypes.c_int