Skip to content

Add ReadyToRun configuration tests - #26080

Merged
rolfbjarne merged 3 commits into
net11.0from
dev/kotlarmilos/add-r2r-configuration-tests
Jul 15, 2026
Merged

rolfbjarne merged 3 commits into
net11.0from
dev/kotlarmilos/add-r2r-configuration-tests

Conversation

@kotlarmilos

Copy link
Copy Markdown
Member

Description

Adds direct coverage for the ReadyToRun assembly selection used by CoreCLR iOS builds. The test builds MySimpleApp for Debug and Release and uses a gated MSBuild target to verify that Debug roots only System.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

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

Copilot-Session: 91e6cd90-6532-4318-981e-c35ad0f7d2d7
Copilot AI review requested due to automatic review settings July 14, 2026 14:40

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.

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 ReadyToRunTest unit test that builds MySimpleApp in Debug/Release and passes an expectation flag into MSBuild.
  • Added an MSBuild assertion target in MySimpleApp/shared.csproj that 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

@kotlarmilos kotlarmilos self-assigned this Jul 14, 2026
@kotlarmilos
kotlarmilos requested a review from rolfbjarne July 14, 2026 14:59
@vs-mobiletools-engineering-service2

This comment has been minimized.

@rolfbjarne rolfbjarne left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, just a minor improvement to minimize test time when everything is green.

@rolfbjarne
rolfbjarne enabled auto-merge (squash) July 14, 2026 17:14
@vs-mobiletools-engineering-service2

This comment has been minimized.

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

Copilot-Session: fc3a7139-501f-47ff-96d9-4e8b37573df5
@kotlarmilos
kotlarmilos requested a review from rolfbjarne July 15, 2026 08:03
@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

✅ API diff for current PR / commit

NET (empty diffs)

✅ API diff vs stable

NET (empty diffs)

ℹ️ Generator diff

Generator Diff: vsdrops (html) vsdrops (raw diff) gist (raw diff) - Please review changes)

Pipeline on Agent
Hash: a547b8cb8df03a18f30f36de718d37b1a3ac2d8a [PR build]

@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

🚀 [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
✅ cecil: All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (iOS): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (MacCatalyst): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (macOS): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (Multiple platforms): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (tvOS): All 1 tests passed. Html Report (VSDrops) Download
✅ framework: All 2 tests passed. Html Report (VSDrops) Download
✅ fsharp: All 4 tests passed. Html Report (VSDrops) Download
✅ generator: All 5 tests passed. Html Report (VSDrops) Download
✅ interdependent-binding-projects: All 4 tests passed. Html Report (VSDrops) Download
✅ introspection: All 7 tests passed. Html Report (VSDrops) Download
✅ linker (iOS): All 31 tests passed. Html Report (VSDrops) Download
✅ linker (MacCatalyst): All 31 tests passed. Html Report (VSDrops) Download
✅ linker (macOS): All 21 tests passed. Html Report (VSDrops) Download
✅ linker (tvOS): All 31 tests passed. Html Report (VSDrops) Download
✅ monotouch (iOS): All 23 tests passed. Html Report (VSDrops) Download
✅ monotouch (MacCatalyst): All 23 tests passed. Html Report (VSDrops) Download
✅ monotouch (macOS): All 18 tests passed. Html Report (VSDrops) Download
✅ monotouch (tvOS): All 23 tests passed. Html Report (VSDrops) Download
✅ msbuild: All 2 tests passed. Html Report (VSDrops) Download
✅ sharpie: All 1 tests passed. Html Report (VSDrops) Download
✅ windows: All 3 tests passed. Html Report (VSDrops) Download
✅ xcframework: All 4 tests passed. Html Report (VSDrops) Download
✅ xtro: All 1 tests passed. Html Report (VSDrops) Download

macOS tests

✅ Tests on macOS Sonoma (14): All 5 tests passed. Html Report (VSDrops) Download
✅ Tests on macOS Sequoia (15): All 5 tests passed. Html Report (VSDrops) Download
✅ Tests on macOS Tahoe (26): All 5 tests passed. Html Report (VSDrops) Download

Linux Build Verification

✅ Linux build succeeded

Pipeline on Agent
Hash: a547b8cb8df03a18f30f36de718d37b1a3ac2d8a [PR build]

@rolfbjarne
rolfbjarne merged commit 24b84bb into net11.0 Jul 15, 2026
54 checks passed
@rolfbjarne
rolfbjarne deleted the dev/kotlarmilos/add-r2r-configuration-tests branch July 15, 2026 13:04
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.

4 participants