Skip to content

Commit 21e9d75

Browse files
committed
Update test for Swift progress reports
Updates the test for Swift progress reporting by checking that the "Importing Swift modules" message only appears twice on its own as the rest of the reports for this category will have details attached.
1 parent 84e7e51 commit 21e9d75

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

lldb/test/API/functionalities/progress_reporting/swift_progress_reporting/TestSwiftProgressReporting.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,22 @@ def test_swift_progress_report(self):
4545
"Importing Swift standard library",
4646
]
4747

48+
importing_swift_reports = []
4849
while len(beacons):
4950
event = lldbutil.fetch_next_event(self, self.listener, self.broadcaster)
5051
ret_args = lldb.SBDebugger.GetProgressFromEvent(event)
5152
if self.TraceOn():
5253
print(ret_args[0])
5354

55+
# When importing Swift modules, make sure that we don't get two reports
56+
# in a row with the title "Importing Swift modules", i.e. there should be
57+
# a report with that title followed by a report with that title and details
58+
# attached.
59+
if ret_args[0] == "Importing Swift modules":
60+
next_event = lldbutil.fetch_next_event(self, self.listener, self.broadcaster)
61+
next_ret_args = lldb.SBDebugger.GetProgressFromEvent(next_event)
62+
self.assertRegexpMatches(next_ret_args[0], r"Importing Swift modules:+")
63+
5464
for beacon in beacons:
5565
if beacon in ret_args[0]:
5666
beacons.remove(beacon)

0 commit comments

Comments
 (0)