Repository navigation
Add ReadyToRun configuration tests - #26080
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 91e6cd90-6532-4318-981e-c35ad0f7d2d7
There was a problem hiding this comment.
Pull request overview
Adds a focused unit test that validates the ReadyToRun (R2R) composite input/roots/reference selection for CoreCLR iOS builds by asserting the MSBuild item groups used just before crossgen2 runs. This provides direct regression coverage for the “Debug = CoreLib-only rooted + app as reference” vs “Release = full composite input” behavior described in #25830.
Changes:
- Added
ReadyToRunTestunit test that buildsMySimpleAppin Debug/Release and passes an expectation flag into MSBuild. - Added an MSBuild assertion target in
MySimpleApp/shared.csprojthat inspects R2R item groups (PublishReadyToRunCompositeRoots,_ReadyToRunCompositeBuildInput,_ReadyToRunCompositeBuildReferences,_ReadyToRunCompositeUnrootedBuildInput) and errors if the configuration doesn’t match expectations.
Show a summary per file
| File | Description |
|---|---|
| tests/dotnet/UnitTests/ReadyToRunTest.cs | New NUnit test that builds MySimpleApp in Debug/Release and triggers the MSBuild-side assertions. |
| tests/dotnet/MySimpleApp/shared.csproj | Adds a gated _AssertReadyToRunConfiguration target to validate R2R roots/inputs/references right before _CreateR2RImages. |
Copilot's findings
- Files reviewed: 2/2 changed files
- Comments generated: 0
This comment has been minimized.
This comment has been minimized.
rolfbjarne
left a comment
There was a problem hiding this comment.
Looks good, just a minor improvement to minimize test time when everything is green.
This comment has been minimized.
This comment has been minimized.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: fc3a7139-501f-47ff-96d9-4e8b37573df5
This comment has been minimized.
This comment has been minimized.
✅ API diff for current PR / commitNET (empty diffs)✅ API diff vs stableNET (empty diffs)ℹ️ Generator diffGenerator Diff: vsdrops (html) vsdrops (raw diff) gist (raw diff) - Please review changes) Pipeline on Agent |
🚀 [CI Build #a547b8c] Test results 🚀Test results✅ All tests passed on VSTS: test results. 🎉 All 256 tests passed 🎉 Tests counts✅ assembly-processing: All 1 tests passed. Html Report (VSDrops) Download macOS tests✅ Tests on macOS Sonoma (14): All 5 tests passed. Html Report (VSDrops) Download Linux Build VerificationPipeline on Agent |
Description
Adds direct coverage for the ReadyToRun assembly selection used by CoreCLR iOS builds. The test builds
MySimpleAppfor Debug and Release and uses a gated MSBuild target to verify that Debug roots onlySystem.Private.CoreLib.dll, keeps remaining framework assemblies unrooted, and passes the app assembly as a reference, while Release uses the full composite input. This catches changes to the transient R2R item groups before crossgen2 runs.Contributes to #25830