Changeset 238672 in webkit
- Timestamp:
- Nov 29, 2018, 10:00:14 AM (8 years ago)
- Location:
- trunk/Tools
- Files:
-
- 8 edited
-
ChangeLog (modified) (1 diff)
-
Scripts/webkitpy/port/device_port.py (modified) (1 diff)
-
Scripts/webkitpy/port/ios.py (modified) (2 diffs)
-
Scripts/webkitpy/port/ios_device.py (modified) (1 diff)
-
Scripts/webkitpy/port/ios_simulator.py (modified) (4 diffs)
-
Scripts/webkitpy/port/watch.py (modified) (2 diffs)
-
Scripts/webkitpy/port/watch_device.py (modified) (1 diff)
-
Scripts/webkitpy/port/watch_simulator.py (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r238661 r238672 1 2018-11-29 Jonathan Bedard <jbedard@apple.com> 2 3 webkitpy: Unify ios_version/watchos_version code 4 https://bugs.webkit.org/show_bug.cgi?id=192153 5 <rdar://problem/46343642> 6 7 Reviewed by Lucas Forschler. 8 9 Treating watchOS and iOS versions differently makes it harder to share code between the similar ports. 10 11 * Scripts/webkitpy/port/device_port.py: 12 (DevicePort): 13 (DevicePort.device_version): Added. 14 * Scripts/webkitpy/port/ios.py: 15 (IOSPort.default_baseline_search_path): Use device_version() instead of ios_version(). 16 (IOSPort.ios_version): Deleted. 17 * Scripts/webkitpy/port/ios_device.py: 18 (IOSDevicePort.device_version): Renamed from ios_version(). 19 (IOSDevicePort.ios_version): Deleted. 20 * Scripts/webkitpy/port/ios_simulator.py: 21 (IOSSimulatorPort.device_version): Renamed from ios_version(). 22 (IOSSimulatorPort.default_child_processes.booted_ios_devices_filter): Use device_version() instead of ios_version(). 23 (IOSSimulatorPort._create_devices): Ditto. 24 (IOSSimulatorPort.check_sys_deps): Ditto. 25 (IOSSimulatorPort.ios_version): Deleted. 26 * Scripts/webkitpy/port/watch.py: 27 (WatchPort.default_baseline_search_path): Use device_version() instead of watchos_version(). 28 (WatchPort.watchos_version): Deleted. 29 * Scripts/webkitpy/port/watch_device.py: 30 (WatchDevicePort.device_version): Renamed from watchos_version(). 31 (WatchDevicePort.watchos_version): Deleted. 32 * Scripts/webkitpy/port/watch_simulator.py: 33 (WatchSimulatorPort.device_version): Renamed from watchos_version(). 34 (WatchSimulatorPort.default_child_processes.filter_booted_watchos_devices): Use device_version() instead of watchos_version(). 35 (WatchSimulatorPort._create_devices): Ditto. 36 (WatchSimulatorPort.check_sys_deps): Ditto. 37 (WatchSimulatorPort.watchos_version): Deleted. 38 1 39 2018-11-28 Wenson Hsieh <wenson_hsieh@apple.com> 2 40 -
trunk/Tools/Scripts/webkitpy/port/device_port.py
r238177 r238672 161 161 env['XML_CATALOG_FILES'] = '' # work around missing /etc/catalog <rdar://problem/4292995> 162 162 return env 163 164 def device_version(self): 165 raise NotImplementedError -
trunk/Tools/Scripts/webkitpy/port/ios.py
r238177 r238672 57 57 58 58 versions_to_fallback = [] 59 if self. ios_version().major == self.CURRENT_VERSION.major:59 if self.device_version().major == self.CURRENT_VERSION.major: 60 60 versions_to_fallback = [self.CURRENT_VERSION] 61 elif self. ios_version():62 temp_version = Version(self. ios_version().major)61 elif self.device_version(): 62 temp_version = Version(self.device_version().major) 63 63 while temp_version != self.CURRENT_VERSION: 64 64 versions_to_fallback.append(Version.from_iterable(temp_version)) … … 110 110 def test_expectations_file_position(self): 111 111 return 4 112 113 def ios_version(self):114 raise NotImplementedError -
trunk/Tools/Scripts/webkitpy/port/ios_device.py
r238177 r238672 88 88 89 89 @memoized 90 def ios_version(self):90 def device_version(self): 91 91 if self.get_option('version'): 92 92 return Version.from_string(self.get_option('version')) -
trunk/Tools/Scripts/webkitpy/port/ios_simulator.py
r238177 r238672 61 61 62 62 @memoized 63 def ios_version(self):63 def device_version(self): 64 64 if self.get_option('version'): 65 65 return Version.from_string(self.get_option('version')) … … 71 71 if not device.platform_device.is_booted_or_booting(): 72 72 return False 73 return device.platform_device.device_type in DeviceType(software_variant='iOS', 74 software_version=self.ios_version()) 73 return device.platform_device.device_type in DeviceType(software_variant='iOS', software_version=self.device_version()) 75 74 76 75 if not self.get_option('dedicated_simulators', False): … … 85 84 def _create_devices(self, device_class): 86 85 self._set_device_class(device_class) 87 device_type = DeviceType.from_string(self._device_class, self. ios_version())86 device_type = DeviceType.from_string(self._device_class, self.device_version()) 88 87 89 88 _log.debug('\nCreating devices for {}'.format(device_type)) … … 129 128 130 129 def check_sys_deps(self): 131 target_device_type = DeviceType(software_variant='iOS', software_version=self. ios_version())130 target_device_type = DeviceType(software_variant='iOS', software_version=self.device_version()) 132 131 for device in SimulatedDeviceManager.available_devices(self.host): 133 132 if device.platform_device.device_type in target_device_type: -
trunk/Tools/Scripts/webkitpy/port/watch.py
r238590 r238672 60 60 def default_baseline_search_path(self): 61 61 versions_to_fallback = [] 62 if self. watchos_version() == self.CURRENT_VERSION:62 if self.device_version() == self.CURRENT_VERSION: 63 63 versions_to_fallback = [self.CURRENT_VERSION] 64 elif self. watchos_version():65 temp_version = Version(self. watchos_version().major)64 elif self.device_version(): 65 temp_version = Version(self.device_version().major) 66 66 while temp_version.major != self.CURRENT_VERSION.major: 67 67 versions_to_fallback.append(Version.from_iterable(temp_version)) … … 98 98 99 99 return expectations 100 101 def watchos_version(self):102 # The implementation of this function differs between on-device and simulator testing.103 raise NotImplementedError -
trunk/Tools/Scripts/webkitpy/port/watch_device.py
r238590 r238672 86 86 87 87 @memoized 88 def watchos_version(self):88 def device_version(self): 89 89 if self.get_option('version'): 90 90 return Version.from_string(self.get_option('version')) -
trunk/Tools/Scripts/webkitpy/port/watch_simulator.py
r238590 r238672 63 63 64 64 @memoized 65 def watchos_version(self):65 def device_version(self): 66 66 if self.get_option('version'): 67 67 return Version.from_string(self.get_option('version')) … … 84 84 if not device.platform_device.is_booted_or_booting(): 85 85 return False 86 return device.platform_device.device_type in DeviceType(software_variant='watchOS', software_version=self. watchos_version())86 return device.platform_device.device_type in DeviceType(software_variant='watchOS', software_version=self.device_version()) 87 87 88 88 if not self.get_option('dedicated_simulators', False): … … 97 97 def _create_devices(self, device_class): 98 98 self._set_device_class(device_class) 99 device_type = DeviceType.from_string(self._device_class, self. watchos_version())99 device_type = DeviceType.from_string(self._device_class, self.device_version()) 100 100 101 101 _log.debug('\nCreating devices for {}'.format(device_type)) … … 113 113 114 114 def check_sys_deps(self): 115 target_device_type = DeviceType(software_variant='watchOS', software_version=self. watchos_version())115 target_device_type = DeviceType(software_variant='watchOS', software_version=self.device_version()) 116 116 for device in SimulatedDeviceManager.available_devices(self.host): 117 117 if device.platform_device.device_type in target_device_type:
Note:
See TracChangeset
for help on using the changeset viewer.