Modified: trunk/Tools/ChangeLog (280617 => 280618)
--- trunk/Tools/ChangeLog 2021-08-03 22:11:21 UTC (rev 280617)
+++ trunk/Tools/ChangeLog 2021-08-03 22:17:14 UTC (rev 280618)
@@ -1,5 +1,18 @@
2021-08-03 Jonathan Bedard <jbed...@apple.com>
+ [webkitpy] Narrow set of terminated simulator processes
+ https://bugs.webkit.org/show_bug.cgi?id=228752
+ <rdar://problem/81479508>
+
+ Reviewed by Alexey Proskuryakov.
+
+ * Scripts/webkitpy/xcode/simulated_device.py:
+ (SimulatedDeviceManager.initialize_devices): Only check Simulator.app.
+ (SimulatedDeviceManager.tear_down): Only kill Simulator.app processes.
+ (SimulatedDevice._delete): Print error if `simctl delete` fails, but continue.
+
+2021-08-03 Jonathan Bedard <jbed...@apple.com>
+
[webkitscmpy] Add access to `git config`
https://bugs.webkit.org/show_bug.cgi?id=228597
<rdar://problem/81283644>
Modified: trunk/Tools/Scripts/webkitpy/xcode/simulated_device.py (280617 => 280618)
--- trunk/Tools/Scripts/webkitpy/xcode/simulated_device.py 2021-08-03 22:11:21 UTC (rev 280617)
+++ trunk/Tools/Scripts/webkitpy/xcode/simulated_device.py 2021-08-03 22:17:14 UTC (rev 280618)
@@ -422,7 +422,7 @@
SimulatedDeviceManager._boot_device(device, host)
- if simulator_ui and host.executive.run_command(['killall', '-0', 'Simulator'], return_exit_code=True) != 0:
+ if simulator_ui and host.executive.run_command(['killall', '-0', 'Simulator.app'], return_exit_code=True) != 0:
SimulatedDeviceManager._managing_simulator_app = not host.executive.run_command(['open', '-g', '-b', SimulatedDeviceManager.simulator_bundle_id, '--args', '-PasteboardAutomaticSync', '0'], return_exit_code=True)
deadline = time.time() + timeout
@@ -489,7 +489,7 @@
def tear_down(host=None, timeout=SIMULATOR_BOOT_TIMEOUT):
host = host or SystemHost()
if SimulatedDeviceManager._managing_simulator_app:
- host.executive.run_command(['killall', '-9', 'Simulator'], return_exit_code=True)
+ host.executive.run_command(['killall', '-9', 'Simulator.app'], return_exit_code=True)
SimulatedDeviceManager._managing_simulator_app = False
if SimulatedDeviceManager.INITIALIZED_DEVICES is None:
@@ -505,10 +505,6 @@
SimulatedDeviceManager.INITIALIZED_DEVICES = None
- if SimulatedDeviceManager._managing_simulator_app:
- for pid in host.executive.running_pids(lambda name: 'CoreSimulator.framework' in name):
- host.executive.kill_process(pid)
-
# If we were managing the simulator, there are some cache files we need to remove
for directory in host.filesystem.glob('/tmp/com.apple.CoreSimulator.SimDevice.*'):
host.filesystem.rmtree(directory)
@@ -607,7 +603,8 @@
deadline = time.time() + timeout
self._shut_down(deadline - time.time())
_log.debug(u"Removing device '{}'".format(self.name))
- self.executive.run_command([SimulatedDeviceManager.xcrun, 'simctl', 'delete', self.udid])
+ if self.executive.run_command([SimulatedDeviceManager.xcrun, 'simctl', 'delete', self.udid], return_exit_code=True):
+ _log.error(u"Failed to remove '{},' error is not fatal, continuing".format(self.name))
# This will (by design) fail if run more than once on the same SimulatedDevice
SimulatedDeviceManager.AVAILABLE_DEVICES.remove(self)