-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Only output when tests/builds fail if --quiet flag is present #7216
base: main
Are you sure you want to change the base?
Conversation
…ent. Flush quiet buffer to stdout on failures.
This is far enough along now that I think it's ready for review. I'd like some feedback on the approaches taken, whether they're in the right direction. I'd still like to add a few more tests for |
@swift-ci test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall this makes sense, but IMO it should avoid new uses of BufferedOutputByteStream
and resolve a few line length formatting nits.
@swift-ci test |
Does this change take swift-testing into account? If not, are there changes needed in swift-testing to support it? |
…teStream. Fix line lenght violations.
@swift-ci test |
@swift-ci test windows |
1 similar comment
@swift-ci test windows |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The newly added tests need to be fixed on Linux for both swift build
and ./Utilities/build-using-self
, and on macOS only for the latter.
Hi @clayellis, would you be able to resolve conflicts and address review feedback on this PR? Thanks! |
Yes, I'll aim to complete this PR by the end of the week (hopefully earlier.) |
Only output when tests and builds fail if the
--quiet
flag is present.Motivation:
Resolves the latest conversation on #4395 concerning how the
--quiet
flag doesn't do what it advertises when used withswift test
andswift build
.Modifications:
--quiet
is present, collect output until tests finish and print output to stdout conditionally.LoggingOptions
intoParallelTestRunner
.--quiet
is present.TestQuietPass
,TestQuietPassFail
,TestQuietFail
) for testing the quiet flag--quiet
flag when all tests pass, when some tests pass/fail, when all tests fail.--quiet
is present.--quiet
flag when a build passes and when one fails.Result:
If tests pass successfully and the
--quiet
flag is present, nothing will be output. Output as normal when tests fail. The only notable change to output in the failure case is that when running tests in parallel (--parallel
), the progress animation is not updated.If a build succeeds and the
--quiet
flag is present, nothing will be output. If a build fails with the flag, the build output will appear as normal onstdout
.