tests: Disable crash reporting in g_error() path in testing-helper

This avoids four coredumps being processed for every run of the
`testing` unit tests (which test `GTest`).

Signed-off-by: Philip Withnall <pwithnall@gnome.org>
This commit is contained in:
Philip Withnall 2024-01-18 15:23:53 +00:00
parent 5c05dfad97
commit 64e630e132

View File

@ -55,6 +55,9 @@ test_fail (void)
static void
test_error (void)
{
/* We expect this test to abort, so try to avoid that creating a coredump */
g_test_disable_crash_reporting ();
g_error ("This should error out\nBecause it's just\nwrong!");
}