Simplify test.
authorAdrian Prantl <aprantl@apple.com>
Tue, 4 Apr 2023 22:15:15 +0000 (15:15 -0700)
committerAdrian Prantl <aprantl@apple.com>
Tue, 4 Apr 2023 22:16:01 +0000 (15:16 -0700)
This test doesn't actually depend on being able to launch the process.
This may or may not explain why this test behaves oddly on some of our bots.

lldb/packages/Python/lldbsuite/test/lldbutil.py
lldb/test/API/macosx/universal64/TestUniversal64.py

index 7e64afb..d174c5a 100644 (file)
@@ -811,8 +811,7 @@ def get_crashed_threads(test, process):
 # Helper functions for run_to_{source,name}_breakpoint:
 
 def run_to_breakpoint_make_target(test, exe_name = "a.out", in_cwd = True):
-    if in_cwd:
-        exe = test.getBuildArtifact(exe_name)
+    exe = test.getBuildArtifact(exe_name) if in_cwd else exe_name
 
     # Create the target
     target = test.dbg.CreateTarget(exe)
@@ -827,7 +826,6 @@ def run_to_breakpoint_make_target(test, exe_name = "a.out", in_cwd = True):
 
 def run_to_breakpoint_do_run(test, target, bkpt, launch_info = None,
                              only_one_thread = True, extra_images = None):
-
     # Launch the process, and do not stop at the entry point.
     if not launch_info:
         launch_info = target.GetLaunchInfo()
index d97ebc0..80292c0 100644 (file)
@@ -7,18 +7,11 @@ class Universal64TestCase(TestBase):
     NO_DEBUG_INFO_TESTCASE = True
 
     def do_test(self):
-        # Get the executable.
         exe = self.getBuildArtifact("fat.out")
-
-        # Create a target.
-        self.target = self.dbg.CreateTarget(exe)
-
-        # Create a breakpoint on main.
-        main_bp = self.target.BreakpointCreateByName("main")
-        self.assertTrue(main_bp, VALID_BREAKPOINT)
+        target = self.dbg.CreateTarget(exe)
 
         # Make sure the binary and the dSYM are in the image list.
-        self.expect("image list ", patterns=['fat.out', 'fat.out.dSYM'])
+        self.expect("image list", patterns=['fat.out', 'fat.out.dSYM'])
 
         # The dynamic loader doesn't support fat64 executables so we can't
         # actually launch them here.