Skip to content

[release/11.0.1xx] Honor MTP zero-tests and exit-code policies in dotnet test - #56303

Merged
Evangelink merged 3 commits into
release/11.0.1xxfrom
dev/amauryleve/backport-mtp-test-policies
Sep 15, 2026
Merged

Evangelink merged 3 commits into
release/11.0.1xxfrom
dev/amauryleve/backport-mtp-test-policies

Conversation

@Evangelink

@Evangelink Evangelink commented Sep 15, 2026 •

Copy link
Copy Markdown
Member

Summary

Backport the MTP zero-tests and exit-code policy fixes from 6eb73fc and the validated follow-up e08c3f4 to release/11.0.1xx.

  • fixes the aggregate all-skipped/zero-tests result
  • reconstructs policies from explicit and default .testconfig.json files
  • preserves environment > CLI > JSON precedence for ignored exit codes
  • matches environment variable names case-insensitively on Windows and case-sensitively on Unix
  • adds the end-to-end regressions and supporting parser/queue/reporter tests

The cherry-pick conflicts were limited to MicrosoftTestingPlatformTestCommand.cs and TestCommandParserTests.cs; the resolutions preserve release-only retry and output behavior without importing unrelated main-only changes.

References #56219 and #56296.

Validation

  • build.cmd
  • focused dotnet.Tests: 67 passed, 0 failed, 1 platform-specific skip (68 total)
.\.dotnet\dotnet.exe .github\skills\targeted-test\scripts\RunTargetedTests.cs -- --project test\dotnet.Tests\dotnet.Tests.csproj --filter "FullyQualifiedName~TestCommandParserTests|FullyQualifiedName~TestApplicationActionQueueTests|FullyQualifiedName~TerminalTestReporterTests|Name~RunAllSkippedTestsHonors|Name=RunNoTestsHonorsIgnoredExitCodeFromExplicitConfigurationFile|Name=RunMinimumExpectedTestsViolationHonorsIgnoreExitCodePolicy"

Evangelink and others added 2 commits September 15, 2026 11:55
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Reconstruct zero-test and ignored-exit policies from explicit and default test configuration files, and match process environment casing and override order on Windows.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI lite review requested due to automatic review settings September 15, 2026 10:15
@Evangelink
Evangelink requested a review from a team as a code owner September 15, 2026 10:15
@azure-pipelines

Copy link
Copy Markdown
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.

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.

Copilot review overview

🟡 Changes recommended

Seven moderate findings remain unresolved across policy reconstruction, cancellation reporting, and Unix-specific regression coverage.

Get a fresh assessment by requesting another Copilot review.

Review tier: Lite
Findings: 1 Medium severity

Open (1)
What changed in this PR

Backports MTP zero-test and ignored-exit-code policy handling to dotnet test for the release/11.0.1xx branch.

Changes:

  • Reconstructs policies from CLI arguments, response/configuration files, and environment variables.
  • Applies policies to aggregate exit codes and terminal summaries.
  • Adds parser, queue, reporter, and end-to-end regression tests.
File Review notes
test/​dotnet.Tests/​CommandTests/​Test/​TestCommandParserTests.cs No final findings.
test/​dotnet.Tests/​CommandTests/​Test/​TestApplicationActionQueueTests.cs No final findings.
test/​dotnet.Tests/​CommandTests/​Test/​TerminalTestReporterTests.cs No final findings.
test/​dotnet.Tests/​CommandTests/​Test/​GivenDotnetTestBuildsAndRunsTests.cs Moderate (1 vote): add Unix case-sensitive coverage for the lowercase launch-profile environment variable.
src/​Cli/​dotnet/​Commands/​Test/​MTP/​TestApplicationActionQueue.cs No final findings.
src/​Cli/​dotnet/​Commands/​Test/​MTP/​Terminal/​TerminalTestReporter.cs Moderate (1 vote): preserve cancellation in the failure decision so cancelled runs are reported as aborted.
src/​Cli/​dotnet/​Commands/​Test/​MTP/​Options.cs No final findings.
src/​Cli/​dotnet/​Commands/​Test/​MTP/​MicrosoftTestingPlatformTestCommand.cs Moderate findings: validate repeated policy options consistently (1 vote); guard config-path normalization (1 vote); guard response-file path normalization (1 vote); add Unix case-sensitive coverage (2 votes); distinguish a missing config value from an absent option (1 vote).

@Evangelink
Evangelink enabled auto-merge (squash) September 15, 2026 11:58
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@Evangelink
Evangelink merged commit 307e75e into release/11.0.1xx Sep 15, 2026
25 of 26 checks passed
@Evangelink
Evangelink deleted the dev/amauryleve/backport-mtp-test-policies branch September 15, 2026 14:29
@dotnet-milestone-bot dotnet-milestone-bot Bot added this to the 11.0-rc2 milestone Sep 15, 2026

This branch had an error being deployed

1 failed deployment
copilot-pat-pool — f9c795e8 Deployed Sep 15, 2026 by Evangelink via pre_activation #4973
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants