From 3799f30f8b6fdecae2a38ac07be6c53c4942d0dd Mon Sep 17 00:00:00 2001 From: Trevor Shoe Date: Fri, 22 Nov 2024 18:03:41 -0500 Subject: [PATCH] [tests] Set windows abort behavior to crash in mock_process --- tests/mock_process.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/mock_process.cpp b/tests/mock_process.cpp index 1fb31d0f43..a69fffee2c 100644 --- a/tests/mock_process.cpp +++ b/tests/mock_process.cpp @@ -5,8 +5,9 @@ [[noreturn]] void crash() { #ifdef MULTIPASS_PLATFORM_WINDOWS - // Prevent Windows from making a dialogue box or reporting data. - _set_abort_behavior(0, _WRITE_ABORT_MSG | _CALL_REPORTFAULT); + // Prevent Windows from making a dialogue box and enable crash data reporting. + // If data reporting is not enabled, QProcess will always return NormalExit. + _set_abort_behavior(_CALL_REPORTFAULT, _WRITE_ABORT_MSG | _CALL_REPORTFAULT); #endif abort(); }