From 1775201647a10923b9f73addf2304c3124350836 Mon Sep 17 00:00:00 2001 From: Dimitri Staessens Date: Fri, 23 Jan 2026 18:54:27 +0100 Subject: build: Add DISABLE_TESTS_CORE_DUMPS option We have a few that test that assertions are triggered. This adds a DISABLE_TESTS_CORE_DUMPS CMake build option (default ON) that disables core dumps for tests so they don't pollute the core cache. Signed-off-by: Dimitri Staessens Signed-off-by: Sander Vrijders --- cmake/utils/DisableTestLogging.cmake | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'cmake/utils/DisableTestLogging.cmake') diff --git a/cmake/utils/DisableTestLogging.cmake b/cmake/utils/DisableTestLogging.cmake index 730b0bc0..a7e90b38 100644 --- a/cmake/utils/DisableTestLogging.cmake +++ b/cmake/utils/DisableTestLogging.cmake @@ -5,8 +5,18 @@ else () message(STATUS "Ouroboros logging in test output enabled") endif () +set(DISABLE_TESTS_CORE_DUMPS TRUE CACHE BOOL "Enable core dumps for tests (useful for debugging)") +if (DISABLE_TESTS_CORE_DUMPS) + message(STATUS "Core dumps in tests enabled") +else () + message(STATUS "Core dumps in tests disabled") +endif () + macro(disable_test_logging_for_target target) if (DISABLE_TESTS_LOGGING) target_compile_definitions(${target} PRIVATE OUROBOROS_DISABLE_LOGGING) endif () + if (DISABLE_TESTS_CORE_DUMPS) + target_compile_definitions(${target} PRIVATE DISABLE_TESTS_CORE_DUMPS) + endif () endmacro() -- cgit v1.2.3