From 59a462c67d7569c63bf212bffe71d808d1c56746 Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Sat, 23 Aug 2014 10:04:06 -0700 Subject: [PATCH] Make sure that Crash Reporter is not invoked on death tests. --- test/test-main.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/test/test-main.cc b/test/test-main.cc index 036394cd..84609d20 100644 --- a/test/test-main.cc +++ b/test/test-main.cc @@ -26,6 +26,8 @@ */ #include +#include +#include #ifdef _WIN32 # include @@ -33,7 +35,10 @@ #endif int main(int argc, char **argv) { -#ifdef _WIN32 +#if defined(__APPLE__) + // This ensures that Crash Reporter is not invoked on death tests. + std::signal(SIGABRT, std::exit); +#elif defined(_WIN32) // Don't display any error dialogs. This also suppresses message boxes // on assertion failures in MinGW where _set_error_mode/CrtSetReportMode // doesn't help.