[Lldb-commits] [lldb] r133889 - /lldb/trunk/test/hello_world/TestHelloWorld.py
Johnny Chen
johnny.chen at apple.com
Sun Jun 26 13:48:37 PDT 2011
Author: johnny
Date: Sun Jun 26 15:48:37 2011
New Revision: 133889
URL: http://llvm.org/viewvc/llvm-project?rev=133889&view=rev
Log:
Simplified the test cases, before moving the file to reside under python_api dir.
Modified:
lldb/trunk/test/hello_world/TestHelloWorld.py
Modified: lldb/trunk/test/hello_world/TestHelloWorld.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/hello_world/TestHelloWorld.py?rev=133889&r1=133888&r2=133889&view=diff
==============================================================================
--- lldb/trunk/test/hello_world/TestHelloWorld.py (original)
+++ lldb/trunk/test/hello_world/TestHelloWorld.py Sun Jun 26 15:48:37 2011
@@ -10,23 +10,6 @@
mydir = "hello_world"
@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
- def test_with_dsym_and_run_command(self):
- """Create target, breakpoint, launch a process, and then kill it.
-
- Use dsym info and lldb "run" command.
- """
- self.buildDsym()
- self.hello_world_python(useLaunchAPI = False)
-
- def test_with_dwarf_and_run_command(self):
- """Create target, breakpoint, launch a process, and then kill it.
-
- Use dwarf debug map and lldb "run" command.
- """
- self.buildDwarf()
- self.hello_world_python(useLaunchAPI = False)
-
- @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@python_api_test
def test_with_dsym_and_process_launch_api(self):
"""Create target, breakpoint, launch a process, and then kill it.
@@ -34,7 +17,7 @@
Use dsym info and process launch API.
"""
self.buildDsym()
- self.hello_world_python(useLaunchAPI = True)
+ self.hello_world_python()
@python_api_test
def test_with_dwarf_and_process_launch_api(self):
@@ -43,7 +26,7 @@
Use dwarf debug map and process launch API.
"""
self.buildDwarf()
- self.hello_world_python(useLaunchAPI = True)
+ self.hello_world_python()
@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@python_api_test
@@ -92,7 +75,7 @@
self.line1 = line_number('main.c', '// Set break point at this line.')
self.line2 = line_number('main.c', '// Waiting to be attached...')
- def hello_world_python(self, useLaunchAPI):
+ def hello_world_python(self):
"""Create target, breakpoint, launch a process, and then kill it."""
target = self.dbg.CreateTarget(self.exe)
@@ -114,16 +97,12 @@
# rdar://problem/8364687
# SBTarget.Launch() issue (or is there some race condition)?
- if useLaunchAPI:
- process = target.LaunchSimple(None, None, os.getcwd())
- # The following isn't needed anymore, rdar://8364687 is fixed.
- #
- # Apply some dances after LaunchProcess() in order to break at "main".
- # It only works sometimes.
- #self.breakAfterLaunch(process, "main")
- else:
- # On the other hand, the following line of code are more reliable.
- self.runCmd("run")
+ process = target.LaunchSimple(None, None, os.getcwd())
+ # The following isn't needed anymore, rdar://8364687 is fixed.
+ #
+ # Apply some dances after LaunchProcess() in order to break at "main".
+ # It only works sometimes.
+ #self.breakAfterLaunch(process, "main")
process = target.GetProcess()
self.assertTrue(process, PROCESS_IS_VALID)
More information about the lldb-commits
mailing list