Simulator launch fails intermittently due to failure in checking simulator boot status
authoraakash_jain@apple.com <aakash_jain@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 21 May 2016 19:21:31 +0000 (19:21 +0000)
committeraakash_jain@apple.com <aakash_jain@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 21 May 2016 19:21:31 +0000 (19:21 +0000)
https://bugs.webkit.org/show_bug.cgi?id=157965
rdar://problem/26402404

Reviewed by Alexey Proskuryakov.

* Scripts/webkitpy/xcode/simulator.py:
(Simulator.wait_until_device_is_booted): Ignore CalledProcessError exception while checking
whether simulator has finished booting.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@201244 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Tools/ChangeLog
Tools/Scripts/webkitpy/xcode/simulator.py

index cdb9e77..642eb2f 100644 (file)
@@ -1,3 +1,15 @@
+2016-05-21  Aakash Jain  <aakash_jain@apple.com>
+
+        Simulator launch fails intermittently due to failure in checking simulator boot status
+        https://bugs.webkit.org/show_bug.cgi?id=157965
+        rdar://problem/26402404
+
+        Reviewed by Alexey Proskuryakov.
+
+        * Scripts/webkitpy/xcode/simulator.py:
+        (Simulator.wait_until_device_is_booted): Ignore CalledProcessError exception while checking
+        whether simulator has finished booting.
+
 2016-05-21  Dan Bernstein  <mitz@apple.com>
 
         Silence warnings from svn propget when using newer versions of Subversion.
index 3dc27eb..6151b52 100644 (file)
@@ -278,9 +278,12 @@ class Simulator(object):
         Simulator.wait_until_device_is_in_state(udid, Simulator.DeviceState.BOOTED, timeout_seconds)
         with timeout(seconds=timeout_seconds):
             while True:
-                state = subprocess.check_output(['xcrun', 'simctl', 'spawn', udid, 'launchctl', 'print', 'system']).strip()
-                if re.search("A[\s]+com.apple.springboard.services", state):
-                    return
+                try:
+                    state = subprocess.check_output(['xcrun', 'simctl', 'spawn', udid, 'launchctl', 'print', 'system']).strip()
+                    if re.search("A[\s]+com.apple.springboard.services", state):
+                        return
+                except subprocess.CalledProcessError:
+                    _log.warn("Error in checking Simulator boot status.")
                 time.sleep(1)
 
     @staticmethod