Skip to content

Conversation

@plemarquand
Copy link
Contributor

If a test crashes during a test run the extension never marks the test as failed, since it doesn't see the output that marks the test as completed.

If we finish a test run and we still have a test in the 'pending' state where no pass/fail/skip has been seen, mark the test as failed with a message stating the test never finished.

Issue: #1504

@plemarquand plemarquand force-pushed the fail-test-on-crash branch 3 times, most recently from eaab355 to 56d3c02 Compare April 16, 2025 18:08
If a test crashes during a test run the extension never marks the test
as failed, since it doesn't see the output that marks the test as
completed.

If we finish a test run and we still have a test in the 'pending' state
where no pass/fail/skip has been seen, mark the test as failed with a
message stating the test never finished.

Issue: swiftlang#1504
@plemarquand plemarquand merged commit abc76d5 into swiftlang:main Apr 16, 2025
16 checks passed
@plemarquand plemarquand deleted the fail-test-on-crash branch April 16, 2025 18:48
plemarquand added a commit to plemarquand/vscode-swift that referenced this pull request 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 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 added a commit that referenced this pull request 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 then 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.
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