mirror of
https://gitlab.eurecom.fr/oai/openairinterface5g.git
synced 2026-07-13 04:30:28 +00:00
fix(tests): fix some tests that call dlopen
Fix dft_test and nr_cuup_functional_test by adding CMAKE_BINARY_DIR to LD_LIBRARY_PATH. This allows running the tests with `ninja test` or `ctest -R` without modifying the environment manually. Signed-off-by: Bartosz Podrygajlo <bartosz.podrygajlo@openairinterface.org>
This commit is contained in:
@@ -23,6 +23,7 @@ target_link_libraries(dft_test minimal_lib shlib_loader SIMU m)
|
||||
add_dependencies(tests dft_test)
|
||||
add_dependencies(dft_test dfts) # trigger build of dfts (shared lib for DFT)
|
||||
add_test(NAME dft_test COMMAND ./dft_test)
|
||||
set_tests_properties(dft_test PROPERTIES ENVIRONMENT "LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}")
|
||||
|
||||
add_executable(test_vector_op test_vector_op.cpp)
|
||||
target_link_libraries(test_vector_op PRIVATE LOG minimal_lib)
|
||||
|
||||
@@ -13,4 +13,5 @@ if(ENABLE_TESTS)
|
||||
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/nr-cuup-functional-test.sh ${CMAKE_CURRENT_SOURCE_DIR}/load-test.conf
|
||||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
|
||||
)
|
||||
set_tests_properties(nr_cuup_functional_test PROPERTIES ENVIRONMENT "LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}")
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user