Changeset 217147 in webkit
- Timestamp:
- May 19, 2017, 1:47:44 PM (8 years ago)
- Location:
- trunk/Tools
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r217136 r217147 1 2017-05-19 Jonathan Bedard <jbedard@apple.com> 2 3 webkitpy: Use simctl boot to run multiple simulators at once 4 https://bugs.webkit.org/show_bug.cgi?id=172374 5 6 Reviewed by Alexey Proskuryakov. 7 8 * Scripts/webkitpy/common/system/platforminfo.py: 9 (PlatformInfo.xcode_version): Return the current version of Xcode. 10 * Scripts/webkitpy/common/system/platforminfo_mock.py: 11 (MockPlatformInfo.xcode_version): Return version 8.0 for testing. 12 * Scripts/webkitpy/port/ios_simulator.py: 13 (IOSSimulatorPort.use_multiple_simulator_apps): Return true if we need to 14 run multiple Simulator.app instances. 15 (IOSSimulatorPort._create_simulators): Only copy the simulator app for older 16 versions of Xcode. 17 (IOSSimulatorPort._create_devices): Use 'simctl boot' directly unless using 18 an older version of Xcode. 19 1 20 2017-05-19 Wenson Hsieh <wenson_hsieh@apple.com> 2 21 -
trunk/Tools/Scripts/webkitpy/common/system/platforminfo.py
r202362 r217147 134 134 return (line for line in output.splitlines()) 135 135 136 def xcode_version(self): 137 if not self.is_mac(): 138 raise NotImplementedError 139 return self._executive.run_command(['xcodebuild', '-version']).split()[1] 140 136 141 def _determine_os_name(self, sys_platform): 137 142 if sys_platform == 'darwin': -
trunk/Tools/Scripts/webkitpy/common/system/platforminfo_mock.py
r179788 r217147 61 61 return '8.1' 62 62 63 def xcode_version(self): 64 return '8.0' 65 63 66 def xcode_simctl_list(self): 64 67 return self.expected_xcode_simctl_list -
trunk/Tools/Scripts/webkitpy/port/ios_simulator.py
r216776 r217147 171 171 _log.warning('Unable to remove Simulator' + str(i)) 172 172 173 def use_multiple_simulator_apps(self): 174 return int(self.host.platform.xcode_version().split('.')[0]) < 9 175 173 176 def _create_simulators(self): 174 177 if (self.default_child_processes() < self.child_processes()): … … 179 182 if self._using_dedicated_simulators(): 180 183 atexit.register(lambda: self._teardown_managed_simulators()) 181 self._createSimulatorApps() 184 185 if self.use_multiple_simulator_apps(): 186 self._createSimulatorApps() 182 187 183 188 for i in xrange(self.child_processes()): … … 212 217 213 218 # FIXME: <rdar://problem/20916140> Switch to using CoreSimulator.framework for launching and quitting iOS Simulator 214 self._executive.run_command([ 215 'open', '-g', '-b', self.SIMULATOR_BUNDLE_ID + str(i), 216 '--args', '-CurrentDeviceUDID', device_udid]) 219 if self.use_multiple_simulator_apps(): 220 self._executive.run_command([ 221 'open', '-g', '-b', self.SIMULATOR_BUNDLE_ID + str(i), 222 '--args', '-CurrentDeviceUDID', device_udid]) 223 else: 224 self._executive.run_command(['xcrun', 'simctl', 'boot', device_udid]) 217 225 218 226 if mac_os_version in ['elcapitan', 'yosemite', 'mavericks']: 219 227 time.sleep(2.5) 228 229 if not self.use_multiple_simulator_apps(): 230 self._executive.run_command(['open', '-g', '-b', self.SIMULATOR_BUNDLE_ID]) 220 231 221 232 _log.info('Waiting for all iOS Simulators to finish booting.') 222 233 for i in xrange(self.child_processes()): 223 234 Simulator.wait_until_device_is_booted(Simulator.managed_devices[i].udid) 235 _log.info('All simulators have booted.') 224 236 225 237 IOSSimulatorPort._DEVICE_MAP = {}
Note:
See TracChangeset
for help on using the changeset viewer.