Repository navigation
Fix dotnet test validation with explicit paths - #56369
Merged
Merged
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…ryleve/dotnet-test-cli-isolation
…ryleve/dotnet-test-cli-isolation
|
Azure Pipelines: Successfully started running 1 pipeline(s). 2 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
Contributor
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The regression coverage is complete and no blocking issues were identified.
Review effort: Lite
Findings: None
What changed in this PR
Adds end-to-end regression coverage for dotnet test argument isolation after --.
Changes:
- Tests forwarding
--filter TestProject.csprojto Microsoft.Testing.Platform. - Verifies successful execution without erroneous project validation.
| File | Description |
|---|---|
test/dotnet.Tests/CommandTests/Test/GivenDotnetTestBuildsAndRunsTestsWithDifferentOptions.cs |
Adds separator-aware argument isolation regression coverage. |
Evangelink
enabled auto-merge (squash)
September 22, 2026 11:43
0101
approved these changes
Sep 22, 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.
dotnet testprovides helpful validation when a project, solution, directory, or test module is passed as a non-first unmatched argument. That validation is misleading when an explicit build path such as--projectis already present, because subsequent unmatched tokens belong to the test application and may legitimately name an existing project file.This change keeps positional inference and duplicate-path validation intact, but skips the non-first path diagnostic when
--project,--solution, or--test-moduleshas already selected the build input. As a result, extension option values behave consistently with and without the--separator.The end-to-end test runs a real Microsoft.Testing.Platform project with an explicit
--projectand forwards--filter TestProject.csprojin both forms. Existing validation tests continue to verify the helpful diagnostics when no explicit build path is supplied.Related to #56338. The .NET 10 servicing fix is in #56374.