diff options
Diffstat (limited to 'lldb/test/python_api/hello_world/TestHelloWorld.py')
-rw-r--r-- | lldb/test/python_api/hello_world/TestHelloWorld.py | 104 |
1 files changed, 19 insertions, 85 deletions
diff --git a/lldb/test/python_api/hello_world/TestHelloWorld.py b/lldb/test/python_api/hello_world/TestHelloWorld.py index e9cd7783a65..8e586c8dcdf 100644 --- a/lldb/test/python_api/hello_world/TestHelloWorld.py +++ b/lldb/test/python_api/hello_world/TestHelloWorld.py @@ -9,82 +9,7 @@ from lldbtest import * class HelloWorldTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) - - @skipUnlessDarwin - @python_api_test - @dsym_test - def test_with_dsym_and_process_launch_api(self): - """Create target, breakpoint, launch a process, and then kill it. - - Use dsym info and process launch API. - """ - self.buildDsym(dictionary=self.d) - self.setTearDownCleanup(dictionary=self.d) - self.hello_world_python() - - @python_api_test - @dwarf_test - def test_with_dwarf_and_process_launch_api(self): - """Create target, breakpoint, launch a process, and then kill it. - - Use dwarf debug map and process launch API. - """ - self.buildDwarf(dictionary=self.d) - self.setTearDownCleanup(dictionary=self.d) - self.hello_world_python() - - @not_remote_testsuite_ready - @skipUnlessDarwin - @python_api_test - @dsym_test - def test_with_dsym_and_attach_to_process_with_id_api(self): - """Create target, spawn a process, and attach to it with process id. - - Use dsym info and attach to process with id API. - """ - self.buildDsym(dictionary=self.d) - self.setTearDownCleanup(dictionary=self.d) - self.hello_world_attach_with_id_api() - - @python_api_test - @dwarf_test - @expectedFailurei386 # llvm.org/pr17384: lldb needs to be aware of linux-vdso.so to unwind stacks properly - @expectedFailureWindows("llvm.org/pr24600") - def test_with_dwarf_and_attach_to_process_with_id_api(self): - """Create target, spawn a process, and attach to it with process id. - - Use dwarf map (no dsym) and attach to process with id API. - """ - self.buildDwarf(dictionary=self.d) - self.setTearDownCleanup(dictionary=self.d) - self.hello_world_attach_with_id_api() - - @not_remote_testsuite_ready - @skipUnlessDarwin - @python_api_test - @dsym_test - def test_with_dsym_and_attach_to_process_with_name_api(self): - """Create target, spawn a process, and attach to it with process name. - - Use dsym info and attach to process with name API. - """ - self.buildDsym(dictionary=self.d) - self.setTearDownCleanup(dictionary=self.d) - self.hello_world_attach_with_name_api() - - @python_api_test - @dwarf_test - @expectedFailurei386 # llvm.org/pr17384: lldb needs to be aware of linux-vdso.so to unwind stacks properly - @expectedFailureWindows("llvm.org/pr24600") - def test_with_dwarf_and_attach_to_process_with_name_api(self): - """Create target, spawn a process, and attach to it with process name. - - Use dwarf map (no dsym) and attach to process with name API. - """ - 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) @@ -101,9 +26,11 @@ class HelloWorldTestCase(TestBase): # Call super's tearDown(). TestBase.tearDown(self) - def hello_world_python(self): + @python_api_test + def test_with_process_launch_api(self): """Create target, breakpoint, launch a process, and then kill it.""" - + self.build(dictionary=self.d) + self.setTearDownCleanup(dictionary=self.d) target = self.dbg.CreateTarget(self.exe) breakpoint = target.BreakpointCreateByLocation("main.c", self.line1) @@ -142,9 +69,13 @@ class HelloWorldTestCase(TestBase): # The breakpoint should have a hit count of 1. self.assertTrue(breakpoint.GetHitCount() == 1, BREAKPOINT_HIT_ONCE) - def hello_world_attach_with_id_api(self): - """Create target, spawn a process, and attach to it by id.""" - + @python_api_test + @expectedFailurei386 # llvm.org/pr17384: lldb needs to be aware of linux-vdso.so to unwind stacks properly + @expectedFailureWindows("llvm.org/pr24600") + def test_with_attach_to_process_with_id_api(self): + """Create target, spawn a process, and attach to it with process id.""" + self.build(dictionary=self.d) + self.setTearDownCleanup(dictionary=self.d) target = self.dbg.CreateTarget(self.exe) # Spawn a new process @@ -167,9 +98,13 @@ class HelloWorldTestCase(TestBase): substrs = ['main.c:%d' % self.line2, '(int)argc=3']) - def hello_world_attach_with_name_api(self): - """Create target, spawn a process, and attach to it by name.""" - + @python_api_test + @expectedFailurei386 # llvm.org/pr17384: lldb needs to be aware of linux-vdso.so to unwind stacks properly + @expectedFailureWindows("llvm.org/pr24600") + def test_with_attach_to_process_with_name_api(self): + """Create target, spawn a process, and attach to it with process name.""" + self.build(dictionary=self.d) + self.setTearDownCleanup(dictionary=self.d) target = self.dbg.CreateTarget(self.exe) # Spawn a new process @@ -205,7 +140,6 @@ class HelloWorldTestCase(TestBase): substrs = ['main.c:%d' % self.line2, '(int)argc=3']) - if __name__ == '__main__': import atexit lldb.SBDebugger.Initialize() |