From e2c48c595206c3d7411cf07ba397a0fad6c5e0d6 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Mon, 19 Jul 2010 23:45:28 +0200 Subject: [PATCH] tests: Try to avoid message boxes popping up in non-interactive testing. --- dlls/kernel32/tests/debugger.c | 4 ++++ include/wine/test.h | 2 ++ 2 files changed, 6 insertions(+) diff --git a/dlls/kernel32/tests/debugger.c b/dlls/kernel32/tests/debugger.c index fa96767319..dacad1f1e4 100644 --- a/dlls/kernel32/tests/debugger.c +++ b/dlls/kernel32/tests/debugger.c @@ -160,6 +160,10 @@ static void doCrash(int argc, char** argv) { char* p; + /* make sure the exception gets to the debugger */ + SetErrorMode( 0 ); + SetUnhandledExceptionFilter( NULL ); + if (argc >= 4) { crash_blackbox_t blackbox; diff --git a/include/wine/test.h b/include/wine/test.h index 0d00e4bcca..27c4938818 100644 --- a/include/wine/test.h +++ b/include/wine/test.h @@ -593,6 +593,8 @@ int main( int argc, char **argv ) if (GetEnvironmentVariableA( "WINETEST_INTERACTIVE", p, sizeof(p) )) winetest_interactive = atoi(p); if (GetEnvironmentVariableA( "WINETEST_REPORT_SUCCESS", p, sizeof(p) )) report_success = atoi(p); + if (!winetest_interactive) SetErrorMode( SEM_FAILCRITICALERRORS | SEM_NOGPFAULTERRORBOX ); + if (!argv[1]) { if (winetest_testlist[0].name && !winetest_testlist[1].name) /* only one test */ -- 2.32.0.93.g670b81a890