From 2bd995b7e8fda6d51cb586e4a0f92ea1d99596e0 Mon Sep 17 00:00:00 2001 From: Davide Italiano Date: Tue, 12 Mar 2019 20:41:29 +0000 Subject: [lldb-mi] Make this test more reliable. NFC. Except that it will probably stop failing on and off on my machine. llvm-svn: 355968 --- .../Python/lldbsuite/test/tools/lldb-mi/signal/TestMiSignal.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lldb/packages/Python/lldbsuite/test/tools/lldb-mi') diff --git a/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/signal/TestMiSignal.py b/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/signal/TestMiSignal.py index 1a20774a493..8e579ceea51 100644 --- a/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/signal/TestMiSignal.py +++ b/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/signal/TestMiSignal.py @@ -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( -- cgit v1.2.3