winetest: Set correct WINETEST_PLATFORM when running under Wine

Dmitry Timoshkov dmitry at codeweavers.com
Wed Feb 28 05:13:08 CST 2007


Hello,

Looks like some people think that posting the results of running
of winetest.exe under Wine to test.winehq.org is useful. For some
reason they prefer to do that instead of running simple 'make test'
inside of the Wine tree. They don't realize that all the tests marked
by todo_wine simply fail in that configuration, leading to a lot of
confusion.

Changelog:
    winetest: Set correct WINETEST_PLATFORM when running under Wine.

---
 programs/winetest/main.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/programs/winetest/main.c b/programs/winetest/main.c
index 2488e30..b7ff003 100644
--- a/programs/winetest/main.c
+++ b/programs/winetest/main.c
@@ -629,16 +629,20 @@ int WINAPI WinMain (HINSTANCE hInst, HINSTANCE hPrevInst,
     }
     if (!submit) {
         static CHAR platform_windows[]  = "WINETEST_PLATFORM=windows",
+                    platform_wine[]     = "WINETEST_PLATFORM=wine",
                     debug_yes[]         = "WINETEST_DEBUG=1",
                     interactive_no[]    = "WINETEST_INTERACTIVE=0",
                     report_success_no[] = "WINETEST_REPORT_SUCCESS=0";
+        CHAR *platform;
 
         report (R_STATUS, "Starting up");
 
         if (!running_on_visible_desktop ())
             report (R_FATAL, "Tests must be run on a visible desktop");
 
-        if (reset_env && (putenv (platform_windows) ||
+        platform = running_under_wine () ? platform_wine : platform_windows;
+
+        if (reset_env && (putenv (platform) ||
                           putenv (debug_yes)        ||
                           putenv (interactive_no)   ||
                           putenv (report_success_no)))
-- 
1.5.0






More information about the wine-patches mailing list