Alexandre Julliard : tests: Try to avoid message boxes popping up in non-interactive testing.

Alexandre Julliard julliard at winehq.org
Tue Jul 20 11:20:29 CDT 2010


Module: wine
Branch: master
Commit: e2c48c595206c3d7411cf07ba397a0fad6c5e0d6
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=e2c48c595206c3d7411cf07ba397a0fad6c5e0d6

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Mon Jul 19 23:45:28 2010 +0200

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(+), 0 deletions(-)

diff --git a/dlls/kernel32/tests/debugger.c b/dlls/kernel32/tests/debugger.c
index fa96767..dacad1f 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 0d00e4b..27c4938 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 */




More information about the wine-cvs mailing list