[lldb-mi] Make this test more reliable. NFC.
authorDavide Italiano <davide@freebsd.org>
Tue, 12 Mar 2019 20:41:29 +0000 (20:41 +0000)
committerDavide Italiano <davide@freebsd.org>
Tue, 12 Mar 2019 20:41:29 +0000 (20:41 +0000)
Except that it will probably stop failing on and off on my machine.

llvm-svn: 355968

lldb/packages/Python/lldbsuite/test/tools/lldb-mi/signal/TestMiSignal.py

index 1a20774..8e579ce 100644 (file)
@@ -50,6 +50,12 @@ class MiSignalTestCase(lldbmi_testcase.MiTestCaseBase):
         self.runCmd("-exec-continue")
         self.expect("\^running")
 
+        # There's a chance that lldb didn't resume the process, we send an interruput but
+        # the process is not running yet. Give it some time to restart. 5 seconds ought to
+        # be enough for every modern CPU out there.
+        import time
+        time.sleep(5)
+
         # Test that Ctrl+C can interrupt an execution
         self.child.sendintr()  # FIXME: here uses self.child directly
         self.expect(