Only output when tests/builds fail if --quiet flag is present #7216
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
.