Title: [173219] trunk/Tools
Revision
173219
Author
[email protected]
Date
2014-09-03 13:12:31 -0700 (Wed, 03 Sep 2014)

Log Message

[Win] Revise test environment for Windows build.
https://bugs.webkit.org/show_bug.cgi?id=136486

Reviewed by David Kilzer.

The various calls to get the Safari path really only have
meaning on the Mac. Other ports get access to the build
and test environment separately, so remove the various
checks in the Safari-specific code to simplify things.

Remove some 64-bit hacks used on Windows now that the
various tools know how to find the 64-bit runtime environment.

* Scripts/run-_javascript_core-tests: 
* Scripts/webkitdirs.pm:
(safariPathFromSafariBundle): Revise to expect Mac.
(installedSafariPath): Ditto.
(safariPath): Ditto.
(appleApplicationSupportPath): Get rid of 64-bit Windows hack.
(setPathForRunningWebKitApp): Get rid of unused SafariPath
argument for Windows runs.

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (173218 => 173219)


--- trunk/Tools/ChangeLog	2014-09-03 19:57:34 UTC (rev 173218)
+++ trunk/Tools/ChangeLog	2014-09-03 20:12:31 UTC (rev 173219)
@@ -1,3 +1,27 @@
+2014-09-03  Brent Fulgham  <[email protected]>
+
+        [Win] Revise test environment for Windows build.
+        https://bugs.webkit.org/show_bug.cgi?id=136486
+
+        Reviewed by David Kilzer.
+
+        The various calls to get the Safari path really only have
+        meaning on the Mac. Other ports get access to the build
+        and test environment separately, so remove the various
+        checks in the Safari-specific code to simplify things.
+
+        Remove some 64-bit hacks used on Windows now that the
+        various tools know how to find the 64-bit runtime environment.
+
+        * Scripts/run-_javascript_core-tests: 
+        * Scripts/webkitdirs.pm:
+        (safariPathFromSafariBundle): Revise to expect Mac.
+        (installedSafariPath): Ditto.
+        (safariPath): Ditto.
+        (appleApplicationSupportPath): Get rid of 64-bit Windows hack.
+        (setPathForRunningWebKitApp): Get rid of unused SafariPath
+        argument for Windows runs.
+
 2014-09-03  Dana Burkart  <[email protected]>
 
         Dashboard should show performance bots.

Modified: trunk/Tools/Scripts/run-_javascript_core-tests (173218 => 173219)


--- trunk/Tools/Scripts/run-_javascript_core-tests	2014-09-03 19:57:34 UTC (rev 173218)
+++ trunk/Tools/Scripts/run-_javascript_core-tests	2014-09-03 20:12:31 UTC (rev 173219)
@@ -1,6 +1,6 @@
 #!/usr/bin/perl -w
 
-# Copyright (C) 2005, 2013 Apple Inc.  All rights reserved.
+# Copyright (C) 2005, 2013-2014 Apple Inc.  All rights reserved.
 # Copyright (C) 2007 Eric Seidel <[email protected]>
 #
 # Redistribution and use in source and binary forms, with or without
@@ -165,7 +165,9 @@
     # Use an "indirect object" so that system() won't get confused if the path
     # contains spaces (see perldoc -f exec).
     my $testapiResult = system { $command[0] } @command;
-    exit exitStatus($testapiResult)  if $testapiResult;
+    my $exitStatus = exitStatus($testapiResult);
+    print "testAPI completed with rc=$testapiResult ($exitStatus)\n";
+    exit exitStatus($testapiResult) if $testapiResult;
 }
 
 # Find _javascript_Core directory

Modified: trunk/Tools/Scripts/webkitdirs.pm (173218 => 173219)


--- trunk/Tools/Scripts/webkitdirs.pm	2014-09-03 19:57:34 UTC (rev 173218)
+++ trunk/Tools/Scripts/webkitdirs.pm	2014-09-03 20:12:31 UTC (rev 173219)
@@ -762,61 +762,41 @@
 {
     my ($safariBundle) = @_;
 
-    if (isAppleMacWebKit()) {
-        my $safariPath = "$safariBundle/Contents/MacOS/Safari";
-        return $safariPath if skipSafariExecutableEntitlementChecks();
+    die "Safari path is only relevant on Apple Mac platform\n" unless isAppleMacWebKit();
 
-        my $safariForWebKitDevelopmentPath = "$safariBundle/Contents/MacOS/SafariForWebKitDevelopment";
-        return $safariForWebKitDevelopmentPath if -f $safariForWebKitDevelopmentPath && executableHasEntitlements($safariPath);
+    my $safariPath = "$safariBundle/Contents/MacOS/Safari";
+    return $safariPath if skipSafariExecutableEntitlementChecks();
 
-        return $safariPath;
-    }
-    return $safariBundle if isAppleWinWebKit();
+    my $safariForWebKitDevelopmentPath = "$safariBundle/Contents/MacOS/SafariForWebKitDevelopment";
+    return $safariForWebKitDevelopmentPath if -f $safariForWebKitDevelopmentPath && executableHasEntitlements($safariPath);
+
+    return $safariPath;
 }
 
 sub installedSafariPath
 {
-    my $safariBundle;
-
-    if (isAppleMacWebKit()) {
-        $safariBundle = "/Applications/Safari.app";
-    } elsif (isAppleWinWebKit()) {
-        $safariBundle = readRegistryString("/HKLM/SOFTWARE/Apple Inc./Safari/InstallDir");
-        $safariBundle =~ s/[\r\n]+$//;
-        $safariBundle = `cygpath -u '$safariBundle'` if isCygwin();
-        $safariBundle =~ s/[\r\n]+$//;
-        $safariBundle .= "Safari.exe";
-    }
-
-    return safariPathFromSafariBundle($safariBundle);
+    return safariPathFromSafariBundle("/Applications/Safari.app");
 }
 
 # Locate Safari.
 sub safariPath
 {
+    die "Safari path is only relevant on Apple Mac platform\n" unless isAppleMacWebKit();
+
     # Use WEBKIT_SAFARI environment variable if present.
     my $safariBundle = $ENV{WEBKIT_SAFARI};
     if (!$safariBundle) {
         determineConfigurationProductDir();
         # Use Safari.app in product directory if present (good for Safari development team).
-        if (isAppleMacWebKit() && -d "$configurationProductDir/Safari.app") {
+        if (-d "$configurationProductDir/Safari.app") {
             $safariBundle = "$configurationProductDir/Safari.app";
-        } elsif (isAppleWinWebKit()) {
-            my $path = "$configurationProductDir/Safari.exe";
-            my $debugPath = "$configurationProductDir/Safari_debug.exe";
-
-            if (configuration() eq "Debug_All" && -x $debugPath) {
-                $safariBundle = $debugPath;
-            } elsif (-x $path) {
-                $safariBundle = $path;
-            }
         }
         if (!$safariBundle) {
             return installedSafariPath();
         }
     }
     my $safariPath = safariPathFromSafariBundle($safariBundle);
-    die "Can't find executable at $safariPath.\n" if isAppleMacWebKit() && !-x $safariPath;
+    die "Can't find executable at $safariPath.\n" if !-x $safariPath;
     return $safariPath;
 }
 
@@ -1997,11 +1977,6 @@
 
 sub appleApplicationSupportPath
 {
-    if (isWin64()) {
-        # FIXME (125180): Remove the following once official 64-bit Windows support is available.
-        return $ENV{"WEBKIT_64_SUPPORT"}, "\n" if isWin64();
-    }
-
     open INSTALL_DIR, "</proc/registry/HKEY_LOCAL_MACHINE/SOFTWARE/Apple\ Inc./Apple\ Application\ Support/InstallDir";
     my $path = <INSTALL_DIR>;
     $path =~ s/[\r\n\x00].*//;
@@ -2017,7 +1992,7 @@
     my ($env) = @_;
 
     if (isAppleWinWebKit()) {
-        $env->{PATH} = join(':', productDir(), dirname(installedSafariPath()), appleApplicationSupportPath(), $env->{PATH} || "");
+        $env->{PATH} = join(':', productDir(), appleApplicationSupportPath(), $env->{PATH} || "");
     } elsif (isWinCairo()) {
         my $winCairoBin = sourceDir() . "/WebKitLibraries/win/" . (isWin64() ? "bin64/" : "bin32/");
         my $gstreamerBin = isWin64() ? $ENV{"GSTREAMER_1_0_ROOT_X86_64"} . "bin" : $ENV{"GSTREAMER_1_0_ROOT_X86"} . "bin";
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to