Merge remote-tracking branch 'origin/ctest-physim-sanitizers' into integration_2026_w17 (!4069)
ctest: fix tests when compiling with sanitizers, ignore build directories, fix spsc_q build - Fix the directory to the current build directory to enable running with sanitizers with ctest - add build* to .gitignore to close #1074 - fix spsc_q compilation on non-C++23 compilers to close #1073
This commit is contained in:
@@ -7,6 +7,7 @@ cmake_targets/*/build/
|
|||||||
cmake_targets/ran_build/
|
cmake_targets/ran_build/
|
||||||
log/
|
log/
|
||||||
lte_build_oai/
|
lte_build_oai/
|
||||||
|
build*
|
||||||
|
|
||||||
# IDE files
|
# IDE files
|
||||||
.vscode
|
.vscode
|
||||||
|
|||||||
@@ -7,11 +7,13 @@
|
|||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <stdatomic.h>
|
|
||||||
|
|
||||||
#if defined(__cplusplus)
|
#if defined(__cplusplus)
|
||||||
|
#include <atomic>
|
||||||
// use atomic_size_t to help interworking with C++
|
// use atomic_size_t to help interworking with C++
|
||||||
using std::atomic_size_t;
|
using std::atomic_size_t;
|
||||||
|
#else
|
||||||
|
#include <stdatomic.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
typedef struct spsc_q {
|
typedef struct spsc_q {
|
||||||
|
|||||||
@@ -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,
|
# pass test description also through environment variable: for cmake < 3.30,
|
||||||
# in JSON export, we cannot recover the description otherwise
|
# in JSON export, we cannot recover the description otherwise
|
||||||
# see also https://gitlab.kitware.com/cmake/cmake/-/issues/21490
|
# 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)
|
set_tests_properties(${test_name} PROPERTIES CHECK_COUNT 0)
|
||||||
add_dependencies(tests ${test_exec})
|
add_dependencies(tests ${test_exec})
|
||||||
|
|||||||
Reference in New Issue
Block a user