⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 280618 in webkit


Ignore:
Timestamp:
Aug 3, 2021, 3:17:14 PM (5 years ago)
Author:
Jonathan Bedard
Message:

[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.

Location:
trunk/Tools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r280604 r280618  
     12021-08-03  Jonathan Bedard  <jbedard@apple.com>
     2
     3        [webkitpy] Narrow set of terminated simulator processes
     4        https://bugs.webkit.org/show_bug.cgi?id=228752
     5        <rdar://problem/81479508>
     6
     7        Reviewed by Alexey Proskuryakov.
     8
     9        * Scripts/webkitpy/xcode/simulated_device.py:
     10        (SimulatedDeviceManager.initialize_devices): Only check Simulator.app.
     11        (SimulatedDeviceManager.tear_down): Only kill Simulator.app processes.
     12        (SimulatedDevice._delete): Print error if `simctl delete` fails, but continue.
     13
    1142021-08-03  Jonathan Bedard  <jbedard@apple.com>
    215
  • trunk/Tools/Scripts/webkitpy/xcode/simulated_device.py

    r279496 r280618  
    423423            SimulatedDeviceManager._boot_device(device, host)
    424424
    425         if simulator_ui and host.executive.run_command(['killall', '-0', 'Simulator'], return_exit_code=True) != 0:
     425        if simulator_ui and host.executive.run_command(['killall', '-0', 'Simulator.app'], return_exit_code=True) != 0:
    426426            SimulatedDeviceManager._managing_simulator_app = not host.executive.run_command(['open', '-g', '-b', SimulatedDeviceManager.simulator_bundle_id, '--args', '-PasteboardAutomaticSync', '0'], return_exit_code=True)
    427427
     
    490490        host = host or SystemHost()
    491491        if SimulatedDeviceManager._managing_simulator_app:
    492             host.executive.run_command(['killall', '-9', 'Simulator'], return_exit_code=True)
     492            host.executive.run_command(['killall', '-9', 'Simulator.app'], return_exit_code=True)
    493493            SimulatedDeviceManager._managing_simulator_app = False
    494494
     
    505505
    506506        SimulatedDeviceManager.INITIALIZED_DEVICES = None
    507 
    508         if SimulatedDeviceManager._managing_simulator_app:
    509             for pid in host.executive.running_pids(lambda name: 'CoreSimulator.framework' in name):
    510                 host.executive.kill_process(pid)
    511507
    512508        # If we were managing the simulator, there are some cache files we need to remove
     
    608604        self._shut_down(deadline - time.time())
    609605        _log.debug(u"Removing device '{}'".format(self.name))
    610         self.executive.run_command([SimulatedDeviceManager.xcrun, 'simctl', 'delete', self.udid])
     606        if self.executive.run_command([SimulatedDeviceManager.xcrun, 'simctl', 'delete', self.udid], return_exit_code=True):
     607            _log.error(u"Failed to remove '{},' error is not fatal, continuing".format(self.name))
    611608
    612609        # This will (by design) fail if run more than once on the same SimulatedDevice
Note: See TracChangeset for help on using the changeset viewer.