Unreviewed, rolling out r234749.
authortsavell@apple.com <tsavell@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 10 Aug 2018 18:56:39 +0000 (18:56 +0000)
committertsavell@apple.com <tsavell@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 10 Aug 2018 18:56:39 +0000 (18:56 +0000)
Caused all perf tests to fail in Sierra

Reverted changeset:

"[webkitpy][Win] LayoutTests: test names should be Unix style,
separated by slash not backslash"
https://bugs.webkit.org/show_bug.cgi?id=187973
https://trac.webkit.org/changeset/234749

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@234765 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Tools/ChangeLog
Tools/Scripts/webkitpy/layout_tests/models/test_expectations.py
Tools/Scripts/webkitpy/port/base.py
Tools/Scripts/webkitpy/port/driver.py
Tools/Scripts/webkitpy/port/win.py

index a0ce316..58ad1d2 100644 (file)
@@ -1,3 +1,16 @@
+2018-08-10  Truitt Savell  <tsavell@apple.com>
+
+        Unreviewed, rolling out r234749.
+
+        Caused all perf tests to fail in Sierra
+
+        Reverted changeset:
+
+        "[webkitpy][Win] LayoutTests: test names should be Unix style,
+        separated by slash not backslash"
+        https://bugs.webkit.org/show_bug.cgi?id=187973
+        https://trac.webkit.org/changeset/234749
+
 2018-08-10  David Fenton  <david_fenton@apple.com>
 
         Timeouts in TestWebKitAPI.PreferredAudioBufferSize.AudioWithWebAudio and TestWebKitAPI.PreferredAudioBufferSize.WebAudio.
index e54ac94..d95064d 100644 (file)
@@ -31,6 +31,7 @@ for layout tests.
 """
 
 import logging
+import os.path
 import re
 
 from webkitpy.layout_tests.models.test_configuration import TestConfigurationConverter
@@ -138,11 +139,12 @@ class TestExpectationParser(object):
         if not self._check_test_exists(expectation_line):
             return
 
-        expectation_line.is_file = self._port.test_isfile(expectation_line.name)
+        path = os.path.normpath(expectation_line.name)
+        expectation_line.is_file = self._port.test_isfile(path)
         if expectation_line.is_file:
-            expectation_line.path = expectation_line.name
+            expectation_line.path = path
         else:
-            expectation_line.path = self._port.normalize_test_name(expectation_line.name)
+            expectation_line.path = self._port.normalize_test_name(path)
 
         self._collect_matching_tests(expectation_line)
 
index 8c86b6b..d607cbe 100644 (file)
@@ -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(self.TEST_PATH_SEPARATOR):
+        if test_name.endswith(os.path.sep):
             return test_name
         if self.test_isdir(test_name):
-            return test_name + self.TEST_PATH_SEPARATOR
+            return test_name + os.path.sep
         return test_name
 
     def driver_cmd_line_for_logging(self):
@@ -830,9 +830,7 @@ 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()):
-            path = self.host.filesystem.relpath(filename, self.layout_tests_dir())
-            path = path.replace(self.host.filesystem.sep, self.TEST_PATH_SEPARATOR)
-            return path
+            return self.host.filesystem.relpath(filename, self.layout_tests_dir())
         else:
             return self.host.filesystem.abspath(filename)
 
@@ -841,7 +839,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.split(self.TEST_PATH_SEPARATOR))
+        return host.filesystem.join(host.filesystem.map_base_host_path(self.layout_tests_dir()), test_name)
 
     def jsc_results_directory(self):
         return self._build_path()
index ea287fe..29982ad 100644 (file)
@@ -254,10 +254,10 @@ class Driver(object):
             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)
index c86ff42..510b6e7 100644 (file)
@@ -475,6 +475,8 @@ 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: