Skip to content

Commit 65aa13d

Browse files
committed
DPL: run framework test through leaks on macos
1 parent 718d1cf commit 65aa13d

2 files changed

Lines changed: 19 additions & 0 deletions

File tree

‎Framework/Core/CMakeLists.txt‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,18 @@ target_link_libraries(o2-test-framework-core PRIVATE O2::Catch2)
280280
get_filename_component(outdir ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/../tests ABSOLUTE)
281281
set_property(TARGET o2-test-framework-core PROPERTY RUNTIME_OUTPUT_DIRECTORY ${outdir})
282282

283+
if(APPLE)
284+
add_custom_command(TARGET o2-test-framework-core POST_BUILD
285+
COMMAND codesign --force --sign - --entitlements ${CMAKE_CURRENT_SOURCE_DIR}/entitlements.plist $<TARGET_FILE:o2-test-framework-core>
286+
COMMENT "Re-signing o2-test-framework-core with debugging entitlements")
287+
# Leaks originating in third-party code (Cling JIT, FairMQ / boost::program_options)
288+
set(O2_FRAMEWORK_CORE_LEAKS_EXCLUDES
289+
"--exclude=llvm::orc::shared::runFinalizeActions(std::__1::vector<llvm::orc::shared::AllocActionCallPair, std::__1::allocator<llvm::orc::shared::AllocActionCallPair>>&)"
290+
"--exclude=fair::mq::ProgOptions::ParseAll(int, char const* const*, bool)")
291+
add_test(NAME framework:core COMMAND leaks --quiet ${O2_FRAMEWORK_CORE_LEAKS_EXCLUDES} --groupByType --atExit -- $<TARGET_FILE:o2-test-framework-core> --skip-benchmarks)
292+
else()
283293
add_test(NAME framework:core COMMAND o2-test-framework-core --skip-benchmarks)
294+
endif()
284295

285296
o2_add_test(AlgorithmWrapper NAME test_Framework_test_AlgorithmWrapper
286297
SOURCES test/test_AlgorithmWrapper.cxx

‎Framework/Core/entitlements.plist‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>com.apple.security.get-task-allow</key>
6+
<true/>
7+
</dict>
8+
</plist>

0 commit comments

Comments
 (0)