summaryrefslogtreecommitdiffstats
path: root/lldb/test/help/TestHelp.py
diff options
context:
space:
mode:
authorJohnny Chen <johnny.chen@apple.com>2010-07-01 00:18:39 +0000
committerJohnny Chen <johnny.chen@apple.com>2010-07-01 00:18:39 +0000
commit8c3f9187f954b32ae0e737b7c05d9af3e71434d0 (patch)
tree39de5a637b008f7138cc2ee5ac64b879ac1c1dcd /lldb/test/help/TestHelp.py
parent3de064dfdf690e1e4156b7007c8cc522013cee42 (diff)
downloadbcm5719-llvm-8c3f9187f954b32ae0e737b7c05d9af3e71434d0.tar.gz
bcm5719-llvm-8c3f9187f954b32ae0e737b7c05d9af3e71434d0.zip
Added some delay (100 ms) after executing each 'command interpreter' command;
this seems to alleviate the intermittent failure observed while running the whole test suite. llvm-svn: 107357
Diffstat (limited to 'lldb/test/help/TestHelp.py')
-rw-r--r--lldb/test/help/TestHelp.py7
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'))
OpenPOWER on IntegriCloud