From 8f7ebaa6341ba790a3fae9e51585237175626413 Mon Sep 17 00:00:00 2001 From: Tomas Mlcoch Date: Tue, 2 Jul 2013 14:53:31 +0200 Subject: [PATCH] tests: Fix issue with missing rpath to libcreaterepo_c.so in tests while building for epel6 (CMake2.6). --- CMakeLists.txt | 1 - tests/python/tests/run_nosetests.sh.in | 2 +- tests/run_gtester.sh.in | 6 ++++++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1d5465e..733f1fd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -78,7 +78,6 @@ INSTALL(FILES createrepo_c.bash #message("Gen manpage") #execute_process(COMMAND bash gen_manpage.sh src/cmd_parser.c ../doc/ WORKING_DIRECTORY utils/) - # Add custom target for tests ADD_CUSTOM_TARGET(tests) diff --git a/tests/python/tests/run_nosetests.sh.in b/tests/python/tests/run_nosetests.sh.in index b1eeaa1..02c956b 100755 --- a/tests/python/tests/run_nosetests.sh.in +++ b/tests/python/tests/run_nosetests.sh.in @@ -1 +1 @@ -PYTHONPATH=${CMAKE_BINARY_DIR}/src/python/ nosetests -s -v ${CMAKE_CURRENT_SOURCE_DIR}/ +LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/src/: PYTHONPATH=${CMAKE_BINARY_DIR}/src/python/ nosetests -s -v ${CMAKE_CURRENT_SOURCE_DIR}/ diff --git a/tests/run_gtester.sh.in b/tests/run_gtester.sh.in index d2ec0d4..7dae2dd 100755 --- a/tests/run_gtester.sh.in +++ b/tests/run_gtester.sh.in @@ -3,6 +3,12 @@ BINDIR="${CMAKE_BINARY_DIR}/tests/" RET=0 +# Next line is a hack +# Builds for epel6 doesn't have rpath setted and +# tests fails with a "libcreaterepo_c.so.0: cannot open shared +# object file: No such file or directory" error message. +export "LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/src/:" + function runtest { gtester --verbose --keep-going "$1" if [ $? -ne 0 ]; then RET=$(($RET+1)) ; fi -- 2.7.4