webkitpy: Look for 'ios' test expectations for IOSPorts
authorjbedard@apple.com <jbedard@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 27 Mar 2017 21:49:09 +0000 (21:49 +0000)
committerjbedard@apple.com <jbedard@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 27 Mar 2017 21:49:09 +0000 (21:49 +0000)
https://bugs.webkit.org/show_bug.cgi?id=169413

Reviewed by Alexey Proskuryakov.

Test expectations for iOS tests should include the 'ios' folder.  Modify
default_baseline_search_path to include 'ios' folder and derivatives for
IOSPort.

* Scripts/webkitpy/port/ios.py:
(IOSPort._generate_all_test_configurations): Moved from IOSSimulatorPort.
(IOSPort.default_baseline_search_path): Add ios expectations along with port specific expectations.
(IOSPort.test_expectations_file_position): Added for testing.
* Scripts/webkitpy/port/ios_simulator.py:
(IOSSimulatorPort._generate_all_test_configurations): Moved to IOSPort.
(IOSSimulatorPort.default_baseline_search_path): Moved to IOSPort.

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

Tools/ChangeLog
Tools/Scripts/webkitpy/port/ios.py
Tools/Scripts/webkitpy/port/ios_simulator.py

index e6ea95b..928438e 100644 (file)
@@ -1,5 +1,24 @@
 2017-03-27  Jonathan Bedard  <jbedard@apple.com>
 
+        webkitpy: Look for 'ios' test expectations for IOSPorts
+        https://bugs.webkit.org/show_bug.cgi?id=169413
+
+        Reviewed by Alexey Proskuryakov.
+
+        Test expectations for iOS tests should include the 'ios' folder.  Modify
+        default_baseline_search_path to include 'ios' folder and derivatives for
+        IOSPort.
+
+        * Scripts/webkitpy/port/ios.py:
+        (IOSPort._generate_all_test_configurations): Moved from IOSSimulatorPort.
+        (IOSPort.default_baseline_search_path): Add ios expectations along with port specific expectations.
+        (IOSPort.test_expectations_file_position): Added for testing.
+        * Scripts/webkitpy/port/ios_simulator.py:
+        (IOSSimulatorPort._generate_all_test_configurations): Moved to IOSPort.
+        (IOSSimulatorPort.default_baseline_search_path): Moved to IOSPort.
+
+2017-03-27  Jonathan Bedard  <jbedard@apple.com>
+
         REGRESSION: Reseting _device_map on each child process
         <rdar://problem/31274476>
 
index 24d0b18..cf326ca 100644 (file)
@@ -23,6 +23,7 @@
 import logging
 
 from webkitpy.common.memoized import memoized
+from webkitpy.layout_tests.models.test_configuration import TestConfiguration
 from webkitpy.port.darwin import DarwinPort
 from webkitpy.port.simulator_process import SimulatorProcess
 
@@ -55,6 +56,13 @@ class IOSPort(DarwinPort):
             return 'WebKitTestRunnerApp.app'
         return 'DumpRenderTree.app'
 
+    def _generate_all_test_configurations(self):
+        configurations = []
+        for build_type in self.ALL_BUILD_TYPES:
+            for architecture in self.ARCHITECTURES:
+                configurations.append(TestConfiguration(version=self._version, architecture=architecture, build_type=build_type))
+        return configurations
+
     @memoized
     def child_processes(self):
         return int(self.get_option('child_processes'))
@@ -77,6 +85,24 @@ class IOSPort(DarwinPort):
             return self._testing_device(number)
         return self._current_device
 
+    def default_baseline_search_path(self):
+        wk_string = 'wk1'
+        if self.get_option('webkit_test_runner'):
+            wk_string = 'wk2'
+        fallback_names = [
+            '{}-{}'.format(self.port_name, wk_string),
+            self.port_name,
+            '{}-{}'.format(IOSPort.port_name, wk_string),
+            IOSPort.port_name,
+        ]
+        if self.get_option('webkit_test_runner'):
+            fallback_names.append('wk2')
+
+        return map(self._webkit_baseline_path, fallback_names)
+
+    def test_expectations_file_position(self):
+        return 3
+
     def _create_devices(self, device_class):
         raise NotImplementedError
 
index 72cb6bf..de99ee3 100644 (file)
@@ -28,7 +28,6 @@ import subprocess
 import time
 
 from webkitpy.common.memoized import memoized
-from webkitpy.layout_tests.models.test_configuration import TestConfiguration
 from webkitpy.port import image_diff
 from webkitpy.port.device import Device
 from webkitpy.port.ios import IOSPort
@@ -173,21 +172,6 @@ class IOSSimulatorPort(IOSPort):
         sdk = ['--sdk', 'iphonesimulator']
         return archs + sdk
 
-    def _generate_all_test_configurations(self):
-        configurations = []
-        for build_type in self.ALL_BUILD_TYPES:
-            for architecture in self.ARCHITECTURES:
-                configurations.append(TestConfiguration(version=self._version, architecture=architecture, build_type=build_type))
-        return configurations
-
-    def default_baseline_search_path(self):
-        if self.get_option('webkit_test_runner'):
-            fallback_names = [self._wk2_port_name()] + [self.port_name] + ['wk2']
-        else:
-            fallback_names = [self.port_name + '-wk1'] + [self.port_name]
-
-        return map(self._webkit_baseline_path, fallback_names)
-
     def _set_device_class(self, device_class):
         self._device_class = device_class if device_class else self.DEFAULT_DEVICE_CLASS