From: Tomas Mlcoch Date: Tue, 2 Jul 2013 12:53:31 +0000 (+0200) Subject: tests: Fix issue with missing rpath to libcreaterepo_c.so in tests while building... X-Git-Tag: upstream/0.2.1~52 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8f7ebaa6341ba790a3fae9e51585237175626413;p=services%2Fcreaterepo_c.git tests: Fix issue with missing rpath to libcreaterepo_c.so in tests while building for epel6 (CMake2.6). --- 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