summaryrefslogtreecommitdiffstats
path: root/lldb/test/python_api/function_symbol
diff options
context:
space:
mode:
authorJohnny Chen <johnny.chen@apple.com>2011-06-15 22:14:12 +0000
committerJohnny Chen <johnny.chen@apple.com>2011-06-15 22:14:12 +0000
commit5a0bee7c5f06333b68740fce3311b1a164ef93ea (patch)
treea9d71b63ed6ea0f4ace535b54d30c2daa8762f2c /lldb/test/python_api/function_symbol
parentc20b1393e18eb88e150b013671d0c493ac2091b7 (diff)
downloadbcm5719-llvm-5a0bee7c5f06333b68740fce3311b1a164ef93ea.tar.gz
bcm5719-llvm-5a0bee7c5f06333b68740fce3311b1a164ef93ea.zip
The extra burden for the Python API test case to assign its process object to self.process
in order to have its process cleaned up (terminated) upon tearDown is gone for good. Let's simplify a bunch of Python API test cases. llvm-svn: 133097
Diffstat (limited to 'lldb/test/python_api/function_symbol')
-rw-r--r--lldb/test/python_api/function_symbol/TestDisasmAPI.py16
-rw-r--r--lldb/test/python_api/function_symbol/TestSymbolAPI.py16
2 files changed, 14 insertions, 18 deletions
diff --git a/lldb/test/python_api/function_symbol/TestDisasmAPI.py b/lldb/test/python_api/function_symbol/TestDisasmAPI.py
index 37a98d3bd5b..b3a8bbb215d 100644
--- a/lldb/test/python_api/function_symbol/TestDisasmAPI.py
+++ b/lldb/test/python_api/function_symbol/TestDisasmAPI.py
@@ -53,14 +53,12 @@ class DisasmAPITestCase(TestBase):
VALID_BREAKPOINT)
# Now launch the process, and do not stop at entry point.
- self.process = target.LaunchSimple(None, None, os.getcwd())
-
- self.process = target.GetProcess()
- self.assertTrue(self.process, PROCESS_IS_VALID)
+ process = target.LaunchSimple(None, None, os.getcwd())
+ self.assertTrue(process, PROCESS_IS_VALID)
# Frame #0 should be on self.line1.
- self.assertTrue(self.process.GetState() == lldb.eStateStopped)
- thread = lldbutil.get_stopped_thread(self.process, lldb.eStopReasonBreakpoint)
+ self.assertTrue(process.GetState() == lldb.eStateStopped)
+ thread = lldbutil.get_stopped_thread(process, lldb.eStopReasonBreakpoint)
self.assertTrue(thread != None, "There should be a thread stopped due to breakpoint condition")
frame0 = thread.GetFrameAtIndex(0)
lineEntry = frame0.GetLineEntry()
@@ -77,9 +75,9 @@ class DisasmAPITestCase(TestBase):
print "context1:", context1
# Continue the inferior, the breakpoint 2 should be hit.
- self.process.Continue()
- self.assertTrue(self.process.GetState() == lldb.eStateStopped)
- thread = lldbutil.get_stopped_thread(self.process, lldb.eStopReasonBreakpoint)
+ process.Continue()
+ self.assertTrue(process.GetState() == lldb.eStateStopped)
+ thread = lldbutil.get_stopped_thread(process, lldb.eStopReasonBreakpoint)
self.assertTrue(thread != None, "There should be a thread stopped due to breakpoint condition")
frame0 = thread.GetFrameAtIndex(0)
lineEntry = frame0.GetLineEntry()
diff --git a/lldb/test/python_api/function_symbol/TestSymbolAPI.py b/lldb/test/python_api/function_symbol/TestSymbolAPI.py
index 913543781bf..f983ed645dc 100644
--- a/lldb/test/python_api/function_symbol/TestSymbolAPI.py
+++ b/lldb/test/python_api/function_symbol/TestSymbolAPI.py
@@ -53,14 +53,12 @@ class SymbolAPITestCase(TestBase):
VALID_BREAKPOINT)
# Now launch the process, and do not stop at entry point.
- self.process = target.LaunchSimple(None, None, os.getcwd())
-
- self.process = target.GetProcess()
- self.assertTrue(self.process, PROCESS_IS_VALID)
+ process = target.LaunchSimple(None, None, os.getcwd())
+ self.assertTrue(process, PROCESS_IS_VALID)
# Frame #0 should be on self.line1.
- self.assertTrue(self.process.GetState() == lldb.eStateStopped)
- thread = lldbutil.get_stopped_thread(self.process, lldb.eStopReasonBreakpoint)
+ self.assertTrue(process.GetState() == lldb.eStateStopped)
+ thread = lldbutil.get_stopped_thread(process, lldb.eStopReasonBreakpoint)
self.assertTrue(thread != None, "There should be a thread stopped due to breakpoint condition")
frame0 = thread.GetFrameAtIndex(0)
symbol_line1 = frame0.GetSymbol()
@@ -71,9 +69,9 @@ class SymbolAPITestCase(TestBase):
self.assertTrue(addr_line1.GetSectionType() == lldb.eSectionTypeCode)
# Continue the inferior, the breakpoint 2 should be hit.
- self.process.Continue()
- self.assertTrue(self.process.GetState() == lldb.eStateStopped)
- thread = lldbutil.get_stopped_thread(self.process, lldb.eStopReasonBreakpoint)
+ process.Continue()
+ self.assertTrue(process.GetState() == lldb.eStateStopped)
+ thread = lldbutil.get_stopped_thread(process, lldb.eStopReasonBreakpoint)
self.assertTrue(thread != None, "There should be a thread stopped due to breakpoint condition")
frame0 = thread.GetFrameAtIndex(0)
symbol_line2 = frame0.GetSymbol()
OpenPOWER on IntegriCloud