summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorEmmanuel Dreyfus <manu@netbsd.org>2014-11-07 15:21:45 +0100
committerVijay Bellur <vbellur@redhat.com>2014-11-16 23:06:25 -0800
commit3df2cbdf32891237fee360e2003c2f659d08f63e (patch)
treeafa3f5cff074b03aed7ebc19797c142212e5411a /tests
parentff4d4030b9ad58b706fe2017cb3f426eb7bec77e (diff)
glupy: portability fixes
Fixes portability problems so that NetBSD passes tests/features/glupy.t - Use python-config to detect python build environment on all systems, not just Linux and Darwin. - Get the site-package directory from python and make sure we install glupy.py there, Previously we installed within glusterfs prefix, which caused a problem if it was different that python's prefix. - Set PYTHONPATH for tests so that the detected site-packages is used in python's search path. This should be useless, but let us have it just in case. - Pass glupy.so path from glusterfsd to glupy.py through an environment variable and use it in CDLL instead of "", as the later seems not portable (at least it fails on NetBSD). - Use gil_init_key pthread_getspecific to avoid deadlocks (that code was #ifdef out, perhaps because it was not needed on Linux, but it seems to be required for NetBSD. - Recover the error message from Python and send it to the logs to help debugging problems. Backport of: http://review.gluster.org/8978 This is the same patchset as previously submitted to retrigger regression tests after a spurious failure. BUG: 1138897 Change-Id: I1e23ba5cc18f129ee1032f905cb053953b683a81 Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org> Reviewed-on: http://review.gluster.org/8980 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/env.rc.in5
-rwxr-xr-xtests/features/glupy.t1
2 files changed, 5 insertions, 1 deletions
diff --git a/tests/env.rc.in b/tests/env.rc.in
index 000a80f18fb..1850b7a36f6 100644
--- a/tests/env.rc.in
+++ b/tests/env.rc.in
@@ -8,4 +8,7 @@ LD_LIBRARY_PATH=@libdir@:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH
GLUSTERD_WORKDIR=@GLUSTERD_WORKDIR@
-export GLUSTERD_WORKDIR \ No newline at end of file
+export GLUSTERD_WORKDIR
+
+PYTHONPATH=@BUILD_PYTHON_SITE_PACKAGES@:$PYTHON_PATH
+export PYTHONPATH
diff --git a/tests/features/glupy.t b/tests/features/glupy.t
index a34e48ffec0..8b79a148d4d 100755
--- a/tests/features/glupy.t
+++ b/tests/features/glupy.t
@@ -3,6 +3,7 @@
. $(dirname $0)/../include.rc
. $(dirname $0)/../volume.rc
+echo $PYTHON_PATH >&2
cleanup;
TEST mkdir -p $B0/glupytest