Changed abort behaviour for Windows CI.

This commit is contained in:
Matthew Parkinson
2019-08-13 15:37:54 +01:00
parent dd3feb948c
commit 16b084f501
10 changed files with 52 additions and 6 deletions

20
src/test/setup.h Normal file
View File

@@ -0,0 +1,20 @@
#if defined(WIN32) && defined(SNMALLOC_CI_BUILD)
# include <ds/bits.h>
# include <signal.h>
# include <stdlib.h>
void _cdecl error(int signal)
{
UNUSED(signal);
puts("*****ABORT******");
_exit(1);
}
void setup()
{
// Disable abort dialog box in CI builds.
_set_error_mode(_OUT_TO_STDERR);
_set_abort_behavior(0, _WRITE_ABORT_MSG);
signal(SIGABRT, error);
}
#else
void setup() {}
#endif