[Lldb-commits] [lldb] r107386 - in /lldb/trunk/test: array_types/TestArrayTypes.py class_types/TestClassTypes.py
Johnny Chen
johnny.chen at apple.com
Wed Jun 30 22:31:45 PDT 2010
Author: johnny
Date: Thu Jul 1 00:31:44 2010
New Revision: 107386
URL: http://llvm.org/viewvc/llvm-project?rev=107386&view=rev
Log:
Removed most of the time delay introduced in the test scripts.
Left some and added some print statements for debugging purpose.
Modified:
lldb/trunk/test/array_types/TestArrayTypes.py
lldb/trunk/test/class_types/TestClassTypes.py
Modified: lldb/trunk/test/array_types/TestArrayTypes.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/array_types/TestArrayTypes.py?rev=107386&r1=107385&r2=107386&view=diff
==============================================================================
--- lldb/trunk/test/array_types/TestArrayTypes.py (original)
+++ lldb/trunk/test/array_types/TestArrayTypes.py Thu Jul 1 00:31:44 2010
@@ -29,12 +29,10 @@
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 @@
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 @@
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())
Modified: lldb/trunk/test/class_types/TestClassTypes.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/class_types/TestClassTypes.py?rev=107386&r1=107385&r2=107386&view=diff
==============================================================================
--- lldb/trunk/test/class_types/TestClassTypes.py (original)
+++ lldb/trunk/test/class_types/TestClassTypes.py Thu Jul 1 00:31:44 2010
@@ -29,12 +29,10 @@
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 @@
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())
More information about the lldb-commits
mailing list