Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Suppress duplicate 'Messages dropped' messages.
  • Loading branch information
freakboy3742 committed Dec 9, 2024
commit 0532c62fc5402cba97aa083f46461e99357a8c17
12 changes: 11 additions & 1 deletion iOS/testbed/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,18 @@ async def log_stream_task(initial_devices):
stdout=subprocess.PIPE,
stderr=subprocess.STDOUT,
) as process:
suppress_dupes = False
while line := (await process.stdout.readline()).decode(*DECODE_ARGS):
sys.stdout.write(line)
# The iOS log streamer can sometimes lag; when it does, it outputs
# a warning about messages being dropped... often multiple times.
# Only print the first of these duplicated warnings.
if line.startswith("=== Messages dropped "):
if not suppress_dupes:
suppress_dupes = True
sys.stdout.write(line)
else:
suppress_dupes = False
sys.stdout.write(line)


async def xcode_test(location, simulator):
Expand Down