diff options
Diffstat (limited to 'lldb/test/help/TestHelp.py')
| -rw-r--r-- | lldb/test/help/TestHelp.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lldb/test/help/TestHelp.py b/lldb/test/help/TestHelp.py index f2524989891..fbfdc8ca25b 100644 --- a/lldb/test/help/TestHelp.py +++ b/lldb/test/help/TestHelp.py @@ -1,6 +1,6 @@ """Test lldb help command.""" -import os +import os, time import lldb import unittest @@ -13,6 +13,8 @@ class TestHelpCommand(unittest.TestCase): if ("LLDB_TEST" in os.environ): os.chdir(os.path.join(os.environ["LLDB_TEST"], "help")); self.dbg = lldb.SBDebugger.Create() + if not self.dbg.IsValid(): + raise Exception('Invalid debugger instance') self.dbg.SetAsync(False) self.ci = self.dbg.GetCommandInterpreter() if not self.ci: @@ -26,6 +28,7 @@ class TestHelpCommand(unittest.TestCase): """A simple test of 'help' command and its output.""" res = lldb.SBCommandReturnObject() self.ci.HandleCommand("help", res) + time.sleep(0.1) self.assertTrue(res.Succeeded()) self.assertTrue(res.GetOutput().startswith( 'The following is a list of built-in, permanent debugger commands')) @@ -34,8 +37,10 @@ class TestHelpCommand(unittest.TestCase): """Command 'set term-width 0' should not hang the help command.""" res = lldb.SBCommandReturnObject() self.ci.HandleCommand("set term-width 0", res) + time.sleep(0.1) self.assertTrue(res.Succeeded()) self.ci.HandleCommand("help", res) + time.sleep(0.1) self.assertTrue(res.Succeeded()) self.assertTrue(res.GetOutput().startswith( 'The following is a list of built-in, permanent debugger commands')) |

