Dmitry Timoshkov : winetest: Set correct WINETEST_PLATFORM when running under Wine.

Alexandre Julliard julliard at wine.codeweavers.com
Wed Feb 28 08:19:15 CST 2007


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

Author: Dmitry Timoshkov <dmitry at codeweavers.com>
Date:   Wed Feb 28 19:13:08 2007 +0800

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)))




More information about the wine-cvs mailing list