Skip to content

Commit 0532c62

Browse files
committed
Suppress duplicate 'Messages dropped' messages.
1 parent cbcc044 commit 0532c62

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

iOS/testbed/__main__.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,18 @@ async def log_stream_task(initial_devices):
129129
stdout=subprocess.PIPE,
130130
stderr=subprocess.STDOUT,
131131
) as process:
132+
suppress_dupes = False
132133
while line := (await process.stdout.readline()).decode(*DECODE_ARGS):
133-
sys.stdout.write(line)
134+
# The iOS log streamer can sometimes lag; when it does, it outputs
135+
# a warning about messages being dropped... often multiple times.
136+
# Only print the first of these duplicated warnings.
137+
if line.startswith("=== Messages dropped "):
138+
if not suppress_dupes:
139+
suppress_dupes = True
140+
sys.stdout.write(line)
141+
else:
142+
suppress_dupes = False
143+
sys.stdout.write(line)
134144

135145

136146
async def xcode_test(location, simulator):

0 commit comments

Comments
 (0)