Skip to content

Use swift-testing stdout as test results log verbatim #1058

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

Conversation

plemarquand
Copy link
Contributor

Instead of reconstructing the swift-testing output from a combination of stdout and the JSON event stream, simply pass stdout through directly and use that as the test results log. Use the JSON event stream to drive test pass/fail/skip/issue/etc behaviour.

This resolves a race condition between the JSON event stream and stdout interleaving output in an incorrect order.

This approach has the drawback of no longer associating individual lines of output derived from the JSON event stream with a specific test, however this was offering limited benefit since user output wasn't captured in this way. Once every line of output can be accounted for in the JSON event stream we can add this functionality back in with user output included.

Issue: #1054

Instead of reconstructing the swift-testing output from a combination of
stdout and the JSON event stream, simply pass stdout through directly
and use that as the test results log. Use the JSON event stream to drive
test pass/fail/skip/issue/etc behaviour.

This resolves a race condition between the JSON event stream and stdout
interleaving output in an incorrect order.

This approach has the drawback of no longer associating individual lines
of output derived from the JSON event stream with a specific test,
however this was offering limited benefit since user output wasn't
captured in this way. Once every line of output can be accounted for in
the JSON event stream we can add this functionality back in with user
output included.

Issue: swiftlang#1054
@plemarquand plemarquand force-pushed the swift-testing-stdout-as-test-results-log branch from ed0a9d8 to e61d39b Compare September 6, 2024 16:04
@plemarquand plemarquand marked this pull request as ready for review September 6, 2024 17:23
@plemarquand plemarquand merged commit dceec6b into swiftlang:main Sep 9, 2024
8 checks passed
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.

None yet

3 participants