]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
test: fix run-rbd-tests test for cmake
authorMykola Golub <mgolub@mirantis.com>
Sun, 3 Jul 2016 18:43:17 +0000 (21:43 +0300)
committerMykola Golub <mgolub@mirantis.com>
Mon, 4 Jul 2016 19:32:29 +0000 (22:32 +0300)
Signed-off-by: Mykola Golub <mgolub@mirantis.com>
src/test/run-rbd-tests

index 187c6edf4cbc4ec1ff0556646ddea01184a861df..b4b5362694cf44884ab51f67a3bebc025d9bfbb5 100755 (executable)
@@ -2,13 +2,18 @@
 
 # this should be run from the src directory in the ceph.git
 
-CEPH_SRC=$(pwd)
-export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$CEPH_SRC/.libs"
+source $(dirname $0)/detect-build-env-vars.sh
+if [ -e CMakeCache.txt ]; then
+    CYTHON_MODULES_DIR=$CEPH_LIB/cython_modules
+else
+    CYTHON_MODULES_DIR=$CEPH_SRC/build
+fi
+
+CEPH_SRC=$CEPH_ROOT/src
 export PYTHONPATH="$CEPH_SRC/pybind:$CEPH_SRC/test/pybind"
-for x in $CEPH_SRC/build/lib* ; do
-  export PYTHONPATH="${PYTHONPATH}:${x}"
+for x in $CYTHON_MODULES_DIR/lib* ; do
+    PYTHONPATH="${PYTHONPATH}:${x}"
 done
-PATH="$CEPH_SRC:$PATH"
 
 recreate_pool() {
     POOL_NAME=$1