mirror of
https://gitlab.eurecom.fr/oai/openairinterface5g.git
synced 2026-07-13 04:30:28 +00:00
ctest: fix tests when compiling with sanitizers
When compiling with sanitizers that require LD_LIBRARY_PATH (see documentation), ctest could not drive tests as the executables did not find shared objects. Fix the directory to the current build directory to enable running with sanitizers. Signed-off-by: Robert Schmidt <robert.schmidt@openairinterface.org>
This commit is contained in:
@@ -39,7 +39,7 @@ function(add_physim_test test_name test_description test_exec)
|
||||
# pass test description also through environment variable: for cmake < 3.30,
|
||||
# in JSON export, we cannot recover the description otherwise
|
||||
# see also https://gitlab.kitware.com/cmake/cmake/-/issues/21490
|
||||
ENVIRONMENT "LD_LIBRARY_PATH=.;TEST_DESCRIPTION=${test_description}"
|
||||
ENVIRONMENT "LD_LIBRARY_PATH=${CMAKE_BINARY_DIR};TEST_DESCRIPTION=${test_description}"
|
||||
)
|
||||
set_tests_properties(${test_name} PROPERTIES CHECK_COUNT 0)
|
||||
add_dependencies(tests ${test_exec})
|
||||
|
||||
Reference in New Issue
Block a user