Ensure prerequisites of csc-only tests#53960
Open
jjonescz wants to merge 2 commits intodotnet:mainfrom
Open
Conversation
Contributor
There was a problem hiding this comment.
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 runsdotnet run -once during test class initialization. - Make
RunFileTestBase.CopyNuGetConfigToRunfileDirectory()internalso 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. |
333fred
approved these changes
Apr 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
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).