Skip to content

Commit

Permalink
Always test with address sanitizer a few base classes
Browse files Browse the repository at this point in the history
  • Loading branch information
ktf committed Jun 28, 2024
1 parent 3bfcfad commit 594c6ba
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions Framework/Core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,17 @@ o2_target_root_dictionary(Framework
include/Framework/StepTHn.h
LINKDEF test/FrameworkCoreTestLinkDef.h)

add_executable(o2-test-framework-core-sanitized
test/test_Variants.cxx
src/Array2D.cxx
src/Variant.cxx
)

target_link_libraries(o2-test-framework-core-sanitized PRIVATE O2::Catch2 O2::FrameworkFoundation Boost::boost RapidJSON::RapidJSON)
target_include_directories(o2-test-framework-core-sanitized PRIVATE ${CMAKE_CURRENT_LIST_DIR}/include O2::FrameworkFoundation)
target_compile_options(o2-test-framework-core-sanitized PRIVATE -fsanitize=address)
target_link_options(o2-test-framework-core-sanitized PRIVATE -fsanitize=address)

add_executable(o2-test-framework-core
test/test_AlgorithmSpec.cxx
test/test_AnalysisTask.cxx
Expand Down Expand Up @@ -251,8 +262,10 @@ target_link_libraries(o2-test-framework-core PRIVATE O2::Catch2)

get_filename_component(outdir ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/../tests ABSOLUTE)
set_property(TARGET o2-test-framework-core PROPERTY RUNTIME_OUTPUT_DIRECTORY ${outdir})
set_property(TARGET o2-test-framework-core-sanitized PROPERTY RUNTIME_OUTPUT_DIRECTORY ${outdir})

add_test(NAME framework:core COMMAND o2-test-framework-core --skip-benchmarks)
add_test(NAME framework:sanitized COMMAND o2-test-framework-core-sanitized --skip-benchmarks)

o2_add_test(AlgorithmWrapper NAME test_Framework_test_AlgorithmWrapper
SOURCES test/test_AlgorithmWrapper.cxx
Expand Down

0 comments on commit 594c6ba

Please sign in to comment.