Skip to content

Commit 318f293

Browse files
committed
Fix tests, correct for new behavior
1 parent 10a4e37 commit 318f293

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

lldb/test/API/tools/lldb-dap/progress/Progress_emitter.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ def create_options(cls):
5656
dest="no_details",
5757
help="Do not display details",
5858
action="store_true",
59+
default=False,
5960
)
6061

6162
return parser
@@ -81,10 +82,10 @@ def __call__(self, debugger, command, exe_ctx, result):
8182
total = cmd_options.total
8283
if total is None:
8384
progress = lldb.SBProgress(
84-
"Progress tester", "Indeterminate Detail", debugger
85+
"Progress tester", "Initial Indeterminate Detail", debugger
8586
)
8687
else:
87-
progress = lldb.SBProgress("Progress tester", "Detail", total, debugger)
88+
progress = lldb.SBProgress("Progress tester", "Initial Detail", total, debugger)
8889

8990
# Check to see if total is set to None to indicate an indeterminate progress
9091
# then default to 10 steps.

lldb/test/API/tools/lldb-dap/progress/TestDAP_Progress.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,7 @@ def test_output_nodetails(self):
8787
start_found = True
8888
if "progressUpdate" in event_type:
8989
message = event["body"]["message"]
90-
# We send an update on first message to set the details, so ignore the first update
91-
if not update_found:
92-
self.assertTrue(message == "", message)
90+
self.assertEqual("Initial Detail", message)
9391
update_found = True
9492

9593
self.assertTrue(start_found)
@@ -128,7 +126,9 @@ def test_output_indeterminate(self):
128126
if "progressUpdate" in event_type:
129127
message = event["body"]["message"]
130128
print(f"Progress update: {message}")
131-
self.assertNotIn("Progres tester", message)
129+
# Check on the first update we set the initial detail.
130+
if not update_found:
131+
self.assertEqual("Step 1", message)
132132
update_found = True
133133

134134
self.assertTrue(start_found)
@@ -168,9 +168,9 @@ def test_output_nodetails_indeterminate(self):
168168
start_found = True
169169
if "progressUpdate" in event_type:
170170
message = event["body"]["message"]
171-
# We send an update on first message to set the details, so ignore the first update
171+
# Check on the first update we set the initial detail.
172172
if not update_found:
173-
self.assertTrue(message == "", message)
173+
self.assertEqual("Initial Indeterminate Detail", message)
174174
update_found = True
175175

176176
self.assertTrue(start_found)

0 commit comments

Comments
 (0)