From d4f039a326f4758e48bf5bdfa0ade9cb11014f97 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Thu, 23 Apr 2026 13:56:13 +0200 Subject: [PATCH] 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 --- openair1/SIMULATION/tests/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openair1/SIMULATION/tests/CMakeLists.txt b/openair1/SIMULATION/tests/CMakeLists.txt index 2235cd2771..65bb102874 100644 --- a/openair1/SIMULATION/tests/CMakeLists.txt +++ b/openair1/SIMULATION/tests/CMakeLists.txt @@ -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})