Skip to content

Include verbose output in RunFileTests - #53884

Merged
jjonescz merged 8 commits into
dotnet:mainfrom
jjonescz:7289-VerboseToStdErr
Apr 20, 2026
Merged

jjonescz merged 8 commits into
dotnet:mainfrom
jjonescz:7289-VerboseToStdErr

Conversation

@jjonescz

@jjonescz jjonescz commented Apr 15, 2026 •

Copy link
Copy Markdown
Member

Should help with investigating these flaky failures: #53869 (but also other failures in these tests the future).

@jjonescz jjonescz changed the title Make verbose output go to stderr Make verbose output go to stderr in RunFileTests Apr 16, 2026
@jjonescz jjonescz changed the title Make verbose output go to stderr in RunFileTests Include verbose output in RunFileTests Apr 16, 2026
@jjonescz jjonescz added Test Debt Area-run-file Items related to the "dotnet run <file>" effort labels Apr 16, 2026
@jjonescz
jjonescz marked this pull request as ready for review April 16, 2026 12:17
@jjonescz
jjonescz requested review from a team and Copilot April 16, 2026 12:17

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates dotnet run file-mode test execution to emit verbose diagnostics (without polluting stdout assertions) and adjusts CLI verbose plumbing to support sending verbose output to stderr.

Changes:

  • Enable verbose logging for RunFileTestBase’s dotnet run invocations and route verbose output to stderr.
  • Add a new logging context env var to control whether verbose output goes to stderr.
  • Route an early “Telemetry is …” verbose message through Reporter.Verbose instead of Console.WriteLine.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
test/dotnet.Tests/CommandTests/Run/RunFileTestBase.cs Sets verbose-related env vars for dotnet run in file-mode tests.
src/Cli/Microsoft.DotNet.Cli.Utils/CommandLoggingContext.cs Introduces DOTNET_CLI_CONTEXT_VERBOSE_TO_STDERR and exposes IsVerboseToStdErr.
src/Cli/Microsoft.DotNet.Cli.Utils/Reporter.cs Routes Reporter.Verbose to stderr when configured.
src/Cli/dotnet/Program.cs Emits telemetry state via Reporter.Verbose when verbosity is enabled.

@jjonescz

Copy link
Copy Markdown
Member Author

/ba-g known failures only: #53918

@jjonescz
jjonescz merged commit 2e16dff into dotnet:main Apr 20, 2026
18 of 24 checks passed
@jjonescz
jjonescz deleted the 7289-VerboseToStdErr branch April 20, 2026 08:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area-run-file Items related to the "dotnet run <file>" effort Test Debt

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants