Author: Jonas Devlieghere
Date: 2025-04-02T15:33:07-07:00
New Revision: 3f7ca8826776f32526e948b89816db492435f2e2

URL: 
https://github.com/llvm/llvm-project/commit/3f7ca8826776f32526e948b89816db492435f2e2
DIFF: 
https://github.com/llvm/llvm-project/commit/3f7ca8826776f32526e948b89816db492435f2e2.diff

LOG: [lldb-dap] Add progress events to the packet list (#134157)

Before #134048, TestDAP_Progress relied on wait_for_event to block until
the progressEnd came in. However, progress events were not added to the
packet list, so this call would always time out. This PR makes it so
that packets are added to the packet list, and you can block on them.

Added: 
    

Modified: 
    lldb/packages/Python/lldbsuite/test/tools/lldb-dap/dap_server.py
    lldb/test/API/tools/lldb-dap/progress/TestDAP_Progress.py

Removed: 
    


################################################################################
diff  --git a/lldb/packages/Python/lldbsuite/test/tools/lldb-dap/dap_server.py 
b/lldb/packages/Python/lldbsuite/test/tools/lldb-dap/dap_server.py
index 01ef4b68f2653..45403e9df8525 100644
--- a/lldb/packages/Python/lldbsuite/test/tools/lldb-dap/dap_server.py
+++ b/lldb/packages/Python/lldbsuite/test/tools/lldb-dap/dap_server.py
@@ -255,8 +255,6 @@ def handle_recv_packet(self, packet):
                 # and 'progressEnd' events. Keep these around in case test
                 # cases want to verify them.
                 self.progress_events.append(packet)
-                # No need to add 'progress' event packets to our packets list.
-                return keepGoing
 
         elif packet_type == "response":
             if packet["command"] == "disconnect":

diff  --git a/lldb/test/API/tools/lldb-dap/progress/TestDAP_Progress.py 
b/lldb/test/API/tools/lldb-dap/progress/TestDAP_Progress.py
index ffe3d38eb49a3..fee63655de0da 100755
--- a/lldb/test/API/tools/lldb-dap/progress/TestDAP_Progress.py
+++ b/lldb/test/API/tools/lldb-dap/progress/TestDAP_Progress.py
@@ -19,6 +19,7 @@ def verify_progress_events(
         expected_not_in_message=None,
         only_verify_first_update=False,
     ):
+        self.dap_server.wait_for_event("progressEnd")
         self.assertTrue(len(self.dap_server.progress_events) > 0)
         start_found = False
         update_found = False


        
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to