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: cmake related fixups for rbd tests #10124

Merged
merged 3 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
1 change: 0 additions & 1 deletion src/test/librbd/CMakeLists.txt
Expand Up @@ -88,7 +88,6 @@ add_executable(ceph_test_librbd
$<TARGET_OBJECTS:parse_secret_objs>
)
target_link_libraries(ceph_test_librbd
rados_test_stub
librados
rbd_test
rbd_api
Expand Down
15 changes: 10 additions & 5 deletions src/test/run-rbd-tests
Expand Up @@ -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
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tchaikov Ah, doing the last moment cleanup I wrongly moved this line below CYTHON_MODULES_DIR definition. I have created a fixup: #10134

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
Expand Down
10 changes: 5 additions & 5 deletions src/test/run-rbd-valgrind-unit-tests.sh
@@ -1,11 +1,11 @@
#!/bin/bash -ex

# this should be run from the src directory in the ceph.git
# this should be run from the src directory in the ceph.git (when built with
# automake) or cmake build directory

CEPH_SRC=$(pwd)
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$CEPH_SRC/.libs"
PATH="$CEPH_SRC:$PATH"
source $(dirname $0)/detect-build-env-vars.sh

RBD_FEATURES=13 valgrind --tool=memcheck --leak-check=full --suppressions=valgrind.supp unittest_librbd
RBD_FEATURES=13 valgrind --tool=memcheck --leak-check=full \
--suppressions=${CEPH_ROOT}/src/valgrind.supp unittest_librbd

echo OK