Changeset 77038 in webkit


Ignore:
Timestamp:
Jan 28, 2011 5:41:51 PM (13 years ago)
Author:
dpranke@chromium.org
Message:

2011-01-28 Dirk Pranke <dpranke@chromium.org>

Unreviewed, build fix.

Take two. The fix in 77023 didn't work, because we were
still calling path.abspath_to_uri, which calls _cygpath under
the covers, and it appears the cygpath on the bots does
something different than it does on my machine. This patch
removes the calls to path.abspath_to_uri, so it should be safe.
If it doesn't work, I'll roll it out along with r76982 and 77023.

https://bugs.webkit.org/show_bug.cgi?id=53126

  • Scripts/webkitpy/layout_tests/port/test.py:
Location:
trunk/Tools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r77030 r77038  
     12011-01-28  Dirk Pranke  <dpranke@chromium.org>
     2
     3        Unreviewed, build fix.
     4
     5        Take two. The fix in 77023 didn't work, because we were
     6        still calling path.abspath_to_uri, which calls _cygpath under
     7        the covers, and it appears the cygpath on the bots does
     8        something different than it does on my machine. This patch
     9        removes the calls to path.abspath_to_uri, so it should be safe.
     10        If it doesn't work, I'll roll it out along with r76982 and 77023.
     11
     12        https://bugs.webkit.org/show_bug.cgi?id=53126
     13
     14        * Scripts/webkitpy/layout_tests/port/test.py:
     15
    1162011-01-28  David Kilzer  <ddkilzer@apple.com>
    217
  • trunk/Tools/Scripts/webkitpy/layout_tests/port/test.py

    r76982 r77038  
    284284        return name_map[test_platform_name]
    285285
     286    # FIXME: These next two routines are copied from base.py with
     287    # the calls to path.abspath_to_uri() removed. We shouldn't have
     288    # to do this.
     289    def filename_to_uri(self, filename):
     290        """Convert a test file (which is an absolute path) to a URI."""
     291        LAYOUTTEST_HTTP_DIR = "http/tests/"
     292        LAYOUTTEST_WEBSOCKET_DIR = "http/tests/websocket/tests/"
     293
     294        relative_path = self.relative_test_filename(filename)
     295        port = None
     296        use_ssl = False
     297
     298        if (relative_path.startswith(LAYOUTTEST_WEBSOCKET_DIR)
     299            or relative_path.startswith(LAYOUTTEST_HTTP_DIR)):
     300            relative_path = relative_path[len(LAYOUTTEST_HTTP_DIR):]
     301            port = 8000
     302
     303        # Make http/tests/local run as local files. This is to mimic the
     304        # logic in run-webkit-tests.
     305        #
     306        # TODO(dpranke): remove the media reference and the SSL reference?
     307        if (port and not relative_path.startswith("local/") and
     308            not relative_path.startswith("media/")):
     309            if relative_path.startswith("ssl/"):
     310                port += 443
     311                protocol = "https"
     312            else:
     313                protocol = "http"
     314            return "%s://127.0.0.1:%u/%s" % (protocol, port, relative_path)
     315
     316        return "file://" + self._filesystem.abspath(filename)
     317
     318    def uri_to_test_name(self, uri):
     319        """Return the base layout test name for a given URI.
     320
     321        This returns the test name for a given URI, e.g., if you passed in
     322        "file:///src/LayoutTests/fast/html/keygen.html" it would return
     323        "fast/html/keygen.html".
     324
     325        """
     326        test = uri
     327        if uri.startswith("file:///"):
     328            prefix = "file://" + self.layout_tests_dir() + "/"
     329            return test[len(prefix):]
     330
     331        if uri.startswith("http://127.0.0.1:8880/"):
     332            # websocket tests
     333            return test.replace('http://127.0.0.1:8880/', '')
     334
     335        if uri.startswith("http://"):
     336            # regular HTTP test
     337            return test.replace('http://127.0.0.1:8000/', 'http/tests/')
     338
     339        if uri.startswith("https://"):
     340            return test.replace('https://127.0.0.1:8443/', 'http/tests/')
     341
     342        raise NotImplementedError('unknown url type: %s' % uri)
     343
     344
    286345    def version(self):
    287346        return ''
Note: See TracChangeset for help on using the changeset viewer.