[Lldb-commits] [lldb] [lldb-dap] Improving stability of TestDAP_launch_commands. (PR #179783)

John Harrison via lldb-commits lldb-commits at lists.llvm.org
Thu Feb 5 07:31:51 PST 2026


https://github.com/ashgti updated https://github.com/llvm/llvm-project/pull/179783

>From 7783766ba558260a48a2f18859b06e1bd6510e43 Mon Sep 17 00:00:00 2001
From: John Harrison <harjohn at google.com>
Date: Wed, 4 Feb 2026 13:15:50 -0800
Subject: [PATCH 1/2] [lldb-dap] Improving stability of
 TestDAP_launch_commands.

---
 .../test/API/tools/lldb-dap/launch/TestDAP_launch_commands.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lldb/test/API/tools/lldb-dap/launch/TestDAP_launch_commands.py b/lldb/test/API/tools/lldb-dap/launch/TestDAP_launch_commands.py
index 19da25b3df165..a2b23bc138d25 100644
--- a/lldb/test/API/tools/lldb-dap/launch/TestDAP_launch_commands.py
+++ b/lldb/test/API/tools/lldb-dap/launch/TestDAP_launch_commands.py
@@ -71,14 +71,14 @@ def test(self):
         # Get output from the console. This should contain both the
         # "stopCommands" that were run after the first breakpoint was hit
         self.continue_to_breakpoints(breakpoint_ids)
-        output = self.get_console()
+        output = self.collect_console(pattern=stopCommands[-1])
         self.verify_commands("stopCommands", output, stopCommands)
 
         # Continue again and hit the second breakpoint.
         # Get output from the console. This should contain both the
         # "stopCommands" that were run after the second breakpoint was hit
         self.continue_to_breakpoints(breakpoint_ids)
-        output = self.get_console()
+        output = self.collect_console(pattern=stopCommands[-1])
         self.verify_commands("stopCommands", output, stopCommands)
 
         # Continue until the program exits

>From ff11a3b73859790c2f5fb64f87e5f07d40d684d8 Mon Sep 17 00:00:00 2001
From: John Harrison <harjohn at google.com>
Date: Thu, 5 Feb 2026 07:31:35 -0800
Subject: [PATCH 2/2] Also fixing another get_console location

---
 lldb/test/API/tools/lldb-dap/launch/TestDAP_launch_commands.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lldb/test/API/tools/lldb-dap/launch/TestDAP_launch_commands.py b/lldb/test/API/tools/lldb-dap/launch/TestDAP_launch_commands.py
index a2b23bc138d25..48398e5915069 100644
--- a/lldb/test/API/tools/lldb-dap/launch/TestDAP_launch_commands.py
+++ b/lldb/test/API/tools/lldb-dap/launch/TestDAP_launch_commands.py
@@ -47,7 +47,7 @@ def test(self):
 
         # Get output from the console. This should contain both the
         # "initCommands" and the "preRunCommands".
-        output = self.get_console()
+        output = self.collect_console(pattern=postRunCommands[-1])
         # Verify all "initCommands" were found in console output
         self.verify_commands("initCommands", output, initCommands)
         # Verify all "preRunCommands" were found in console output



More information about the lldb-commits mailing list