[nextest-runner] restrict --show-progress=only to interactive scenarios#3087
Conversation
There was a problem hiding this comment.
Pull request overview
This PR refactors the handling of --show-progress=only to make it context-aware, restricting its output-suppression behavior to interactive terminals only. In non-interactive scenarios (piped output, CI environments), it now behaves like auto, showing successful tests with a counter.
Changes:
- Introduced a new
DisplayConfigstruct that consolidates display configuration and resolves it based on terminal interactivity and CI detection - Modified
ShowProgress::Autoto include asuppress_successflag, allowing the "only" variant to be represented asAuto { suppress_success: true } - Updated the conversion from
UiShowProgress::Onlyto map toShowProgress::Auto { suppress_success: true }instead of special-casing it in the CLI layer
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| site/src/changelog.md | Added changelog entry documenting the behavior change for --show-progress=only |
| nextest-runner/src/user_config/elements/ui.rs | Updated UiShowProgress::Only documentation and conversion to ShowProgress |
| nextest-runner/src/reporter/mod.rs | Updated exports to include DisplayConfig and removed StatusLevels from public API |
| nextest-runner/src/reporter/imp.rs | Refactored to use DisplayConfig instead of individual status level fields |
| nextest-runner/src/reporter/displayer/progress.rs | Changed ShowProgress::Auto from unit variant to struct variant with suppress_success field |
| nextest-runner/src/reporter/displayer/mod.rs | Added new config module to exports |
| nextest-runner/src/reporter/displayer/imp.rs | Integrated DisplayConfig::resolve() to determine progress display and status levels |
| nextest-runner/src/reporter/displayer/config.rs | New file implementing DisplayConfig with comprehensive logic for resolving display decisions |
| nextest-runner/src/record/replay.rs | Updated to use DisplayConfig::with_overrides() for replay scenarios |
| cargo-nextest/src/dispatch/core/value_enums.rs | Updated CLI documentation to clarify interactive vs non-interactive behavior |
| cargo-nextest/src/dispatch/core/run.rs | Removed special-case handling of "only" variant; now handled by DisplayConfig |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
0cb6edc to
b2262df
Compare
In non-interactive scenarios, `--show-progress=only` hides successful tests, which is generally not what this is intended for.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #3087 +/- ##
==========================================
+ Coverage 84.17% 84.28% +0.10%
==========================================
Files 155 156 +1
Lines 42234 42470 +236
==========================================
+ Hits 35552 35797 +245
+ Misses 6682 6673 -9 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
b2262df to
2e438ce
Compare
In non-interactive scenarios,
--show-progress=onlyhides successful tests, which is generally not what this is intended for.