webkitpy: No option to only show unexpected failures in results.html for iPad
authorjbedard@apple.com <jbedard@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 12 Feb 2019 21:53:00 +0000 (21:53 +0000)
committerjbedard@apple.com <jbedard@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 12 Feb 2019 21:53:00 +0000 (21:53 +0000)
https://bugs.webkit.org/show_bug.cgi?id=194554
<rdar://problem/47922442>

Rubber-stamped by Aakash Jain.

Just because a TestExpecations file does not exist for a specific platform does not mean that
TestExpecations are not being used, given that platforms inherit test expectations.

* Scripts/webkitpy/port/base.py:
(Port.uses_test_expectations_file): Check all possible locations of a TestExpectations file.
* Scripts/webkitpy/port/base_unittest.py:
(PortTest.test_uses_test_expectations_file):

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

Tools/ChangeLog
Tools/Scripts/webkitpy/port/base.py
Tools/Scripts/webkitpy/port/base_unittest.py

index afeb407..ba193f9 100644 (file)
@@ -1,3 +1,19 @@
+2019-02-12  Jonathan Bedard  <jbedard@apple.com>
+
+        webkitpy: No option to only show unexpected failures in results.html for iPad
+        https://bugs.webkit.org/show_bug.cgi?id=194554
+        <rdar://problem/47922442>
+
+        Rubber-stamped by Aakash Jain.
+
+        Just because a TestExpecations file does not exist for a specific platform does not mean that
+        TestExpecations are not being used, given that platforms inherit test expectations.
+
+        * Scripts/webkitpy/port/base.py:
+        (Port.uses_test_expectations_file): Check all possible locations of a TestExpectations file.
+        * Scripts/webkitpy/port/base_unittest.py:
+        (PortTest.test_uses_test_expectations_file):
+
 2019-02-12  Alex Christensen  <achristensen@webkit.org>
 
         Remove setDefersLoading infrastructure from WebKit2
index 3404915..d4f808e 100644 (file)
@@ -1157,7 +1157,10 @@ class Port(object):
     def uses_test_expectations_file(self):
         # This is different from checking test_expectations() is None, because
         # some ports have Skipped files which are returned as part of test_expectations().
-        return self._filesystem.exists(self.path_to_test_expectations_file())
+        for path in self.default_baseline_search_path():
+            if self._filesystem.exists(self._filesystem.join(path, 'TestExpectations')):
+                return True
+        return False
 
     def warn_if_bug_missing_in_test_expectations(self):
         return False
index e7409cc..16854fa 100644 (file)
@@ -225,9 +225,8 @@ class PortTest(unittest.TestCase):
     def test_uses_test_expectations_file(self):
         port = self.make_port(port_name='foo')
         port.port_name = 'foo'
-        port.path_to_test_expectations_file = lambda: '/mock-results/TestExpectations'
         self.assertFalse(port.uses_test_expectations_file())
-        port._filesystem = MockFileSystem({'/mock-results/TestExpectations': ''})
+        port._filesystem = MockFileSystem({'/mock-checkout/LayoutTests/platform/foo/TestExpectations': ''})
         self.assertTrue(port.uses_test_expectations_file())
 
     def test_find_no_paths_specified(self):