WebKit Bugzilla
Attachment 346817 Details for
Bug 187973
: [webkitpy][Win] LayoutTests: test names should be Unix style, separated by slash not backslash
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-187973-20180809130226.patch (text/plain), 6.49 KB, created by
Fujii Hironori
on 2018-08-08 21:02:27 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Fujii Hironori
Created:
2018-08-08 21:02:27 PDT
Size:
6.49 KB
patch
obsolete
>Subversion Revision: 234715 >diff --git a/Tools/ChangeLog b/Tools/ChangeLog >index 22c3cc5e60f7a2998415dde23ada9e7b2e448481..53a489fc6b29fab03c3d07675711b3f6aa192753 100644 >--- a/Tools/ChangeLog >+++ b/Tools/ChangeLog >@@ -1,3 +1,32 @@ >+2018-08-08 Fujii Hironori <Hironori.Fujii@sony.com> >+ >+ [webkitpy][Win] LayoutTests: test names should be Unix style, separated by slash not backslash >+ https://bugs.webkit.org/show_bug.cgi?id=187973 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ In LayoutTests, test names have been canonicalized in Unix style >+ since Bug 63597, for example 'fast/css/001.html'. But, Bug 179219, >+ Bug 179572, Bug 180660 and Bug 181814 have changed to use >+ os.path.seq instead of slash if Windows Python is used. >+ >+ Revert parts of those changes. Change relative_test_filename to >+ return a slash sperated test name as well as chromium_win.py used >+ to do. >+ >+ This change fixes all 41 test-webkitpy failures in WinCairo port. >+ >+ * Scripts/webkitpy/layout_tests/models/test_expectations.py: >+ (TestExpectationParser._parse_line): Do not convert a test name by using normpath. >+ * Scripts/webkitpy/port/base.py: >+ (Port.normalize_test_name): Use TEST_PATH_SEPARATOR instead of os.path.sep. >+ (Port.relative_test_filename): Replace self.host.filesystem.sep with self.TEST_PATH_SEPARATOR. >+ (Port.abspath_for_test): Split test_name with TEST_PATH_SEPARATOR. >+ * Scripts/webkitpy/port/driver.py: >+ (Driver): Use '/' instead of os.sep. >+ * Scripts/webkitpy/port/win.py: >+ (WinCairoPort): Do not override TEST_PATH_SEPARATOR. >+ > 2018-08-08 Alex Christensen <achristensen@webkit.org> > > Fix possible null dereference in WebBackForwardList::restoreFromState >diff --git a/Tools/Scripts/webkitpy/layout_tests/models/test_expectations.py b/Tools/Scripts/webkitpy/layout_tests/models/test_expectations.py >index aa5b511d1e06bd7e62d6486a13f4c82c9664d65e..cdcda1ac3870fea30cf7bba2451cca8c7276e876 100644 >--- a/Tools/Scripts/webkitpy/layout_tests/models/test_expectations.py >+++ b/Tools/Scripts/webkitpy/layout_tests/models/test_expectations.py >@@ -31,7 +31,6 @@ for layout tests. > """ > > import logging >-import os.path > import re > > from webkitpy.layout_tests.models.test_configuration import TestConfigurationConverter >@@ -139,12 +138,11 @@ class TestExpectationParser(object): > if not self._check_test_exists(expectation_line): > return > >- path = os.path.normpath(expectation_line.name) >- expectation_line.is_file = self._port.test_isfile(path) >+ expectation_line.is_file = self._port.test_isfile(expectation_line.name) > if expectation_line.is_file: >- expectation_line.path = path >+ expectation_line.path = expectation_line.name > else: >- expectation_line.path = self._port.normalize_test_name(path) >+ expectation_line.path = self._port.normalize_test_name(expectation_line.name) > > self._collect_matching_tests(expectation_line) > >diff --git a/Tools/Scripts/webkitpy/port/base.py b/Tools/Scripts/webkitpy/port/base.py >index d607cbeb1049ee85700ec179aa42fd9ad3e5fd03..8c86b6b092a569aaa73484c6c6a7e1c9def5da78 100644 >--- a/Tools/Scripts/webkitpy/port/base.py >+++ b/Tools/Scripts/webkitpy/port/base.py >@@ -700,10 +700,10 @@ class Port(object): > > def normalize_test_name(self, test_name): > """Returns a normalized version of the test name or test directory.""" >- if test_name.endswith(os.path.sep): >+ if test_name.endswith(self.TEST_PATH_SEPARATOR): > return test_name > if self.test_isdir(test_name): >- return test_name + os.path.sep >+ return test_name + self.TEST_PATH_SEPARATOR > return test_name > > def driver_cmd_line_for_logging(self): >@@ -830,7 +830,9 @@ class Port(object): > # Ports that run on windows need to override this method to deal with > # filenames with backslashes in them. > if filename.startswith(self.layout_tests_dir()): >- return self.host.filesystem.relpath(filename, self.layout_tests_dir()) >+ path = self.host.filesystem.relpath(filename, self.layout_tests_dir()) >+ path = path.replace(self.host.filesystem.sep, self.TEST_PATH_SEPARATOR) >+ return path > else: > return self.host.filesystem.abspath(filename) > >@@ -839,7 +841,7 @@ class Port(object): > """Returns the full path to the file for a given test name. This is the > inverse of relative_test_filename() if no target_host is specified.""" > host = target_host or self.host >- return host.filesystem.join(host.filesystem.map_base_host_path(self.layout_tests_dir()), test_name) >+ return host.filesystem.join(host.filesystem.map_base_host_path(self.layout_tests_dir()), *test_name.split(self.TEST_PATH_SEPARATOR)) > > def jsc_results_directory(self): > return self._build_path() >diff --git a/Tools/Scripts/webkitpy/port/driver.py b/Tools/Scripts/webkitpy/port/driver.py >index 29982adc134eb506509e6449cb8ba0de9faa0fd2..ea287fe000b2775d10d279237424d3ae3e989fbd 100644 >--- a/Tools/Scripts/webkitpy/port/driver.py >+++ b/Tools/Scripts/webkitpy/port/driver.py >@@ -254,10 +254,10 @@ class Driver(object): > return shlex.split(self._port.get_option('wrapper')) + wrapper_arguments > return wrapper_arguments > >- 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 >+ 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/" > > def is_http_test(self, test_name): > return test_name.startswith(self.HTTP_DIR) and not test_name.startswith(self.HTTP_LOCAL_DIR) >diff --git a/Tools/Scripts/webkitpy/port/win.py b/Tools/Scripts/webkitpy/port/win.py >index 510b6e729c525af23fc18e907257cd7c637f92d4..c86ff42aaca81eab76b909880e1870ac444055a8 100644 >--- a/Tools/Scripts/webkitpy/port/win.py >+++ b/Tools/Scripts/webkitpy/port/win.py >@@ -475,8 +475,6 @@ class WinCairoPort(WinPort): > > DEFAULT_ARCHITECTURE = 'x86_64' > >- TEST_PATH_SEPARATOR = os.sep >- > def default_baseline_search_path(self): > version_name_map = VersionNameMap.map(self.host.platform) > if self._os_version < self.VERSION_MIN or self._os_version > self.VERSION_MAX:
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 187973
:
346701
|
346702
|
346760
| 346817