[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
commit-queue at webkit.org
commit-queue at webkit.org
Wed Dec 22 14:34:56 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 124871f0be2d16e02ae8becf4b67771778b90472
Author: commit-queue at webkit.org <commit-queue at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Oct 13 18:10:35 2010 +0000
2010-10-13 Sheriff Bot <webkit.review.bot at gmail.com>
Unreviewed, rolling out r69638.
http://trac.webkit.org/changeset/69638
https://bugs.webkit.org/show_bug.cgi?id=47595
"Broke win and chromium-win bots" (Requested by dglazkov on
#webkit).
* Scripts/webkitpy/common/system/path.py:
* Scripts/webkitpy/layout_tests/layout_package/dump_render_tree_thread.py:
* Scripts/webkitpy/layout_tests/port/base.py:
* Scripts/webkitpy/layout_tests/port/base_unittest.py:
* Scripts/webkitpy/layout_tests/port/chromium.py:
* Scripts/webkitpy/layout_tests/run_webkit_tests.py:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@69674 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index ecf2982..583694f 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,19 @@
+2010-10-13 Sheriff Bot <webkit.review.bot at gmail.com>
+
+ Unreviewed, rolling out r69638.
+ http://trac.webkit.org/changeset/69638
+ https://bugs.webkit.org/show_bug.cgi?id=47595
+
+ "Broke win and chromium-win bots" (Requested by dglazkov on
+ #webkit).
+
+ * Scripts/webkitpy/common/system/path.py:
+ * Scripts/webkitpy/layout_tests/layout_package/dump_render_tree_thread.py:
+ * Scripts/webkitpy/layout_tests/port/base.py:
+ * Scripts/webkitpy/layout_tests/port/base_unittest.py:
+ * Scripts/webkitpy/layout_tests/port/chromium.py:
+ * Scripts/webkitpy/layout_tests/run_webkit_tests.py:
+
2010-10-13 John Knottenbelt <jknotten at chromium.org>
Reviewed by Steve Block.
diff --git a/WebKitTools/Scripts/webkitpy/common/system/path.py b/WebKitTools/Scripts/webkitpy/common/system/path.py
index 528210a..937247e 100644
--- a/WebKitTools/Scripts/webkitpy/common/system/path.py
+++ b/WebKitTools/Scripts/webkitpy/common/system/path.py
@@ -38,21 +38,6 @@ def abspath_to_uri(path, executive, platform=None):
return "file:" + _escape(_convert_path(path, executive, platform))
-def cygpath(path, executive):
- """Converts a cygwin path to Windows path."""
- # FIXME: this may not be correct in every situation, but forking
- # cygpath is very slow. More importantly, there is a bug in Python
- # where launching subprocesses and communicating with PIPEs (which
- # is what run_command() does) can lead to deadlocks when running in
- # multiple threads.
- if path.startswith("/cygdrive"):
- path = path[10] + ":" + path[11:]
- path = path.replace("/", "\\")
- return path
- return executive.run_command(['cygpath', '-wa', path],
- decode_output=False).rstrip()
-
-
def _escape(path):
"""Handle any characters in the path that should be escaped."""
# FIXME: web browsers don't appear to blindly quote every character
@@ -67,7 +52,7 @@ def _convert_path(path, executive, platform):
if platform == 'win32':
return _winpath_to_uri(path)
if platform == 'cygwin':
- return _winpath_to_uri(cygpath(path, executive))
+ return _winpath_to_uri(_cygpath(path, executive))
return _unixypath_to_uri(path)
@@ -75,6 +60,13 @@ def _winpath_to_uri(path):
"""Converts a window absolute path to a file: URL."""
return "///" + path.replace("\\", "/")
+
+def _cygpath(path, executive):
+ """Converts a cygwin path to Windows path."""
+ return executive.run_command(['cygpath', '-wa', path],
+ decode_output=False).rstrip()
+
+
def _unixypath_to_uri(path):
"""Converts a unix-style path to a file: URL."""
return "//" + path
diff --git a/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/dump_render_tree_thread.py b/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/dump_render_tree_thread.py
index d6e7bc4..e0fd1b6 100644
--- a/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/dump_render_tree_thread.py
+++ b/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/dump_render_tree_thread.py
@@ -83,7 +83,7 @@ def _process_output(port, options, test_info, test_types, test_args,
port: port-specific hooks
options: command line options argument from optparse
proc: an active DumpRenderTree process
- test_info: Object containing the test filename and timeout
+ test_info: Object containing the test filename, uri and timeout
test_types: list of test types to subject the output to
test_args: arguments to be passed to each test
@@ -172,7 +172,7 @@ class SingleTestThread(threading.Thread):
Args:
port: object implementing port-specific hooks
options: command line argument object from optparse
- test_info: Object containing the test filename and timeout
+ test_info: Object containing the test filename, uri and timeout
test_types: A list of TestType objects to run the test output
against.
test_args: A TestArguments object to pass to each TestType.
@@ -193,13 +193,12 @@ class SingleTestThread(threading.Thread):
# FIXME: this is a separate routine to work around a bug
# in coverage: see http://bitbucket.org/ned/coveragepy/issue/85.
test_info = self._test_info
- uri = self._port.filename_to_uri(test_info.filename)
self._driver = self._port.create_driver(self._test_args.png_path,
self._options)
self._driver.start()
start = time.time()
crash, timeout, actual_checksum, output, error = \
- self._driver.run_test(uri, test_info.timeout,
+ self._driver.run_test(test_info.uri.strip(), test_info.timeout,
test_info.image_hash())
end = time.time()
self._test_result = _process_output(self._port, self._options,
@@ -256,7 +255,7 @@ class TestShellThread(WatchableThread):
port: interface to port-specific hooks
options: command line options argument from optparse
filename_list_queue: A thread safe Queue class that contains lists
- of (filename, TestInfo) pairs.
+ of tuples of (filename, uri) pairs.
result_queue: A thread safe Queue class that will contain tuples of
(test, failure lists) for the test results.
test_types: A list of TestType objects to run the test output
@@ -460,7 +459,7 @@ class TestShellThread(WatchableThread):
files singly.
Args:
- test_info: Object containing the test filename and timeout
+ test_info: Object containing the test filename, uri and timeout
Returns:
A TestResult
@@ -508,7 +507,7 @@ class TestShellThread(WatchableThread):
"""Run a single test file using a shared DumpRenderTree process.
Args:
- test_info: Object containing the test filename and timeout
+ test_info: Object containing the test filename, uri and timeout
Returns:
A list of TestFailure objects describing the error.
@@ -530,9 +529,8 @@ class TestShellThread(WatchableThread):
_pad_timeout(int(test_info.timeout)))
self._next_timeout = start + thread_timeout
- uri = self._port.filename_to_uri(test_info.filename)
crash, timeout, actual_checksum, output, error = \
- self._driver.run_test(uri, test_info.timeout, image_hash)
+ self._driver.run_test(test_info.uri, test_info.timeout, image_hash)
end = time.time()
result = _process_output(self._port, self._options,
diff --git a/WebKitTools/Scripts/webkitpy/layout_tests/port/base.py b/WebKitTools/Scripts/webkitpy/layout_tests/port/base.py
index 042f0aa..38b982b 100644
--- a/WebKitTools/Scripts/webkitpy/layout_tests/port/base.py
+++ b/WebKitTools/Scripts/webkitpy/layout_tests/port/base.py
@@ -49,7 +49,6 @@ import websocket_server
from webkitpy.common.system import logutils
from webkitpy.common.system.executive import Executive, ScriptError
-from webkitpy.common.system.path import abspath_to_uri
from webkitpy.common.system.user import User
@@ -313,7 +312,17 @@ class Port(object):
protocol = "http"
return "%s://127.0.0.1:%u/%s" % (protocol, port, relative_path)
- return abspath_to_uri(os.path.abspath(filename), self._executive)
+ abspath = os.path.abspath(filename)
+
+ # On Windows, absolute paths are of the form "c:\foo.txt". However,
+ # all current browsers (except for Opera) normalize file URLs by
+ # prepending an additional "/" as if the absolute path was
+ # "/c:/foo.txt". This means that all file URLs end up with "file:///"
+ # at the beginning.
+ if sys.platform == 'win32':
+ abspath = '/' + abspath.replace('\\', '/')
+
+ return "file://" + abspath
def tests(self, paths):
"""Return the list of tests found (relative to layout_tests_dir()."""
@@ -362,12 +371,9 @@ class Port(object):
"""
test = uri
if uri.startswith("file:///"):
- # FIXME: need an inverse of uri_to_abspath()
if sys.platform == 'win32':
test = test.replace('file:///', '')
test = test.replace('/', '\\')
- elif sys.platform == 'cygwin':
- test = '/cygdrive/' + uri[8] + '/' + uri[11:]
else:
test = test.replace('file://', '')
return self.relative_test_filename(test)
diff --git a/WebKitTools/Scripts/webkitpy/layout_tests/port/base_unittest.py b/WebKitTools/Scripts/webkitpy/layout_tests/port/base_unittest.py
index d9cb467..e66c64d 100644
--- a/WebKitTools/Scripts/webkitpy/layout_tests/port/base_unittest.py
+++ b/WebKitTools/Scripts/webkitpy/layout_tests/port/base_unittest.py
@@ -34,7 +34,6 @@ import tempfile
import unittest
from webkitpy.common.system.executive import Executive, ScriptError
-from webkitpy.common.system.path import abspath_to_uri
from webkitpy.thirdparty.mock import Mock
@@ -228,11 +227,25 @@ class PortTest(unittest.TestCase):
self.assertTrue('css2.1' in dirs)
def test_filename_to_uri(self):
+
port = base.Port()
layout_test_dir = port.layout_tests_dir()
test_file = os.path.join(layout_test_dir, "foo", "bar.html")
+
+ # On Windows, absolute paths are of the form "c:\foo.txt". However,
+ # all current browsers (except for Opera) normalize file URLs by
+ # prepending an additional "/" as if the absolute path was
+ # "/c:/foo.txt". This means that all file URLs end up with "file:///"
+ # at the beginning.
+ if sys.platform == 'win32':
+ prefix = "file:///"
+ path = test_file.replace("\\", "/")
+ else:
+ prefix = "file://"
+ path = test_file
+
self.assertEqual(port.filename_to_uri(test_file),
- abspath_to_uri(test_file, Executive()))
+ prefix + path)
diff --git a/WebKitTools/Scripts/webkitpy/layout_tests/port/chromium.py b/WebKitTools/Scripts/webkitpy/layout_tests/port/chromium.py
index 1f784dc..301d4b1 100644
--- a/WebKitTools/Scripts/webkitpy/layout_tests/port/chromium.py
+++ b/WebKitTools/Scripts/webkitpy/layout_tests/port/chromium.py
@@ -43,13 +43,12 @@ import tempfile
import time
import webbrowser
-from webkitpy.common.system.executive import Executive
-from webkitpy.common.system.path import abspath_to_uri, cygpath
-from webkitpy.layout_tests.layout_package import test_expectations
-
import base
import http_server
+from webkitpy.common.system.executive import Executive
+from webkitpy.layout_tests.layout_package import test_expectations
+
# Chromium DRT on OSX uses WebKitDriver.
if sys.platform == 'darwin':
import webkit
@@ -144,21 +143,11 @@ class ChromiumPort(base.Port):
with open(actual_filename, 'w+b') as file:
file.write(actual_contents)
- # We use convert_path if there's a chance that the launched
- # executable needs filename arguments in a different format than
- # the normal format provided by the python runtime. The main
- # example of this is running under Cygwin on Windows but
- # launching a Win32 binary, where we need to convert the path
- # from /cygdrive/c/foo.txt to c:\foo.txt.
if diff_filename:
- cmd = [executable, '--diff',
- self._convert_path(expected_filename),
- self._convert_path(actual_filename),
- self._convert_path(diff_filename)]
+ cmd = [executable, '--diff', expected_filename,
+ actual_filename, diff_filename]
else:
- cmd = [executable,
- self._convert_path(expected_filename),
- self._convert_path(actual_filename)]
+ cmd = [executable, expected_filename, actual_filename]
result = True
try:
@@ -351,13 +340,6 @@ class ChromiumPort(base.Port):
platform = self.name()
return self.path_from_webkit_base('LayoutTests', 'platform', platform)
- def _convert_path(self, path):
- """Handles filename conversion for subprocess command line args."""
- # See note above in diff_image() for why we need this.
- if sys.platform == 'cygwin':
- return cygpath(path, self._executive)
- return path
-
def _path_to_image_diff(self):
binary_name = 'image_diff'
if self._options.use_drt:
@@ -377,10 +359,7 @@ class ChromiumDriver(base.Driver):
def _driver_args(self):
driver_args = []
if self._image_path:
- # See note above in diff_image() for why we need
- # _convert_path().
- driver_args.append("--pixel-tests=" +
- self._port._convert_path(self._image_path))
+ driver_args.append("--pixel-tests=" + self._image_path)
if self._options.use_drt:
driver_args.append('--test-shell')
diff --git a/WebKitTools/Scripts/webkitpy/layout_tests/run_webkit_tests.py b/WebKitTools/Scripts/webkitpy/layout_tests/run_webkit_tests.py
index efac7f2..9cc7895 100755
--- a/WebKitTools/Scripts/webkitpy/layout_tests/run_webkit_tests.py
+++ b/WebKitTools/Scripts/webkitpy/layout_tests/run_webkit_tests.py
@@ -91,13 +91,14 @@ class TestInfo:
"""Groups information about a test for easy passing of data."""
def __init__(self, port, filename, timeout):
- """
+ """Generates the URI and stores the filename and timeout for this test.
Args:
filename: Full path to the test.
- timeout: Timeout for running the test in DRT.
+ timeout: Timeout for running the test in TestShell.
"""
self.filename = filename
self._port = port
+ self.uri = port.filename_to_uri(filename)
self.timeout = timeout
self._image_checksum = -1
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list