Title: [219747] trunk/Tools
Revision
219747
Author
[email protected]
Date
2017-07-21 15:20:37 -0700 (Fri, 21 Jul 2017)

Log Message

Fail gracefully when xcrun fails in IOSSimulatorPort constructor
https://bugs.webkit.org/show_bug.cgi?id=174724

Reviewed by Aakash Jain.

* Scripts/webkitpy/port/ios_simulator.py:
(IOSSimulatorPort.__init__): Ignore any errors when attempting to find a running
simulator. Errors here should be treated the same as no simulators found.

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (219746 => 219747)


--- trunk/Tools/ChangeLog	2017-07-21 22:04:01 UTC (rev 219746)
+++ trunk/Tools/ChangeLog	2017-07-21 22:20:37 UTC (rev 219747)
@@ -1,3 +1,14 @@
+2017-07-21  Jonathan Bedard  <[email protected]>
+
+        Fail gracefully when xcrun fails in IOSSimulatorPort constructor
+        https://bugs.webkit.org/show_bug.cgi?id=174724
+
+        Reviewed by Aakash Jain.
+
+        * Scripts/webkitpy/port/ios_simulator.py:
+        (IOSSimulatorPort.__init__): Ignore any errors when attempting to find a running
+        simulator. Errors here should be treated the same as no simulators found.
+
 2017-07-21  Yousuke Kimoto  <[email protected]>
 
         [CMake] Add an option to stop build after generating project files

Modified: trunk/Tools/Scripts/webkitpy/port/ios_simulator.py (219746 => 219747)


--- trunk/Tools/Scripts/webkitpy/port/ios_simulator.py	2017-07-21 22:04:01 UTC (rev 219746)
+++ trunk/Tools/Scripts/webkitpy/port/ios_simulator.py	2017-07-21 22:20:37 UTC (rev 219747)
@@ -29,6 +29,7 @@
 import time
 
 from webkitpy.common.memoized import memoized
+from webkitpy.common.system.executive import ScriptError
 from webkitpy.port.device import Device
 from webkitpy.port.ios import IOSPort
 from webkitpy.xcode.simulator import Simulator, Runtime, DeviceType
@@ -78,7 +79,11 @@
         _log.debug('IOSSimulatorPort _device_class is %s', self._device_class)
 
         if not IOSSimulatorPort._CURRENT_DEVICE:
-            IOSSimulatorPort._CURRENT_DEVICE = Device(Simulator(host).current_device())
+            try:
+                IOSSimulatorPort._CURRENT_DEVICE = Device(Simulator(host).current_device())
+            except ScriptError:
+                # Failure to find a current device should not result in an exception being thrown
+                IOSSimulatorPort._CURRENT_DEVICE = Device(None)
         self._current_device = IOSSimulatorPort._CURRENT_DEVICE
         if not self._current_device:
             self.set_option('dedicated_simulators', True)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to