https://bugs.webkit.org/show_bug.cgi?id=170505
Reviewed by Alexey Proskuryakov.
* Scripts/webkitpy/port/simulator_process.py:
(SimulatorProcess._start.handler): Add pid to exception.
(SimulatorProcess._start): Ditto.
* Scripts/webkitpy/xcode/simulated_device.py:
(SimulatedDevice.launch_app): Log pid when the process fails to launch and when
a pid is successfully returned.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214965
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2017-04-05 Jonathan Bedard <jbedard@apple.com>
+
+ webkitpy: Add pid logging for simulator processes
+ https://bugs.webkit.org/show_bug.cgi?id=170505
+
+ Reviewed by Alexey Proskuryakov.
+
+ * Scripts/webkitpy/port/simulator_process.py:
+ (SimulatorProcess._start.handler): Add pid to exception.
+ (SimulatorProcess._start): Ditto.
+ * Scripts/webkitpy/xcode/simulated_device.py:
+ (SimulatedDevice.launch_app): Log pid when the process fails to launch and when
+ a pid is successfully returned.
+
2017-04-05 Ryan Haddad <ryanhaddad@apple.com>
Unreviewed, rolling out r214932.
def handler(signum, frame):
assert signum == signal.SIGALRM
- raise Exception('Timed out waiting for process to connect at port {}'.format(self._target_host.listening_port()))
+ raise Exception('Timed out waiting for pid {} to connect at port {}'.format(self._pid, self._target_host.listening_port()))
signal.signal(signal.SIGALRM, handler)
signal.alarm(6) # In seconds
self._proc = SimulatorProcess.Popen(self._pid, stdin, stdout, stderr, self._target_host)
if self._proc.poll() is not None:
self._reset()
- raise Exception('App {} crashed before stdin could be attached'.format(os.path.basename(self._cmd[0])))
+ raise Exception('App {} with pid {} crashed before stdin could be attached'.format(os.path.basename(self._cmd[0]), self._pid))
self._kill()
self._reset()
raise
# FIXME: We shouldn't need to check the PID <rdar://problem/31154075>.
if match and self.executive.check_running_pid(int(match.group('pid'))):
break
+ if match:
+ _log.debug('simctl launch reported pid {}, but this process is not running'.format(match.group('pid')))
+ else:
+ _log.debug('simctl launch did not report a pid')
signal.alarm(0) # Cancel alarm
if match.group('bundle') != bundle_id:
raise RuntimeError('Failed to find process id for {}: {}'.format(bundle_id, output))
+ _log.debug('Returning pid {} of launched process'.format(match.group('pid')))
return int(match.group('pid'))
def __eq__(self, other):