Title: [227171] trunk/Tools
- Revision
- 227171
- Author
- [email protected]
- Date
- 2018-01-18 16:25:48 -0800 (Thu, 18 Jan 2018)
Log Message
[WinCairo] Pass correct url for http test to test driver.
https://bugs.webkit.org/show_bug.cgi?id=181814
Patch by Basuke Suzuki <[email protected]> on 2018-01-18
Reviewed by Alex Christensen.
* Scripts/webkitpy/port/driver.py:
(Driver):
(Driver.http_test_path_to_uri):
(Driver.is_secure_path):
(Driver.http_base_url):
(Driver.uri_to_test):
Modified Paths
Diff
Modified: trunk/Tools/ChangeLog (227170 => 227171)
--- trunk/Tools/ChangeLog 2018-01-19 00:19:00 UTC (rev 227170)
+++ trunk/Tools/ChangeLog 2018-01-19 00:25:48 UTC (rev 227171)
@@ -1,3 +1,17 @@
+2018-01-18 Basuke Suzuki <[email protected]>
+
+ [WinCairo] Pass correct url for http test to test driver.
+ https://bugs.webkit.org/show_bug.cgi?id=181814
+
+ Reviewed by Alex Christensen.
+
+ * Scripts/webkitpy/port/driver.py:
+ (Driver):
+ (Driver.http_test_path_to_uri):
+ (Driver.is_secure_path):
+ (Driver.http_base_url):
+ (Driver.uri_to_test):
+
2018-01-18 Ryan Haddad <[email protected]>
Unreviewed, update the triggerable name for 'sierra-release-perf-tests'
Modified: trunk/Tools/Scripts/webkitpy/port/driver.py (227170 => 227171)
--- trunk/Tools/Scripts/webkitpy/port/driver.py 2018-01-19 00:19:00 UTC (rev 227170)
+++ trunk/Tools/Scripts/webkitpy/port/driver.py 2018-01-19 00:25:48 UTC (rev 227171)
@@ -35,6 +35,7 @@
import time
import os
+from os.path import normpath
from webkitpy.common.system import path
from webkitpy.common.system.profiler import ProfilerFactory
@@ -253,10 +254,10 @@
return shlex.split(self._port.get_option('wrapper')) + wrapper_arguments
return wrapper_arguments
- HTTP_DIR = "http/tests/"
- HTTP_LOCAL_DIR = "http/tests/local/"
- WEBKIT_SPECIFIC_WEB_PLATFORM_TEST_SUBDIR = "http/wpt/"
- WEBKIT_WEB_PLATFORM_TEST_SERVER_ROUTE = "WebKit/"
+ HTTP_DIR = normpath("http/tests") + os.sep
+ HTTP_LOCAL_DIR = normpath("http/tests/local") + os.sep
+ WEBKIT_SPECIFIC_WEB_PLATFORM_TEST_SUBDIR = normpath("http/wpt") + os.sep
+ WEBKIT_WEB_PLATFORM_TEST_SERVER_ROUTE = normpath("WebKit") + os.sep
def is_http_test(self, test_name):
return test_name.startswith(self.HTTP_DIR) and not test_name.startswith(self.HTTP_LOCAL_DIR)
@@ -271,8 +272,15 @@
return self.web_platform_test_server_base_https_url + path if ".https." in path else self.web_platform_test_server_base_http_url + path
def http_test_path_to_uri(self, path):
- return "https://127.0.0.1:8443/" + path if path.startswith("ssl") or ".https." in path else "http://127.0.0.1:8000/" + path
+ path = path.replace(os.sep, '/')
+ return self.http_base_url(secure=self.is_secure_path(path)) + path
+ def is_secure_path(self, path):
+ return path.startswith("ssl") or ".https." in path
+
+ def http_base_url(self, secure=None):
+ return "%s://127.0.0.1:%d/" % (('https', 8443) if secure else ('http', 8000))
+
def test_to_uri(self, test_name):
"""Convert a test name to a URI."""
if self.is_web_platform_test(test_name):
@@ -307,9 +315,9 @@
if uri.startswith(self.web_platform_test_server_base_https_url):
return uri.replace(self.web_platform_test_server_base_https_url, self.web_platform_test_server_doc_root)
if uri.startswith("http://"):
- return uri.replace('http://127.0.0.1:8000/', self.HTTP_DIR)
+ return uri.replace(self.http_base_url(secure=False), self.HTTP_DIR)
if uri.startswith("https://"):
- return uri.replace('https://127.0.0.1:8443/', self.HTTP_DIR)
+ return uri.replace(self.http_base_url(secure=True), self.HTTP_DIR)
raise NotImplementedError('unknown url type: %s' % uri)
def has_crashed(self):
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes