mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-01-06 20:10:22 +01:00
Test runner: Add some Win32-specific implementations
Disable error message boxes in tests, enable termination on heap corruption, and check if running under a debugger.
This commit is contained in:
parent
bc84f415bb
commit
586c102a3f
1 changed files with 14 additions and 0 deletions
|
|
@ -49,6 +49,10 @@
|
|||
#define RUNNING_ON_VALGRIND 0
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#include <crtdbg.h>
|
||||
#endif
|
||||
|
|
@ -169,6 +173,8 @@ is_running_under_debugger (void)
|
|||
{
|
||||
return TRUE;
|
||||
}
|
||||
#elif defined (_WIN32)
|
||||
return IsDebuggerPresent () != 0;
|
||||
#endif
|
||||
|
||||
if (RUNNING_ON_VALGRIND)
|
||||
|
|
@ -740,6 +746,14 @@ main (int argc, char **argv)
|
|||
int len;
|
||||
char *cairo_tests_env;
|
||||
|
||||
#ifdef _WIN32
|
||||
SetErrorMode (SEM_FAILCRITICALERRORS |
|
||||
SEM_NOGPFAULTERRORBOX |
|
||||
SEM_NOOPENFILEERRORBOX);
|
||||
|
||||
HeapSetInformation (NULL, HeapEnableTerminationOnCorruption, NULL, 0);
|
||||
#endif
|
||||
|
||||
#ifdef _MSC_VER
|
||||
/* We don't want an assert dialog, we want stderr */
|
||||
_CrtSetReportMode(_CRT_ERROR, _CRTDBG_MODE_FILE);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue