Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: fix rbd-mirror workunit test cases for cmake #10076

Merged
merged 2 commits into from Jul 5, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
29 changes: 22 additions & 7 deletions qa/workunits/rbd/rbd_mirror_helpers.sh
Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/vstart.sh
Expand Up @@ -12,8 +12,8 @@ if [ -n "$VSTART_DEST" ]; then
CEPH_LIB=$SRC_PATH/.libs

if [ -e CMakeCache.txt ]; then
CEPH_BIN=$VSTART_DEST/../../bin
CEPH_LIB=$VSTART_DEST/../../lib
CEPH_BIN=${PWD}/bin
CEPH_LIB=${PWD}/lib
fi

CEPH_CONF_PATH=$VSTART_DEST
Expand Down