From a78997e0aa89250a193ff036e7c6e71562e03222 Mon Sep 17 00:00:00 2001 From: Adrian Prantl Date: Tue, 4 Apr 2023 15:15:15 -0700 Subject: [PATCH] Simplify test. 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 | 4 +--- lldb/test/API/macosx/universal64/TestUniversal64.py | 11 ++--------- 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/lldb/packages/Python/lldbsuite/test/lldbutil.py b/lldb/packages/Python/lldbsuite/test/lldbutil.py index 7e64afb..d174c5a 100644 --- a/lldb/packages/Python/lldbsuite/test/lldbutil.py +++ b/lldb/packages/Python/lldbsuite/test/lldbutil.py @@ -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() diff --git a/lldb/test/API/macosx/universal64/TestUniversal64.py b/lldb/test/API/macosx/universal64/TestUniversal64.py index d97ebc0..80292c0 100644 --- a/lldb/test/API/macosx/universal64/TestUniversal64.py +++ b/lldb/test/API/macosx/universal64/TestUniversal64.py @@ -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. -- 2.7.4