Changeset 69674 in webkit


Ignore:
Timestamp:
Oct 13, 2010 11:10:35 AM (14 years ago)
Author:
commit-queue@webkit.org
Message:

2010-10-13 Sheriff Bot <webkit.review.bot@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:
Location:
trunk/WebKitTools
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKitTools/ChangeLog

    r69673 r69674  
     12010-10-13  Sheriff Bot  <webkit.review.bot@gmail.com>
     2
     3        Unreviewed, rolling out r69638.
     4        http://trac.webkit.org/changeset/69638
     5        https://bugs.webkit.org/show_bug.cgi?id=47595
     6
     7        "Broke win and chromium-win bots" (Requested by dglazkov on
     8        #webkit).
     9
     10        * Scripts/webkitpy/common/system/path.py:
     11        * Scripts/webkitpy/layout_tests/layout_package/dump_render_tree_thread.py:
     12        * Scripts/webkitpy/layout_tests/port/base.py:
     13        * Scripts/webkitpy/layout_tests/port/base_unittest.py:
     14        * Scripts/webkitpy/layout_tests/port/chromium.py:
     15        * Scripts/webkitpy/layout_tests/run_webkit_tests.py:
     16
    1172010-10-13  John Knottenbelt  <jknotten@chromium.org>
    218
  • trunk/WebKitTools/Scripts/webkitpy/common/system/path.py

    r69638 r69674  
    3939
    4040
    41 def cygpath(path, executive):
    42     """Converts a cygwin path to Windows path."""
    43     # FIXME: this may not be correct in every situation, but forking
    44     # cygpath is very slow. More importantly, there is a bug in Python
    45     # where launching subprocesses and communicating with PIPEs (which
    46     # is what run_command() does) can lead to deadlocks when running in
    47     # multiple threads.
    48     if path.startswith("/cygdrive"):
    49         path = path[10] + ":" + path[11:]
    50         path = path.replace("/", "\\")
    51         return path
    52     return executive.run_command(['cygpath', '-wa', path],
    53                                  decode_output=False).rstrip()
    54 
    55 
    5641def _escape(path):
    5742    """Handle any characters in the path that should be escaped."""
     
    6853        return _winpath_to_uri(path)
    6954    if platform == 'cygwin':
    70         return _winpath_to_uri(cygpath(path, executive))
     55        return _winpath_to_uri(_cygpath(path, executive))
    7156    return _unixypath_to_uri(path)
    7257
     
    7661    return "///" + path.replace("\\", "/")
    7762
     63
     64def _cygpath(path, executive):
     65    """Converts a cygwin path to Windows path."""
     66    return executive.run_command(['cygpath', '-wa', path],
     67                                 decode_output=False).rstrip()
     68
     69
    7870def _unixypath_to_uri(path):
    7971    """Converts a unix-style path to a file: URL."""
  • trunk/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/dump_render_tree_thread.py

    r69638 r69674  
    8484      options: command line options argument from optparse
    8585      proc: an active DumpRenderTree process
    86       test_info: Object containing the test filename and timeout
     86      test_info: Object containing the test filename, uri and timeout
    8787      test_types: list of test types to subject the output to
    8888      test_args: arguments to be passed to each test
     
    173173          port: object implementing port-specific hooks
    174174          options: command line argument object from optparse
    175           test_info: Object containing the test filename and timeout
     175          test_info: Object containing the test filename, uri and timeout
    176176          test_types: A list of TestType objects to run the test output
    177177              against.
     
    194194        # in coverage: see http://bitbucket.org/ned/coveragepy/issue/85.
    195195        test_info = self._test_info
    196         uri = self._port.filename_to_uri(test_info.filename)
    197196        self._driver = self._port.create_driver(self._test_args.png_path,
    198197                                                self._options)
     
    200199        start = time.time()
    201200        crash, timeout, actual_checksum, output, error = \
    202             self._driver.run_test(uri, test_info.timeout,
     201            self._driver.run_test(test_info.uri.strip(), test_info.timeout,
    203202                                  test_info.image_hash())
    204203        end = time.time()
     
    257256          options: command line options argument from optparse
    258257          filename_list_queue: A thread safe Queue class that contains lists
    259               of (filename, TestInfo) pairs.
     258              of tuples of (filename, uri) pairs.
    260259          result_queue: A thread safe Queue class that will contain tuples of
    261260              (test, failure lists) for the test results.
     
    461460
    462461        Args:
    463           test_info: Object containing the test filename and timeout
     462          test_info: Object containing the test filename, uri and timeout
    464463
    465464        Returns:
     
    509508
    510509        Args:
    511           test_info: Object containing the test filename and timeout
     510          test_info: Object containing the test filename, uri and timeout
    512511
    513512        Returns:
     
    531530        self._next_timeout = start + thread_timeout
    532531
    533         uri = self._port.filename_to_uri(test_info.filename)
    534532        crash, timeout, actual_checksum, output, error = \
    535            self._driver.run_test(uri, test_info.timeout, image_hash)
     533           self._driver.run_test(test_info.uri, test_info.timeout, image_hash)
    536534        end = time.time()
    537535
  • trunk/WebKitTools/Scripts/webkitpy/layout_tests/port/base.py

    r69638 r69674  
    5050from webkitpy.common.system import logutils
    5151from webkitpy.common.system.executive import Executive, ScriptError
    52 from webkitpy.common.system.path import abspath_to_uri
    5352from webkitpy.common.system.user import User
    5453
     
    314313            return "%s://127.0.0.1:%u/%s" % (protocol, port, relative_path)
    315314
    316         return abspath_to_uri(os.path.abspath(filename), self._executive)
     315        abspath = os.path.abspath(filename)
     316
     317        # On Windows, absolute paths are of the form "c:\foo.txt". However,
     318        # all current browsers (except for Opera) normalize file URLs by
     319        # prepending an additional "/" as if the absolute path was
     320        # "/c:/foo.txt". This means that all file URLs end up with "file:///"
     321        # at the beginning.
     322        if sys.platform == 'win32':
     323            abspath = '/' + abspath.replace('\\', '/')
     324
     325        return "file://" + abspath
    317326
    318327    def tests(self, paths):
     
    363372        test = uri
    364373        if uri.startswith("file:///"):
    365             # FIXME: need an inverse of uri_to_abspath()
    366374            if sys.platform == 'win32':
    367375                test = test.replace('file:///', '')
    368376                test = test.replace('/', '\\')
    369             elif sys.platform == 'cygwin':
    370                 test = '/cygdrive/' + uri[8] + '/' + uri[11:]
    371377            else:
    372378                test = test.replace('file://', '')
  • trunk/WebKitTools/Scripts/webkitpy/layout_tests/port/base_unittest.py

    r69638 r69674  
    3535
    3636from webkitpy.common.system.executive import Executive, ScriptError
    37 from webkitpy.common.system.path import abspath_to_uri
    3837from webkitpy.thirdparty.mock import Mock
    3938
     
    229228
    230229    def test_filename_to_uri(self):
     230
    231231        port = base.Port()
    232232        layout_test_dir = port.layout_tests_dir()
    233233        test_file = os.path.join(layout_test_dir, "foo", "bar.html")
     234
     235        # On Windows, absolute paths are of the form "c:\foo.txt". However,
     236        # all current browsers (except for Opera) normalize file URLs by
     237        # prepending an additional "/" as if the absolute path was
     238        # "/c:/foo.txt". This means that all file URLs end up with "file:///"
     239        # at the beginning.
     240        if sys.platform == 'win32':
     241            prefix = "file:///"
     242            path = test_file.replace("\\", "/")
     243        else:
     244            prefix = "file://"
     245            path = test_file
     246
    234247        self.assertEqual(port.filename_to_uri(test_file),
    235                          abspath_to_uri(test_file, Executive()))
     248                         prefix + path)
    236249
    237250
  • trunk/WebKitTools/Scripts/webkitpy/layout_tests/port/chromium.py

    r69638 r69674  
    4444import webbrowser
    4545
    46 from webkitpy.common.system.executive import Executive
    47 from webkitpy.common.system.path import abspath_to_uri, cygpath
    48 from webkitpy.layout_tests.layout_package import test_expectations
    49 
    5046import base
    5147import http_server
     48
     49from webkitpy.common.system.executive import Executive
     50from webkitpy.layout_tests.layout_package import test_expectations
    5251
    5352# Chromium DRT on OSX uses WebKitDriver.
     
    145144            file.write(actual_contents)
    146145
    147         # We use convert_path if there's a chance that the launched
    148         # executable needs filename arguments in a different format than
    149         # the normal format provided by the python runtime. The main
    150         # example of this is running under Cygwin on Windows but
    151         # launching a Win32 binary, where we need to convert the path
    152         # from /cygdrive/c/foo.txt to c:\foo.txt.
    153146        if diff_filename:
    154             cmd = [executable, '--diff',
    155                    self._convert_path(expected_filename),
    156                    self._convert_path(actual_filename),
    157                    self._convert_path(diff_filename)]
     147            cmd = [executable, '--diff', expected_filename,
     148                   actual_filename, diff_filename]
    158149        else:
    159             cmd = [executable,
    160                    self._convert_path(expected_filename),
    161                    self._convert_path(actual_filename)]
     150            cmd = [executable, expected_filename, actual_filename]
    162151
    163152        result = True
     
    352341        return self.path_from_webkit_base('LayoutTests', 'platform', platform)
    353342
    354     def _convert_path(self, path):
    355         """Handles filename conversion for subprocess command line args."""
    356         # See note above in diff_image() for why we need this.
    357         if sys.platform == 'cygwin':
    358             return cygpath(path, self._executive)
    359         return path
    360 
    361343    def _path_to_image_diff(self):
    362344        binary_name = 'image_diff'
     
    378360        driver_args = []
    379361        if self._image_path:
    380             # See note above in diff_image() for why we need
    381             # _convert_path().
    382             driver_args.append("--pixel-tests=" +
    383                                self._port._convert_path(self._image_path))
     362            driver_args.append("--pixel-tests=" + self._image_path)
    384363
    385364        if self._options.use_drt:
  • trunk/WebKitTools/Scripts/webkitpy/layout_tests/run_webkit_tests.py

    r69638 r69674  
    9292
    9393    def __init__(self, port, filename, timeout):
    94         """
     94        """Generates the URI and stores the filename and timeout for this test.
    9595        Args:
    9696          filename: Full path to the test.
    97           timeout: Timeout for running the test in DRT.
     97          timeout: Timeout for running the test in TestShell.
    9898          """
    9999        self.filename = filename
    100100        self._port = port
     101        self.uri = port.filename_to_uri(filename)
    101102        self.timeout = timeout
    102103        self._image_checksum = -1
Note: See TracChangeset for help on using the changeset viewer.