From: Jason Dillaman Date: Thu, 30 Jun 2016 20:59:19 +0000 (-0400) Subject: qa/workunits/rbd: fix issues under cmake build environment X-Git-Tag: ses5-milestone5~507^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F10076%2Fhead;p=ceph.git qa/workunits/rbd: fix issues under cmake build environment Signed-off-by: Jason Dillaman --- diff --git a/qa/workunits/rbd/rbd_mirror_helpers.sh b/qa/workunits/rbd/rbd_mirror_helpers.sh index 9478cc8f9d1c2..307705eacda20 100755 --- a/qa/workunits/rbd/rbd_mirror_helpers.sh +++ b/qa/workunits/rbd/rbd_mirror_helpers.sh @@ -64,9 +64,24 @@ CLUSTER1=cluster1 CLUSTER2=cluster2 POOL=mirror PARENT_POOL=mirror_parent -SRC_DIR=$(readlink -f $(dirname $0)/../../../src) TEMPDIR= +CEPH_ROOT=$(readlink -f $(dirname $0)/../../../src) +CEPH_BIN=. +CEPH_SRC=. +if [ -e CMakeCache.txt ]; then + CEPH_SRC=${CEPH_ROOT} + CEPH_ROOT=${PWD} + CEPH_BIN=./bin + + # needed for ceph CLI under cmake + export LD_LIBRARY_PATH=${CEPH_ROOT}/lib:${LD_LIBRARY_PATH} + export PYTHONPATH=${PYTHONPATH}:${CEPH_SRC}/pybind + for x in ${CEPH_ROOT}/lib/cython_modules/lib* ; do + export PYTHONPATH="${PYTHONPATH}:${x}" + done +fi + # These vars facilitate running this script in an environment with # ceph installed from packages, like teuthology. These are not defined # by default. @@ -121,9 +136,9 @@ setup() fi if [ -z "${RBD_MIRROR_USE_EXISTING_CLUSTER}" ]; then - cd ${SRC_DIR} - ./mstart.sh ${CLUSTER1} -n - ./mstart.sh ${CLUSTER2} -n + cd ${CEPH_ROOT} + ${CEPH_SRC}/mstart.sh ${CLUSTER1} -n + ${CEPH_SRC}/mstart.sh ${CLUSTER2} -n ln -s $(readlink -f run/${CLUSTER1}/ceph.conf) \ ${TEMPDIR}/${CLUSTER1}.conf @@ -159,9 +174,9 @@ cleanup() stop_mirror "${CLUSTER2}" if [ -z "${RBD_MIRROR_USE_EXISTING_CLUSTER}" ]; then - cd ${SRC_DIR} - ./mstop.sh ${CLUSTER1} - ./mstop.sh ${CLUSTER2} + cd ${CEPH_ROOT} + ${CEPH_SRC}/mstop.sh ${CLUSTER1} + ${CEPH_SRC}/mstop.sh ${CLUSTER2} else ceph --cluster ${CLUSTER1} osd pool rm ${POOL} ${POOL} --yes-i-really-really-mean-it ceph --cluster ${CLUSTER2} osd pool rm ${POOL} ${POOL} --yes-i-really-really-mean-it