[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.21-584-g1e41756

eric at webkit.org eric at webkit.org
Fri Feb 26 22:17:24 UTC 2010


The following commit has been merged in the webkit-1.1 branch:
commit 9aa08785894861cc7e17f28c1779485be994230e
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Feb 11 01:24:04 2010 +0000

    2010-02-10  Eric Seidel  <eric at webkit.org>
    
            Reviewed by David Levin.
    
            run-chromium-webkit-tests --platform=mac-leopard crashes when using a custom build directory
            https://bugs.webkit.org/show_bug.cgi?id=34817
    
            This doesn't fix the root cause of us not
            correctly failing when support binaries are missing.
            This only causes the DumpRenderTree binary not to be
            missing in the custom build directory case.
            Later patches will make us correctly fail fast when
            support binaries (like DumpRenderTree or ImageDiff) are missing.
    
            * Scripts/webkit-build-directory: Added.
             - Need a way to re-use the perl logic for finding build directories in non-perl scripts.
            * Scripts/webkitpy/layout_tests/port/base.py: Add a FIXME.
            * Scripts/webkitpy/layout_tests/port/mac.py:
             - Call webkit-build-directory to find the build directory instead of assuming "WebKitBuild"
            * Scripts/webkitpy/layout_tests/rebaseline_chromium_webkit_tests.py: Add FIXMEs.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@54634 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index a17a5aa..286190a 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,24 @@
+2010-02-10  Eric Seidel  <eric at webkit.org>
+
+        Reviewed by David Levin.
+
+        run-chromium-webkit-tests --platform=mac-leopard crashes when using a custom build directory
+        https://bugs.webkit.org/show_bug.cgi?id=34817
+
+        This doesn't fix the root cause of us not
+        correctly failing when support binaries are missing.
+        This only causes the DumpRenderTree binary not to be
+        missing in the custom build directory case.
+        Later patches will make us correctly fail fast when
+        support binaries (like DumpRenderTree or ImageDiff) are missing.
+
+        * Scripts/webkit-build-directory: Added.
+         - Need a way to re-use the perl logic for finding build directories in non-perl scripts.
+        * Scripts/webkitpy/layout_tests/port/base.py: Add a FIXME.
+        * Scripts/webkitpy/layout_tests/port/mac.py:
+         - Call webkit-build-directory to find the build directory instead of assuming "WebKitBuild"
+        * Scripts/webkitpy/layout_tests/rebaseline_chromium_webkit_tests.py: Add FIXMEs.
+
 2010-02-10  Kevin Watters  <kevinwatters at gmail.com>
 
         Reviewed by Kevin Ollivier.
diff --git a/WebKitTools/Scripts/webkit-build-directory b/WebKitTools/Scripts/webkit-build-directory
new file mode 100755
index 0000000..a85c587
--- /dev/null
+++ b/WebKitTools/Scripts/webkit-build-directory
@@ -0,0 +1,65 @@
+#!/usr/bin/perl
+
+# Copyright (C) 2010 Google Inc. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# 1.  Redistributions of source code must retain the above copyright
+#     notice, this list of conditions and the following disclaimer. 
+# 2.  Redistributions in binary form must reproduce the above copyright
+#     notice, this list of conditions and the following disclaimer in the
+#     documentation and/or other materials provided with the distribution. 
+# 3.  Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+#     its contributors may be used to endorse or promote products derived
+#     from this software without specific prior written permission. 
+#
+# THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# A script to expose WebKit's build directory detection logic to non-perl scripts.
+
+use FindBin;
+use Getopt::Long;
+
+use lib $FindBin::Bin;
+use webkitdirs;
+
+my $showBaseProductDirectory = 0;
+my $showHelp = 0;
+
+my $programName = basename($0);
+my $usage = <<EOF;
+Usage: $programName [options]
+  --base      Show the root build directory instead of one corresponding to the current target (e.g. Debug, Release)
+  --debug     Show build directory for the Debug target
+  -h|--help   Show this help message
+  --release   Show build directory for the Release target
+EOF
+
+setConfiguration(); # Figure out from the command line if we're --debug or --release or the default.
+
+my $getOptionsResult = GetOptions(
+    'base' => \$showBaseProductDirectory,
+    'help|h' => \$showHelp,
+);
+
+if (!$getOptionsResult || $showHelp) {
+    print STDERR $usage;
+    exit 1;
+}
+
+if ($showBaseProductDirectory) {
+    print baseProductDir() . "\n";
+} else {
+    print productDir() . "\n";
+}
diff --git a/WebKitTools/Scripts/webkitpy/layout_tests/port/base.py b/WebKitTools/Scripts/webkitpy/layout_tests/port/base.py
index f9fc3cb..4c1c666 100644
--- a/WebKitTools/Scripts/webkitpy/layout_tests/port/base.py
+++ b/WebKitTools/Scripts/webkitpy/layout_tests/port/base.py
@@ -45,6 +45,7 @@ import websocket_server
 _wdiff_available = True
 
 
+# FIXME: This class should merge with webkitpy.webkit_port at some point.
 class Port(object):
     """Abstract class for Port-specific hooks for the layout_test package.
     """
diff --git a/WebKitTools/Scripts/webkitpy/layout_tests/port/mac.py b/WebKitTools/Scripts/webkitpy/layout_tests/port/mac.py
index 5a770ef..c09ec37 100644
--- a/WebKitTools/Scripts/webkitpy/layout_tests/port/mac.py
+++ b/WebKitTools/Scripts/webkitpy/layout_tests/port/mac.py
@@ -42,6 +42,8 @@ import webbrowser
 
 import base
 
+import webkitpy
+from webkitpy import executive
 
 class MacPort(base.Port):
     """WebKit Mac implementation of the Port class."""
@@ -50,6 +52,7 @@ class MacPort(base.Port):
         if port_name is None:
             port_name = 'mac' + self.version()
         base.Port.__init__(self, port_name, options)
+        self._cached_build_root = None
 
     def baseline_search_path(self):
         dirs = []
@@ -63,7 +66,8 @@ class MacPort(base.Port):
         return dirs
 
     def check_sys_deps(self):
-        # There are no platform-specific checks we need to do.
+        # FIXME: This should run build-dumprendertree.
+        # This should also validate that all of the tool paths are valid.
         return True
 
     def num_cores(self):
@@ -174,8 +178,9 @@ class MacPort(base.Port):
     #
 
     def _build_path(self, *comps):
-        return self.path_from_webkit_base('WebKitBuild', self._options.target,
-                                          *comps)
+        if not self._cached_build_root:
+            self._cached_build_root = executive.run_command(["webkit-build-directory", "--base"]).rstrip()
+        return os.path.join(self._cached_build_root, self._options.target, *comps)
 
     def _kill_process(self, pid):
         """Forcefully kill the process.
@@ -210,10 +215,10 @@ class MacPort(base.Port):
         return None
 
     def _path_to_image_diff(self):
-        return self._build_path('image_diff')
+        return self._build_path('image_diff') # FIXME: This is wrong and should be "ImageDiff", but having the correct path causes other parts of the script to hang.
 
     def _path_to_wdiff(self):
-        return 'wdiff'
+        return 'wdiff' # FIXME: This does not exist on a default Mac OS X Leopard install.
 
     def _shut_down_http_server(self, server_pid):
         """Shut down the lighttpd web server. Blocks until it's fully
@@ -265,6 +270,7 @@ class MacDriver(base.Driver):
             # practice it shouldn't come up and the --help output warns
             # about it anyway.
             cmd += self._options.wrapper.split()
+        # FIXME: Using arch here masks any possible file-not-found errors from a non-existant driver executable.
         cmd += ['arch', '-i386', port._path_to_driver(), '-']
         if not self._port._options.no_pixel_tests:
             cmd.append('--pixel-tests')
@@ -272,8 +278,7 @@ class MacDriver(base.Driver):
         #if driver_options:
         #    cmd += driver_options
         env = os.environ
-        env['DYLD_FRAMEWORK_PATH'] = self._port.path_from_webkit_base(
-            'WebKitBuild', port._options.target)
+        env['DYLD_FRAMEWORK_PATH'] = self._port._build_path()
         self._cmd = cmd
         self._env = env
         self.restart()
diff --git a/WebKitTools/Scripts/webkitpy/layout_tests/rebaseline_chromium_webkit_tests.py b/WebKitTools/Scripts/webkitpy/layout_tests/rebaseline_chromium_webkit_tests.py
index 4da32ad..83cf99d 100644
--- a/WebKitTools/Scripts/webkitpy/layout_tests/rebaseline_chromium_webkit_tests.py
+++ b/WebKitTools/Scripts/webkitpy/layout_tests/rebaseline_chromium_webkit_tests.py
@@ -76,6 +76,7 @@ ARCHIVE_DIR_NAME_DICT = {'win': 'webkit-rel',
                          'linux-canary': 'webkit-rel-linux-webkit-org'}
 
 
+# FIXME: Should be rolled into webkitpy.Executive
 def run_shell_with_return_code(command, print_output=False):
     """Executes a command and returns the output and process return code.
 
@@ -109,6 +110,7 @@ def run_shell_with_return_code(command, print_output=False):
     return output, p.returncode
 
 
+# FIXME: Should be rolled into webkitpy.Executive
 def run_shell(command, print_output=False):
     """Executes a command and returns the output.
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list