diff options
| -rw-r--r-- | lldb/test/array_types/TestArrayTypes.py | 22 | ||||
| -rw-r--r-- | lldb/test/class_types/TestClassTypes.py | 19 |
2 files changed, 14 insertions, 27 deletions
diff --git a/lldb/test/array_types/TestArrayTypes.py b/lldb/test/array_types/TestArrayTypes.py index f54da61bee9..b3659a56688 100644 --- a/lldb/test/array_types/TestArrayTypes.py +++ b/lldb/test/array_types/TestArrayTypes.py @@ -29,12 +29,10 @@ class TestArrayTypes(unittest.TestCase): res = lldb.SBCommandReturnObject() exe = os.path.join(os.getcwd(), "a.out") self.ci.HandleCommand("file " + exe, res) - time.sleep(0.1) self.assertTrue(res.Succeeded()) # Break on line 42 inside main(). self.ci.HandleCommand("breakpoint set -f main.c -l 42", res) - time.sleep(0.1) self.assertTrue(res.Succeeded()) self.assertTrue(res.GetOutput().startswith( "Breakpoint created: 1: file ='main.c', line = 42, locations = 1")) @@ -43,23 +41,21 @@ class TestArrayTypes(unittest.TestCase): time.sleep(0.1) self.assertTrue(res.Succeeded()) - # The breakpoint should have a hit count of 1. - self.ci.HandleCommand("breakpoint list", res) - time.sleep(0.1) - self.assertTrue(res.Succeeded()) - self.assertTrue(res.GetOutput().find('resolved, hit count = 1')) - - # And the stop reason of the thread should be breakpoint. + # The stop reason of the thread should be breakpoint. self.ci.HandleCommand("thread list", res) - time.sleep(0.1) + print "thread list ->", res.GetOutput() self.assertTrue(res.Succeeded()) self.assertTrue(res.GetOutput().find('state is Stopped') and res.GetOutput().find('stop reason = breakpoint')) + # The breakpoint should have a hit count of 1. + self.ci.HandleCommand("breakpoint list", res) + self.assertTrue(res.Succeeded()) + self.assertTrue(res.GetOutput().find('resolved, hit count = 1')) + # Issue 'variable list' command on several array-type variables. self.ci.HandleCommand("variable list strings", res); - time.sleep(0.1) self.assertTrue(res.Succeeded()) output = res.GetOutput() self.assertTrue(output.startswith('(char *[4])') and @@ -73,23 +69,19 @@ class TestArrayTypes(unittest.TestCase): output.find('Guten Tag')) self.ci.HandleCommand("variable list char_16", res); - time.sleep(0.1) self.assertTrue(res.Succeeded()) self.assertTrue(res.GetOutput().find('(char) char_16[0]') and res.GetOutput().find('(char) char_16[15]')) self.ci.HandleCommand("variable list ushort_matrix", res); - time.sleep(0.1) self.assertTrue(res.Succeeded()) self.assertTrue(res.GetOutput().startswith('(unsigned short [2][3])')) self.ci.HandleCommand("variable list long_6", res); - time.sleep(0.1) self.assertTrue(res.Succeeded()) self.assertTrue(res.GetOutput().startswith('(long [6])')) self.ci.HandleCommand("continue", res) - time.sleep(0.1) self.assertTrue(res.Succeeded()) diff --git a/lldb/test/class_types/TestClassTypes.py b/lldb/test/class_types/TestClassTypes.py index e70bd847a4d..bfb043cd43e 100644 --- a/lldb/test/class_types/TestClassTypes.py +++ b/lldb/test/class_types/TestClassTypes.py @@ -29,12 +29,10 @@ class TestClassTypes(unittest.TestCase): res = lldb.SBCommandReturnObject() exe = os.path.join(os.getcwd(), "a.out") self.ci.HandleCommand("file " + exe, res) - time.sleep(0.1) self.assertTrue(res.Succeeded()) # Break on the ctor function of class C. self.ci.HandleCommand("breakpoint set -f main.cpp -l 73", res) - time.sleep(0.1) self.assertTrue(res.Succeeded()) self.assertTrue(res.GetOutput().startswith( "Breakpoint created: 1: file ='main.cpp', line = 73, locations = 1")) @@ -43,27 +41,24 @@ class TestClassTypes(unittest.TestCase): time.sleep(0.1) self.assertTrue(res.Succeeded()) - # The breakpoint should have a hit count of 1. - self.ci.HandleCommand("breakpoint list", res) - time.sleep(0.1) - self.assertTrue(res.Succeeded()) - self.assertTrue(res.GetOutput().find('resolved, hit count = 1')) - - # And the stop reason of the thread should be breakpoint. + # The stop reason of the thread should be breakpoint. self.ci.HandleCommand("thread list", res) - time.sleep(0.1) + print "thread list ->", res.GetOutput() self.assertTrue(res.Succeeded()) self.assertTrue(res.GetOutput().find('state is Stopped') and res.GetOutput().find('stop reason = breakpoint')) + # The breakpoint should have a hit count of 1. + self.ci.HandleCommand("breakpoint list", res) + self.assertTrue(res.Succeeded()) + self.assertTrue(res.GetOutput().find(' resolved, hit count = 1')) + # We should be stopped on the ctor function of class C. self.ci.HandleCommand("variable list this", res); - time.sleep(0.1) self.assertTrue(res.Succeeded()) self.assertTrue(res.GetOutput().startswith('(class C *const) this = ')) self.ci.HandleCommand("continue", res) - time.sleep(0.1) self.assertTrue(res.Succeeded()) |

