[PATCH 5/5] tests: Allow broken results to cause failures on the "windows" platform as well.

Henri Verbeet hverbeet at codeweavers.com
Fri Feb 14 03:50:22 CST 2014


---
 include/wine/test.h |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/include/wine/test.h b/include/wine/test.h
index f8b608f..c81fe11 100644
--- a/include/wine/test.h
+++ b/include/wine/test.h
@@ -208,6 +208,9 @@ const char *winetest_platform = "windows";
 /* report successful tests (BOOL) */
 static int report_success = 0;
 
+/* fail on broken() */
+static int fail_broken = 0;
+
 /* passing arguments around */
 static int winetest_argc;
 static char** winetest_argv;
@@ -289,7 +292,7 @@ void winetest_set_location( const char* file, int line )
 
 int broken( int condition )
 {
-    return (strcmp(winetest_platform, "windows") == 0) && condition;
+    return !fail_broken && condition;
 }
 
 /*
@@ -636,6 +639,8 @@ int main( int argc, char **argv )
     if (GetEnvironmentVariableA( "WINETEST_DEBUG", p, sizeof(p) )) winetest_debug = atoi(p);
     if (GetEnvironmentVariableA( "WINETEST_INTERACTIVE", p, sizeof(p) )) winetest_interactive = atoi(p);
     if (GetEnvironmentVariableA( "WINETEST_REPORT_SUCCESS", p, sizeof(p) )) report_success = atoi(p);
+    if (GetEnvironmentVariableA( "WINETEST_FAIL_BROKEN", p, sizeof(p) )) fail_broken = atoi(p);
+    else fail_broken = strcmp( winetest_platform, "windows" );
 
     if (!strcmp( winetest_platform, "windows" )) SetUnhandledExceptionFilter( exc_filter );
     if (!winetest_interactive) SetErrorMode( SEM_FAILCRITICALERRORS | SEM_NOGPFAULTERRORBOX );
-- 
1.7.10.4




More information about the wine-patches mailing list