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:
Bartosz Podrygajlo
2026-05-27 15:37:41 +02:00
parent 275df8c175
commit 04ced37be6
2 changed files with 2 additions and 0 deletions

View File

@@ -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)

View File

@@ -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()