Skip to content

Ensure prerequisites of csc-only tests#53960

Open
jjonescz wants to merge 2 commits intodotnet:mainfrom
jjonescz:53869-FlakyCscOnly
Open

Ensure prerequisites of csc-only tests#53960
jjonescz wants to merge 2 commits intodotnet:mainfrom
jjonescz:53869-FlakyCscOnly

Conversation

@jjonescz
Copy link
Copy Markdown
Member

Related to #53869 (should fix that issue but I don't want to close it yet since it's flaky, so I would like to see it not appear for a while first).

@jjonescz jjonescz requested review from a team and Copilot April 17, 2026 12:17
@jjonescz jjonescz added Test Debt Area-run-file Items related to the "dotnet run <file>" effort labels Apr 17, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR aims to reduce flakiness in dotnet run file-based “csc-only” tests by ensuring the environment is pre-warmed (NuGet config present and a prior full MSBuild run performed) so subsequent runs can consistently hit the csc-only fast-path behavior being asserted.

Changes:

  • Add a new xUnit class fixture (RunFileCscOnlyFixture) that runs dotnet run - once during test class initialization.
  • Make RunFileTestBase.CopyNuGetConfigToRunfileDirectory() internal so it can be called from the new fixture.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
test/dotnet.Tests/CommandTests/Run/RunFileTests_CscOnlyAndApi.cs Introduces a class fixture that pre-warms run-file prerequisites before the tests in this class execute.
test/dotnet.Tests/CommandTests/Run/RunFileTestBase.cs Broadens accessibility of the NuGet.config helper to support fixture-based initialization.

Comment thread test/dotnet.Tests/CommandTests/Run/RunFileTests_CscOnlyAndApi.cs Outdated
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.

3 participants