Skip to content

Commit

Permalink
tests: set environment LD_LIBRARY_PATH
Browse files Browse the repository at this point in the history
  • Loading branch information
pstorz committed Jan 2, 2018
1 parent 42659a6 commit 99276e6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
9 changes: 6 additions & 3 deletions src/findlib/unittests/CMakeLists.txt
Expand Up @@ -25,16 +25,19 @@ set (TEST_SRC
test_findlib.cc
)


add_executable(test_findlib
${TEST_SRC}
)
target_link_libraries(test_findlib
bareos bareosfind
bareosfind bareos
${JANSSON_LIBRARIES}
${CMOCKA_LIBRARIES}
)

add_test(NAME test_findlib
COMMAND test_findlib)
COMMAND "test_findlib"
)
set_property(TEST test_findlib
PROPERTY ENVIRONMENT "LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/src/lib:${CMAKE_BINARY_DIR}/src/findlib")

add_dependencies(check test_findlib)
6 changes: 5 additions & 1 deletion src/lib/unittests/CMakeLists.txt
Expand Up @@ -49,5 +49,9 @@ target_link_libraries(test_lib
)

add_test(NAME test_lib
COMMAND test_lib)
COMMAND test_lib
)
set_property(TEST test_lib
PROPERTY ENVIRONMENT "LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/src/lib")

add_dependencies(check test_lib)

0 comments on commit 99276e6

Please sign in to comment.