[Lldb-commits] [PATCH] D85542: lldbutil: add a retry mechanism for the ios simulator

Adrian Prantl via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Fri Aug 7 12:39:46 PDT 2020


aprantl updated this revision to Diff 283995.
aprantl added a comment.

Address review feedback


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D85542/new/

https://reviews.llvm.org/D85542

Files:
  lldb/packages/Python/lldbsuite/test/lldbutil.py


Index: lldb/packages/Python/lldbsuite/test/lldbutil.py
===================================================================
--- lldb/packages/Python/lldbsuite/test/lldbutil.py
+++ lldb/packages/Python/lldbsuite/test/lldbutil.py
@@ -818,9 +818,20 @@
     error = lldb.SBError()
     process = target.Launch(launch_info, error)
 
+    # Unfortunate workaround for the iPhone simulator.
+    retry = 3
+    while (retry and error.Fail() and error.GetCString() and
+           "Unable to boot the Simulator" in error.GetCString()):
+        retry -= 1
+        print("** Simulator is unresponsive. Retrying %d more time(s)"%retry)
+        import time
+        time.sleep(60)
+        error = lldb.SBError()
+        process = target.Launch(launch_info, error)
+
     test.assertTrue(process,
-                    "Could not create a valid process for %s: %s"%(target.GetExecutable().GetFilename(),
-                    error.GetCString()))
+                    "Could not create a valid process for %s: %s" %
+                    (target.GetExecutable().GetFilename(), error.GetCString()))
     test.assertFalse(error.Fail(),
                      "Process launch failed: %s" % (error.GetCString()))
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D85542.283995.patch
Type: text/x-patch
Size: 1198 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20200807/5cc98fb9/attachment.bin>


More information about the lldb-commits mailing list