Title: [218996] trunk/Tools
- Revision
- 218996
- Author
- [email protected]
- Date
- 2017-06-30 08:33:16 -0700 (Fri, 30 Jun 2017)
Log Message
Add support for different versions of iOS when loading test expectations
https://bugs.webkit.org/show_bug.cgi?id=173774
<rdar://problem/32951132>
Rubber-stamped by Aakash Jain.
When running layout tests, we should support multiple version of iOS the same way we do Mac.
* Scripts/webkitpy/port/ios.py:
(IOSPort.default_baseline_search_path): Add ios-<major version> test expectation.
(IOSPort.test_expectations_file_position): Added new file expectations, increment expected file position.
(IOSPort.ios_version): iOS ports must define a function to retrieve the iOS version.
* Scripts/webkitpy/port/ios_device.py:
(IOSDevicePort.ios_version): Ask connected devices for implementation.
* Scripts/webkitpy/port/ios_device_unittest.py:
(IOSDeviceTest.test_additional_platform_directory): Skip test until bug 173775 is finished.
(IOSDeviceTest.test_baseline_searchpath): Ditto.
(IOSDeviceTest.test_expectations_ordering): Ditto.
* Scripts/webkitpy/port/ios_simulator.py:
(IOSSimulatorPort.ios_version): If a runtime is specified, ask the runtime for the iOS version. Otherwise,
ask the platform.
Modified Paths
Diff
Modified: trunk/Tools/ChangeLog (218995 => 218996)
--- trunk/Tools/ChangeLog 2017-06-30 15:09:58 UTC (rev 218995)
+++ trunk/Tools/ChangeLog 2017-06-30 15:33:16 UTC (rev 218996)
@@ -1,3 +1,27 @@
+2017-06-30 Jonathan Bedard <[email protected]>
+
+ Add support for different versions of iOS when loading test expectations
+ https://bugs.webkit.org/show_bug.cgi?id=173774
+ <rdar://problem/32951132>
+
+ Rubber-stamped by Aakash Jain.
+
+ When running layout tests, we should support multiple version of iOS the same way we do Mac.
+
+ * Scripts/webkitpy/port/ios.py:
+ (IOSPort.default_baseline_search_path): Add ios-<major version> test expectation.
+ (IOSPort.test_expectations_file_position): Added new file expectations, increment expected file position.
+ (IOSPort.ios_version): iOS ports must define a function to retrieve the iOS version.
+ * Scripts/webkitpy/port/ios_device.py:
+ (IOSDevicePort.ios_version): Ask connected devices for implementation.
+ * Scripts/webkitpy/port/ios_device_unittest.py:
+ (IOSDeviceTest.test_additional_platform_directory): Skip test until bug 173775 is finished.
+ (IOSDeviceTest.test_baseline_searchpath): Ditto.
+ (IOSDeviceTest.test_expectations_ordering): Ditto.
+ * Scripts/webkitpy/port/ios_simulator.py:
+ (IOSSimulatorPort.ios_version): If a runtime is specified, ask the runtime for the iOS version. Otherwise,
+ ask the platform.
+
2017-06-30 Jacobo Aragunde Pérez <[email protected]>
Fontconfig build breaks with glibc 2.15+
Modified: trunk/Tools/Scripts/webkitpy/port/ios.py (218995 => 218996)
--- trunk/Tools/Scripts/webkitpy/port/ios.py 2017-06-30 15:09:58 UTC (rev 218995)
+++ trunk/Tools/Scripts/webkitpy/port/ios.py 2017-06-30 15:33:16 UTC (rev 218996)
@@ -93,6 +93,7 @@
fallback_names = [
'{}-{}'.format(self.port_name, wk_string),
self.port_name,
+ '{}-{}'.format(IOSPort.port_name, self.ios_version().split('.')[0]),
'{}-{}'.format(IOSPort.port_name, wk_string),
IOSPort.port_name,
]
@@ -102,8 +103,11 @@
return map(self._webkit_baseline_path, fallback_names)
def test_expectations_file_position(self):
- return 3
+ return 4
+ def ios_version(self):
+ raise NotImplementedError
+
def _create_devices(self, device_class):
raise NotImplementedError
Modified: trunk/Tools/Scripts/webkitpy/port/ios_device.py (218995 => 218996)
--- trunk/Tools/Scripts/webkitpy/port/ios_device.py 2017-06-30 15:09:58 UTC (rev 218995)
+++ trunk/Tools/Scripts/webkitpy/port/ios_device.py 2017-06-30 15:33:16 UTC (rev 218996)
@@ -91,6 +91,25 @@
return (stderr, crashlog)
return (stderr, None)
+ @memoized
+ def ios_version(self):
+ if not apple_additions():
+ raise RuntimeError(self.NO_ON_DEVICE_TESTING)
+
+ # FIXME: We should replace --runtime with something which makes sense for both Simulator and Device
+ # https://bugs.webkit.org/show_bug.cgi?id=173775
+ if len(self._device_for_worker_number_map()) == 0:
+ raise RuntimeError('No devices are available')
+ version = None
+ for device in self._device_for_worker_number_map():
+ if not version:
+ version = device.platform.os_version
+ else:
+ if device.platform.os_version != version:
+ raise RuntimeError('Multiple connected devices have different iOS versions')
+
+ return version
+
# FIXME: These need device implementations <rdar://problem/30497991>.
def check_for_leaks(self, process_name, process_pid):
pass
Modified: trunk/Tools/Scripts/webkitpy/port/ios_device_unittest.py (218995 => 218996)
--- trunk/Tools/Scripts/webkitpy/port/ios_device_unittest.py 2017-06-30 15:09:58 UTC (rev 218995)
+++ trunk/Tools/Scripts/webkitpy/port/ios_device_unittest.py 2017-06-30 15:33:16 UTC (rev 218996)
@@ -87,3 +87,13 @@
port = self.make_port(port_name=self.port_name)
with self.assertRaises(RuntimeError):
port._get_crash_log('DumpRenderTree', 1234, None, None, time.time(), wait_for_log=False)
+
+ # FIXME: https://bugs.webkit.org/show_bug.cgi?id=173775
+ def test_additional_platform_directory(self):
+ pass
+
+ def test_baseline_searchpath(self):
+ pass
+
+ def test_expectations_ordering(self):
+ pass
Modified: trunk/Tools/Scripts/webkitpy/port/ios_simulator.py (218995 => 218996)
--- trunk/Tools/Scripts/webkitpy/port/ios_simulator.py 2017-06-30 15:09:58 UTC (rev 218995)
+++ trunk/Tools/Scripts/webkitpy/port/ios_simulator.py 2017-06-30 15:33:16 UTC (rev 218996)
@@ -100,6 +100,14 @@
runtime = Runtime.from_version_string(self.host.platform.xcode_sdk_version('iphonesimulator'))
return runtime
+ def ios_version(self):
+ # FIXME: We should replace --runtime with something which makes sense for both Simulator and Device
+ # https://bugs.webkit.org/show_bug.cgi?id=173775
+ runtime_identifier = self.get_option('runtime')
+ if runtime_identifier:
+ return '.'.join(str(i) for i in Runtime.from_identifier(runtime_identifier).version)
+ return self.host.platform.xcode_sdk_version('iphonesimulator')
+
def simulator_device_type(self):
device_type_identifier = self.get_option('device_type')
if device_type_identifier:
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes