Skip to content

Commit

Permalink
[tests] Set windows abort behavior to crash in mock_process
Browse files Browse the repository at this point in the history
  • Loading branch information
Sploder12 committed Nov 22, 2024
1 parent 155bc3a commit 3799f30
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/mock_process.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down

0 comments on commit 3799f30

Please sign in to comment.