Skip to content

[LLDB][Progress-On-Dap] Have indeterminate progress actually send events. #140162

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 19, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions lldb/test/API/tools/lldb-dap/progress/TestDAP_Progress.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import json
import os
import time
import re

import lldbdap_testcase

Expand All @@ -16,6 +17,7 @@ def verify_progress_events(
self,
expected_title,
expected_message=None,
expected_message_regex=None,
expected_not_in_message=None,
only_verify_first_update=False,
):
Expand All @@ -36,6 +38,8 @@ def verify_progress_events(
continue
if expected_message is not None:
self.assertIn(expected_message, message)
if expected_message_regex is not None:
self.assertTrue(re.match(expected_message_regex, message))
if expected_not_in_message is not None:
self.assertNotIn(expected_not_in_message, message)
update_found = True
Expand Down Expand Up @@ -81,8 +85,7 @@ def test(self):

self.verify_progress_events(
expected_title="Progress tester: Initial Indeterminate Detail",
expected_message="Step 1",
only_verify_first_update=True,
expected_message_regex=r"Step [0-9]+",
)

# Test no details indeterminate.
Expand Down
2 changes: 1 addition & 1 deletion lldb/tools/lldb-dap/ProgressEvent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ ProgressEvent::Create(uint64_t progress_id, std::optional<StringRef> message,
bool ProgressEvent::EqualsForIDE(const ProgressEvent &other) const {
return m_progress_id == other.m_progress_id &&
m_event_type == other.m_event_type &&
m_percentage == other.m_percentage;
m_percentage == other.m_percentage && m_message == other.m_message;
}

ProgressEventType ProgressEvent::GetEventType() const { return m_event_type; }
Expand Down
Loading