Repository navigation
[flaky-ci] Pin test slicer to repo-local runtime - #12706
Conversation
Set DOTNET_ROOT for every test slicer invocation so its apphost uses the SDK provisioned by the test setup instead of relying on hosted-agent runtime registration. Co-authored-by: Copilot App <[email protected]>
|
/review |
|
✅ Android PR Reviewer completed successfully!
|
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The change is narrowly scoped to CI template behavior and appears to address the reported runtime-discovery failure without introducing functional risk.
Review tier: Lite
Findings: 1
New issues introduced by this change (1)
| Severity | Finding |
|---|---|
build-tools/automation/yaml-templates/run-sliced-nunit-tests.yaml — 💡 Suggestion: DOTNET_ROOT is computed as `${{ parameters.xaSourcePath… |
What changed in this PR
This PR adjusts Azure Pipelines test templates to ensure dotnet-test-slicer reliably finds the repo-pinned .NET runtime during CI, addressing macOS flakiness where the slicer’s native apphost can’t resolve .NET when invoked by absolute path.
Changes:
- Sets
DOTNET_ROOTto the repo-local SDK (bin/$(XA.Build.Configuration)/dotnet) for eachdotnet-test-slicerinvocation (slice + retry). - Forwards
xaSourcePaththrough the MSBuild emulator stage template into the sliced NUnit test template.
| File | Description |
|---|---|
| build-tools/automation/yaml-templates/stage-msbuild-emulator-tests.yaml | Passes xaSourcePath into the sliced NUnit template so custom checkout roots stay consistent. |
| build-tools/automation/yaml-templates/run-sliced-nunit-tests.yaml | Pins slicer runtime discovery by exporting DOTNET_ROOT for slicer steps. |
There was a problem hiding this comment.
Verdict: ⏳ CI pending
No blocking code findings (0 errors, 0 warnings). The change applies the repo-local runtime root to both slicer branches and the retry invocation, and correctly forwards the custom source root through the emulator-stage template. The completed emulator matrix is green, but the newest required CI run is still in progress, so this is not yet a green-build verdict.
One non-blocking DRY suggestion is already posted inline; I did not duplicate it.
Generated by Android PR Reviewer for #12706 · gpt56 · 87.6 AIC · ⌖ 3.52 AIC · ⊞ 27.7K
Comment /review to run again
|
/review |
|
✅ Android PR Reviewer completed successfully!
|
There was a problem hiding this comment.
✅ LGTM — 0 errors, 0 warnings, 0 suggestions.
The repo-local DOTNET_ROOT is applied to all three dotnet-test-slicer apphost invocations, and xaSourcePath is now forwarded by the emulator-stage template so custom checkout roots remain aligned with test setup. All 45 reported checks are successful.
Generated by Android PR Reviewer for #12706 · gpt56 · 82.9 AIC · ⌖ 8.75 AIC · ⊞ 25.7K
Comment /review to run again

Why
Hosted macOS builds 1574631 and 1574989 installed
dotnet-test-slicersuccessfully, then failed before running tests because its native apphost could not locate .NET. The tool was invoked by absolute path, so adding its directory toPATHdid not help runtime discovery; bothDOTNET_ROOT_X64andDOTNET_ROOTwere unset.The pinned slicer package targets
net8.0withrollForward: LatestMajor, while test setup already installs the repository-pinned compatible SDK underbin/$(XA.Build.Configuration)/dotnet.Tracked by #12704.
What changed
DOTNET_ROOTto the repo-local SDK for every initial and retry slicer invocation.xaSourcePaththrough the emulator-stage template so custom checkout paths resolve the same SDK installed during setup.Validation
DOTNET_ROOT.dotnet-test-slicer0.1.0-alpha7 successfully against a .NET 11-only runtime root, exercising its configured major-version roll-forward.