Skip to content
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

gh-129248: Filter out the iOS log prefix from testbed runner output. #129252

Merged
merged 1 commit into from
Jan 25, 2025

Conversation

freakboy3742
Copy link
Contributor

@freakboy3742 freakboy3742 commented Jan 24, 2025

Modifies the iOS test runner to strip out the log prefix inserted by the Apple system log.

iOS test logs are gathered by streaming the Apple System log looking for log items from the test process. These log prefixes look like:

2025-01-17 16:14:29.090 Df iOSTestbed[23987:1fd393b4] (Python) ...
2025-01-17 16:14:29.090 E  iOSTestbed[23987:1fd393b4] (Python) ...

The existence of these prefixes was preventing the buildbots from parsing log output to discover test failures. Since the prefix doesn't actually help diagnose issues with the Python test suite, this PR strips out the prefix. This matches what the Android test runner does with ADB log prefixes. It doesn't strip the prefix from the iOS setup/teardown code (the ObjC code that instantiates the XUnit test case, which might be helpful in a diagnostic context, but won't interfere with the Python operation

The acid test for this fix is a test failing and being correctly parsed by the buildbot; that's a little difficult to manufacture, though. For review purposes, you can inspect the test log for the buildbot to see that it matches the test output from other platforms; at which point the buildbot log parser should work as it does on any other platform.

Fixes #129248.

@freakboy3742
Copy link
Contributor Author

!buildbot iOS

@bedevere-bot
Copy link

🤖 New build scheduled with the buildbot fleet by @freakboy3742 for commit e6c7195 🤖

The command will test the builders whose names match following regular expression: iOS

The builders matched are:

  • iOS ARM64 Simulator PR

Copy link
Member

@ned-deily ned-deily left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@freakboy3742 freakboy3742 merged commit a580838 into python:main Jan 25, 2025
49 checks passed
@miss-islington-app
Copy link

Thanks @freakboy3742 for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13.
🐍🍒⛏🤖

@freakboy3742 freakboy3742 deleted the ios-log-prefix-strip branch January 25, 2025 08:49
@freakboy3742 freakboy3742 restored the ios-log-prefix-strip branch January 25, 2025 08:49
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jan 25, 2025
…tput. (pythonGH-129252)

Filter out the iOS log prefix from testbed runner output.
(cherry picked from commit a58083811a51764c47fbb7cbd67e87e1124d53e8)

Co-authored-by: Russell Keith-Magee <[email protected]>
@bedevere-app
Copy link

bedevere-app bot commented Jan 25, 2025

GH-129283 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.13 bugs and security fixes label Jan 25, 2025
@freakboy3742 freakboy3742 deleted the ios-log-prefix-strip branch January 25, 2025 08:50
freakboy3742 added a commit that referenced this pull request Jan 25, 2025
…utput. (GH-129252) (#129283)

Filter out the iOS log prefix from testbed runner output.
(cherry picked from commit a580838)

Co-authored-by: Russell Keith-Magee <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

iOS buildbot failure comments don't contain failure details anymore
4 participants