summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test
diff options
context:
space:
mode:
authorJim Ingham <jingham@apple.com>2018-03-19 23:15:06 +0000
committerJim Ingham <jingham@apple.com>2018-03-19 23:15:06 +0000
commite7bd1ac5aadce1a6af911d114c3d37996ca5da7e (patch)
tree79473eb5756915a47c807d62529abedfcb33c975 /lldb/packages/Python/lldbsuite/test
parent544a5555c53b4167099fb8ea85e00511a08111f4 (diff)
downloadbcm5719-llvm-e7bd1ac5aadce1a6af911d114c3d37996ca5da7e.tar.gz
bcm5719-llvm-e7bd1ac5aadce1a6af911d114c3d37996ca5da7e.zip
Modernize a test.
llvm-svn: 327924
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test')
-rw-r--r--lldb/packages/Python/lldbsuite/test/lang/cpp/incomplete-types/TestCppIncompleteTypes.py31
1 files changed, 2 insertions, 29 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/lang/cpp/incomplete-types/TestCppIncompleteTypes.py b/lldb/packages/Python/lldbsuite/test/lang/cpp/incomplete-types/TestCppIncompleteTypes.py
index c7368a41a30..92b58ce11d7 100644
--- a/lldb/packages/Python/lldbsuite/test/lang/cpp/incomplete-types/TestCppIncompleteTypes.py
+++ b/lldb/packages/Python/lldbsuite/test/lang/cpp/incomplete-types/TestCppIncompleteTypes.py
@@ -48,35 +48,8 @@ class TestCppIncompleteTypes(TestBase):
# Get main source file
src_file = "main.cpp"
src_file_spec = lldb.SBFileSpec(src_file)
- self.assertTrue(src_file_spec.IsValid(), "Main source file")
-
- # Get the path of the executable
- exe_path = self.getBuildArtifact(exe)
-
- # Load the executable
- target = self.dbg.CreateTarget(exe_path)
- self.assertTrue(target.IsValid(), VALID_TARGET)
-
- # Break on main function
- main_breakpoint = target.BreakpointCreateBySourceRegex(
- "break here", src_file_spec)
- self.assertTrue(
- main_breakpoint.IsValid() and main_breakpoint.GetNumLocations() >= 1,
- VALID_BREAKPOINT)
-
- # Launch the process
- args = None
- env = None
- process = target.LaunchSimple(
- args, env, self.get_process_working_directory())
- self.assertTrue(process.IsValid(), PROCESS_IS_VALID)
-
- # Get the thread of the process
- self.assertTrue(
- process.GetState() == lldb.eStateStopped,
- PROCESS_STOPPED)
- thread = lldbutil.get_stopped_thread(
- process, lldb.eStopReasonBreakpoint)
+ (target, process, thread, main_breakpoint) = lldbutil.run_to_source_breakpoint(self,
+ "break here", src_file_spec, exe_name = exe)
# Get frame for current thread
return thread.GetSelectedFrame()
OpenPOWER on IntegriCloud