Skip to content

Parse XCTest output anywhere in output lines #1511

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

Merged
merged 1 commit into from
Apr 22, 2025

Conversation

plemarquand
Copy link
Contributor

@plemarquand plemarquand commented Apr 22, 2025

Sometimes when running tests that print user output during their execution this output can be printed on the same line as XCTest results output, either before or after the results string. Previously this showed as a test that never finished (pending) in the test explorer, but with the introduction of #1505 tests that start but don't find any completion output are assumed to be crashed and marked as failed.

This extra user output interleaved with XCTest output would cause false positives, leading users to believe that their test never completed (crashed) when really we just missed the success/failure message from XCTest due to overly strict parsing.

Relax the XCTest output parsing regexes so that matched strings don't need to be at the start of a line.

Sometimes when running tests that print user output during their
execution this output can be printed on the same line as XCTest results
output, either before or after the results string. Previously this
showed as a test that never finished (pending) in then test explorer,
but with the introduction of swiftlang#1505 tests that start but don't find any
completion output are assumed to be crashed and marked as failed.

This extra user output interleaved with XCTest output would cause false
positives, leading users to believe that their test never completed
(crashed) when really we just missed the success/failure message from
XCTest due to overly strict parsing.

Relax the XCTest output parsing regexes so that matched strings don't
need to be at the start of a line.
@plemarquand plemarquand merged commit 27dcd82 into swiftlang:main Apr 22, 2025
16 checks passed
@plemarquand plemarquand deleted the relax-xctest-output-parsing branch April 22, 2025 16:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants