[Lldb-commits] [lldb] r148417 - /lldb/trunk/test/python_api/hello_world/TestHelloWorld.py
Johnny Chen
johnny.chen at apple.com
Wed Jan 18 13:20:03 PST 2012
Author: johnny
Date: Wed Jan 18 15:20:03 2012
New Revision: 148417
URL: http://llvm.org/viewvc/llvm-project?rev=148417&view=rev
Log:
Modify the test cases so that each uses a unique executable name for the debugger to attach/launch.
I've see cases where there are lingering processes ("hello_world") staying around and the
test_with_dsym_and_attach_to_process_with_name_api() test case just hangs.
Modified:
lldb/trunk/test/python_api/hello_world/TestHelloWorld.py
Modified: lldb/trunk/test/python_api/hello_world/TestHelloWorld.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/python_api/hello_world/TestHelloWorld.py?rev=148417&r1=148416&r2=148417&view=diff
==============================================================================
--- lldb/trunk/test/python_api/hello_world/TestHelloWorld.py (original)
+++ lldb/trunk/test/python_api/hello_world/TestHelloWorld.py Wed Jan 18 15:20:03 2012
@@ -16,7 +16,8 @@
Use dsym info and process launch API.
"""
- self.buildDsym()
+ self.buildDsym(dictionary=self.d)
+ self.setTearDownCleanup(dictionary=self.d)
self.hello_world_python()
@python_api_test
@@ -25,7 +26,8 @@
Use dwarf debug map and process launch API.
"""
- self.buildDwarf()
+ self.buildDwarf(dictionary=self.d)
+ self.setTearDownCleanup(dictionary=self.d)
self.hello_world_python()
@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@@ -35,7 +37,8 @@
Use dsym info and attach to process with id API.
"""
- self.buildDsym()
+ self.buildDsym(dictionary=self.d)
+ self.setTearDownCleanup(dictionary=self.d)
self.hello_world_attach_with_id_api()
@python_api_test
@@ -44,7 +47,8 @@
Use dwarf map (no dsym) and attach to process with id API.
"""
- self.buildDwarf()
+ self.buildDwarf(dictionary=self.d)
+ self.setTearDownCleanup(dictionary=self.d)
self.hello_world_attach_with_id_api()
@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@@ -54,7 +58,8 @@
Use dsym info and attach to process with name API.
"""
- self.buildDsym()
+ self.buildDsym(dictionary=self.d)
+ self.setTearDownCleanup(dictionary=self.d)
self.hello_world_attach_with_name_api()
@python_api_test
@@ -63,14 +68,16 @@
Use dwarf map (no dsym) and attach to process with name API.
"""
- self.buildDwarf()
+ self.buildDwarf(dictionary=self.d)
+ self.setTearDownCleanup(dictionary=self.d)
self.hello_world_attach_with_name_api()
def setUp(self):
# Call super's setUp().
TestBase.setUp(self)
- # Get the full path to our executable to be debugged.
- self.exe = os.path.join(os.getcwd(), "hello_world")
+ # Get the full path to our executable to be attached/debugged.
+ self.exe = os.path.join(os.getcwd(), self.testMethodName)
+ self.d = {'EXE': self.testMethodName}
# Find a couple of the line numbers within main.c.
self.line1 = line_number('main.c', '// Set break point at this line.')
self.line2 = line_number('main.c', '// Waiting to be attached...')
More information about the lldb-commits
mailing list