镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

[ci] Fix macOS MSBuild test discovery; remove overlapping tests and one lane per OS - #13550

Draft
jonathanpeppers wants to merge 2 commits into
mainfrom
jonathanpeppers-slow-test-analysis
Draft

jonathanpeppers wants to merge 2 commits into
mainfrom
jonathanpeppers-slow-test-analysis

Conversation

@jonathanpeppers

Copy link
Copy Markdown
Member

macOS MSBuild lanes run no tests

Since #13376 moved Xamarin.Android.Build.Tests to net11.0, all 10 macOS > Tests > MSBuild lanes report Found 0 matching tests. and pass. Builds before #13376 found about 1,957 tests. Every build after it found 0.

On macOS, the dotnet-test-slicer apphost uses .NET 10 even with DOTNET_ROOT set. .NET 10 cannot load the net11.0 assembly. On Windows, the slicer uses .NET 12 and finds the tests.

The slicer now runs as bin/$(Configuration)/dotnet/dotnet <dotnet-test-slicer.dll>, so it uses the SDK installed during test setup. The slice step also fails when it finds 0 tests, so this cannot pass silently again.

Overlapping tests and lane count

Many MSBuild tests repeat each CoreCLR case on NativeAOT, or test many values of one input. This removes cases that repeat what other cases already test, and keeps at least one NativeAOT case where a runtime-specific problem is possible. In 5 recent builds, the removed Windows cases took about 174 test-minutes per build.

  • Windows MSBuild lanes: 8 → 7.
  • macOS MSBuild lanes: 10 → 9. Before the break, macOS lanes took 30–48 minutes, while Windows lanes took 100–150.

The 7-lane Windows time is not verified. The removed time is below an earlier estimate of 210–230 test-minutes for one full lane, because the slicer splits tests by count, not by duration.

Testing

  • Locally, I ran dotnet-test-slicer 0.1.0-alpha7 with the new commands against the net11.0 test assembly:
    • Repo-local .NET 12: found 1,878 tests, with and without the nightly filter.
    • .NET 10 (dotnet exec --fx-version 10.0.15): found 0 tests, and the new check fails the step.
  • dotnet-local.cmd test bin\TestDebug\net11.0\Xamarin.Android.Build.Tests.dll --filter "<18 changed test methods>" -- NUnit.NumberOfTestWorkers=2 on Windows: 141 passed, 0 failed, 6 skipped. The 6 skipped cases are the BuildApkWithManyAssets NativeAOT cases, which were already skipped because that test runs only in Debug.
  • After small review edits, I rebuilt the test project with 0 errors. I did not run the tests again.
  • This PR's CI must confirm that the macOS lanes find tests again.

jonathanpeppers and others added 2 commits November 13, 2026 08:41
Since #13376 moved Xamarin.Android.Build.Tests to net11.0, every macOS
MSBuild test lane has found 0 tests and passed. The slicer apphost used
.NET 10 on macOS even with DOTNET_ROOT set, and .NET 10 cannot load the
net11.0 test assembly.

Run the slicer dll with the repo-local dotnet so it uses the SDK
installed during test setup. Fail the slice step when it finds 0 tests,
so this cannot pass silently again.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Remove NativeAOT and other cases that repeat what CoreCLR cases or
other NativeAOT cases already test. Keep at least one NativeAOT case
where the test can find a runtime-specific problem.

Reduce the Windows MSBuild lanes from 8 to 7 and the macOS MSBuild
lanes from 10 to 9.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

This branch has not been deployed

No deployments
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.

1 participant