tests: Fix issue with missing rpath to libcreaterepo_c.so in tests while building...
authorTomas Mlcoch <tmlcoch@redhat.com>
Tue, 2 Jul 2013 12:53:31 +0000 (14:53 +0200)
committerTomas Mlcoch <tmlcoch@redhat.com>
Tue, 2 Jul 2013 14:04:58 +0000 (16:04 +0200)
CMakeLists.txt
tests/python/tests/run_nosetests.sh.in
tests/run_gtester.sh.in

index 1d5465e..733f1fd 100644 (file)
@@ -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)
index b1eeaa1..02c956b 100755 (executable)
@@ -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}/
index d2ec0d4..7dae2dd 100755 (executable)
@@ -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