Skip to content

Ensure build output is printed on swift-testing compiler error #919

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

Conversation

plemarquand
Copy link
Contributor

When performing a swift-testing test run with code that fails to compile the build output was being discarded. This made it hard to see why tests weren't being run.

This was happening because swift-testing tests don't have their run started until the .swift-testing binary has sent all of its test events, which enumerate the parameterized test cases. This means that build output is witheld until the run starts.

If there is a compile error, unless we call testRunStarted() to flush the buffer of test result output, nothing is printed to the Test Results panel and build output is lost.

When performing a swift-testing test run with code that fails to compile
the build output was being discarded. This made it hard to see why tests
weren't being run.

This was happening because swift-testing tests don't have their run
started until the .swift-testing binary has sent all of its `test`
events, which enumerate the parameterized test cases. This means that
build output is witheld until the run starts.

If there is a compile error, unless we call `testRunStarted()` to flush
the buffer of test result output, nothing is printed to the Test Results
panel and build output is lost.
@plemarquand plemarquand merged commit b787be2 into swiftlang:main Jun 20, 2024
8 checks passed
@plemarquand plemarquand deleted the swift-testing-build-fails-discarded branch June 20, 2024 11:31
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