Title: [238684] trunk/Tools
Revision
238684
Author
jbed...@apple.com
Date
2018-11-29 12:42:58 -0800 (Thu, 29 Nov 2018)

Log Message

EWS iOS-sim bots sometimes fails to shutdown simulator
https://bugs.webkit.org/show_bug.cgi?id=191864

Reviewed by Aakash Jain.

* Scripts/webkitpy/xcode/simulated_device.py:
(SimulatedDevice._shut_down): Increase time to wait for simulated device to
shut down, ignore exit code indicating a device is already shut down.

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (238683 => 238684)


--- trunk/Tools/ChangeLog	2018-11-29 20:10:53 UTC (rev 238683)
+++ trunk/Tools/ChangeLog	2018-11-29 20:42:58 UTC (rev 238684)
@@ -1,5 +1,16 @@
 2018-11-29  Jonathan Bedard  <jbed...@apple.com>
 
+        EWS iOS-sim bots sometimes fails to shutdown simulator
+        https://bugs.webkit.org/show_bug.cgi?id=191864
+
+        Reviewed by Aakash Jain.
+
+        * Scripts/webkitpy/xcode/simulated_device.py:
+        (SimulatedDevice._shut_down): Increase time to wait for simulated device to
+        shut down, ignore exit code indicating a device is already shut down.
+
+2018-11-29  Jonathan Bedard  <jbed...@apple.com>
+
         webkitpy: Unify ios_version/watchos_version code
         https://bugs.webkit.org/show_bug.cgi?id=192153
         <rdar://problem/46343642>

Modified: trunk/Tools/Scripts/webkitpy/xcode/simulated_device.py (238683 => 238684)


--- trunk/Tools/Scripts/webkitpy/xcode/simulated_device.py	2018-11-29 20:10:53 UTC (rev 238683)
+++ trunk/Tools/Scripts/webkitpy/xcode/simulated_device.py	2018-11-29 20:42:58 UTC (rev 238684)
@@ -512,11 +512,13 @@
                 return True
         return False
 
-    def _shut_down(self, timeout=10.0):
+    def _shut_down(self, timeout=30.0):
         deadline = time.time() + timeout
 
-        if self.state(force_update=True) != SimulatedDevice.DeviceState.SHUT_DOWN and self.state != SimulatedDevice.DeviceState.SHUTTING_DOWN:
-            self.executive.run_command([SimulatedDeviceManager.xcrun, 'simctl', 'shutdown', self.udid])
+        # Either shutdown is successful, or the device was already shutdown when we attempted to shut it down.
+        exit_code = self.executive.run_command([SimulatedDeviceManager.xcrun, 'simctl', 'shutdown', self.udid], return_exit_code=True)
+        if exit_code != 0 and exit_code != 164:
+            raise RuntimeError('Failed to shutdown {} with exit code {}'.format(self.udid, exit_code))
 
         while self.state(force_update=True) != SimulatedDevice.DeviceState.SHUT_DOWN:
             time.sleep(.5)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to