[net11.0] [tests] Expand the AppSizeTest to more platforms.#25080
[net11.0] [tests] Expand the AppSizeTest to more platforms.#25080rolfbjarne wants to merge 4 commits intonet11.0from
Conversation
… macho format by default.
Ensure outer multi-RID app bundle builds include merged MonoBundle dylibs in post-processing so dsymutil generates dSYMs for the universal CoreCLR native libraries. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Expands the AppSizeTest coverage to additional Apple platforms/configurations (tvOS, Mac Catalyst, macOS) and adjusts the build/linker plumbing to handle ReadyToRun container format differences and multi-RID post-processing (dSYM/strip) so the new size baselines can be validated consistently.
Changes:
- Expand
AppSizeTestmatrix to tvOS/Mac Catalyst/macOS, and enable dSYM generation in these scenarios. - Add
PublishReadyToRunContainerFormatpropagation into the linker/bundler pipeline and gate Mach-O specific R2R header wiring accordingly. - Add new expected app-size baseline files for the newly-covered platform/runtime combinations.
Reviewed changes
Copilot reviewed 21 out of 30 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tools/dotnet-linker/LinkerConfiguration.cs | Parses PublishReadyToRunContainerFormat from the linker configuration into Application. |
| tools/common/Target.cs | Only emits/uses RTR_HEADER wiring when R2R is enabled and the container format is Mach-O. |
| tools/common/Application.cs | Adds PublishReadyToRunContainerFormat field to carry the format through the toolchain. |
| msbuild/Xamarin.Shared/Xamarin.Shared.targets | Ensures dylibs in merged multi-RID app bundles are still discovered for dsymutil/strip post-processing. |
| dotnet/targets/Xamarin.Shared.Sdk.targets | Passes PublishReadyToRunContainerFormat into the linker invocation. |
| dotnet/targets/Microsoft.Sdk.R2R.targets | Adjusts R2R output path handling and gates default R2R container behavior on Mach-O container format. |
| tests/dotnet/UnitTests/AppSizeTest.cs | Expands test cases to tvOS/Mac Catalyst/macOS; enables dSYM generation; skips assembly inspection in some macOS CoreCLR cases. |
| tests/dotnet/SizeTestApp/MacCatalyst/SizeTestApp.csproj | Adds Mac Catalyst project for the size test app. |
| tests/dotnet/SizeTestApp/AppDelegate.cs | Adds an AppKit entry point/app delegate for macOS builds of the size test app. |
| tests/dotnet/UnitTests/expected/TVOS-NativeAOT-size.txt | New expected size baseline for tvOS NativeAOT. |
| tests/dotnet/UnitTests/expected/TVOS-MonoVM-size.txt | New expected size baseline for tvOS MonoVM. |
| tests/dotnet/UnitTests/expected/TVOS-MonoVM-interpreter-size.txt | New expected size baseline for tvOS MonoVM interpreter. |
| tests/dotnet/UnitTests/expected/TVOS-CoreCLR-R2R-size.txt | New expected size baseline for tvOS CoreCLR R2R. |
| tests/dotnet/UnitTests/expected/TVOS-CoreCLR-Interpreter-size.txt | New expected size baseline for tvOS CoreCLR interpreter. |
| tests/dotnet/UnitTests/expected/MacOSX-NativeAOT-size.txt | New expected size baseline for macOS NativeAOT. |
| tests/dotnet/UnitTests/expected/MacOSX-CoreCLR-R2R-size.txt | New expected size baseline for macOS CoreCLR R2R (multi-RID). |
| tests/dotnet/UnitTests/expected/MacOSX-CoreCLR-Interpreter-size.txt | New expected size baseline for macOS CoreCLR interpreter (multi-RID). |
| tests/dotnet/UnitTests/expected/MacCatalyst-NativeAOT-size.txt | New expected size baseline for Mac Catalyst NativeAOT. |
| tests/dotnet/UnitTests/expected/MacCatalyst-MonoVM-size.txt | New expected size baseline for Mac Catalyst MonoVM. |
| tests/dotnet/UnitTests/expected/MacCatalyst-MonoVM-interpreter-size.txt | New expected size baseline for Mac Catalyst MonoVM interpreter. |
| tests/dotnet/UnitTests/expected/MacCatalyst-CoreCLR-R2R-size.txt | New expected size baseline for Mac Catalyst CoreCLR R2R. |
| tests/dotnet/UnitTests/expected/MacCatalyst-CoreCLR-Interpreter-size.txt | New expected size baseline for Mac Catalyst CoreCLR interpreter. |
| [TestCase (ApplePlatform.iOS, "ios-arm64", true)] | ||
| [TestCase (ApplePlatform.TVOS, "tvos-arm64", true)] | ||
| [TestCase (ApplePlatform.MacCatalyst, "maccatalyst-arm64", true)] | ||
| [TestCase (ApplePlatform.MacOSX, "osx-arm64;osx-x64", false)] | ||
| public void CoreCLR_Interpreter (ApplePlatform platform, string runtimeIdentifiers, bool isTrimmed) | ||
| { | ||
| Run (platform, runtimeIdentifiers, "Release", $"{platform}-CoreCLR-Interpreter", true, new Dictionary<string, string> () { { "UseMonoRuntime", "false" }, { "PublishReadyToRun", "false" } }); | ||
| var dict = new Dictionary<string, string> () { | ||
| { "UseMonoRuntime", "false" }, | ||
| { "PublishReadyToRun", "false" }, | ||
| { "NoDSymUtil", "false" }, // off by default for macOS, but we want to test it, so enable it | ||
| }; | ||
| Run (platform, runtimeIdentifiers, "Release", $"{platform}-CoreCLR-Interpreter", isTrimmed, dict); | ||
| } |
There was a problem hiding this comment.
The isTrimmed parameter name is misleading here: it's passed directly to Run(..., supportsAssemblyInspection, ...) and controls whether the assembly API report is generated, not trimming. Rename this parameter (and the TestCase argument) to something like supportsAssemblyInspection/supportsApiInspection to match what it actually does, or introduce a separate trimming flag if that's the intent.
| [TestCase (ApplePlatform.iOS, "ios-arm64", true)] | ||
| [TestCase (ApplePlatform.TVOS, "tvos-arm64", true)] | ||
| [TestCase (ApplePlatform.MacCatalyst, "maccatalyst-arm64", true)] | ||
| [TestCase (ApplePlatform.MacOSX, "osx-arm64;osx-x64", false)] | ||
| public void CoreCLR_R2R (ApplePlatform platform, string runtimeIdentifiers, bool isTrimmed) | ||
| { | ||
| Run (platform, runtimeIdentifiers, "Release", $"{platform}-CoreCLR-R2R", true, new Dictionary<string, string> () { { "UseMonoRuntime", "false" }, { "PublishReadyToRun", "true" } }); | ||
| var dict = new Dictionary<string, string> () { | ||
| { "UseMonoRuntime", "false" }, | ||
| { "PublishReadyToRun", "true" }, | ||
| { "NoDSymUtil", "false" }, // off by default for macOS, but we want to test it, so enable it | ||
| }; | ||
| Run (platform, runtimeIdentifiers, "Release", $"{platform}-CoreCLR-R2R", isTrimmed, dict); | ||
| } |
There was a problem hiding this comment.
Same as above: isTrimmed is used as the supportsAssemblyInspection argument to Run, so the name doesn't reflect its behavior. Consider renaming it to match its purpose (or split into separate flags if both trimming and inspection need to be modeled).
✅ [CI Build #7c0da78] Build passed (Build packages) ✅Pipeline on Agent |
✅ [PR Build #7c0da78] Build passed (Detect API changes) ✅Pipeline on Agent |
✅ 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 #7c0da78] Test results 🔥Test results❌ Tests failed on VSTS: test results 5 tests crashed, 2 tests failed, 128 tests passed. Failures❌ dotnettests tests (iOS)🔥 Failed catastrophically on VSTS: test results - dotnettests_ios (no summary found). Html Report (VSDrops) Download ❌ dotnettests tests (macOS)1 tests failed, 0 tests passed.Failed tests
Html Report (VSDrops) Download ❌ monotouch tests (MacCatalyst)1 tests failed, 18 tests passed.Failed tests
Html Report (VSDrops) Download ❌ monotouch tests (tvOS)🔥 Failed catastrophically on VSTS: test results - monotouch_tvos (no summary found). Html Report (VSDrops) Download ❌ Tests on macOS Sonoma (14) tests🔥 Failed catastrophically on VSTS: test results - mac_sonoma (no summary found). Html Report (VSDrops) Download ❌ Tests on macOS Sequoia (15) tests🔥 Failed catastrophically on VSTS: test results - mac_sequoia (no summary found). Html Report (VSDrops) Download ❌ Tests on macOS Tahoe (26) tests🔥 Failed catastrophically on VSTS: test results - mac_tahoe (no summary found). Html Report (VSDrops) Download Successes✅ cecil: All 1 tests passed. Html Report (VSDrops) Download macOS testsLinux Build VerificationPipeline on Agent |
No description provided.