Skip to content

[net11.0] [tests] Expand the AppSizeTest to more platforms.#25080

Draft
rolfbjarne wants to merge 4 commits intonet11.0from
dev/rolf/net11.0-appsizetest
Draft

[net11.0] [tests] Expand the AppSizeTest to more platforms.#25080
rolfbjarne wants to merge 4 commits intonet11.0from
dev/rolf/net11.0-appsizetest

Conversation

@rolfbjarne
Copy link
Copy Markdown
Member

No description provided.

rolfbjarne and others added 4 commits April 2, 2026 14:11
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>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 AppSizeTest matrix to tvOS/Mac Catalyst/macOS, and enable dSYM generation in these scenarios.
  • Add PublishReadyToRunContainerFormat propagation 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.

Comment on lines +52 to 64
[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);
}
Copy link

Copilot AI Apr 3, 2026

Choose a reason for hiding this comment

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

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.

Copilot uses AI. Check for mistakes.
Comment on lines +66 to 78
[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);
}
Copy link

Copilot AI Apr 3, 2026

Choose a reason for hiding this comment

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

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).

Copilot uses AI. Check for mistakes.
@vs-mobiletools-engineering-service2
Copy link
Copy Markdown
Collaborator

✅ [CI Build #7c0da78] Build passed (Build packages) ✅

Pipeline on Agent
Hash: 7c0da78aad4733345337cba69e2b6a286dad65a0 [PR build]

@vs-mobiletools-engineering-service2
Copy link
Copy Markdown
Collaborator

✅ [PR Build #7c0da78] Build passed (Detect API changes) ✅

Pipeline on Agent
Hash: 7c0da78aad4733345337cba69e2b6a286dad65a0 [PR build]

@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: 7c0da78aad4733345337cba69e2b6a286dad65a0 [PR build]

@vs-mobiletools-engineering-service2
Copy link
Copy Markdown
Collaborator

🔥 [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

  • DotNet tests: Failed (Execution failed with exit code 1)
    • Xamarin.Tests.DotNetProjectTest.StrippedRuntimeIdentifiers(MacOS...: 'dotnet build' failed with exit code 1
      Full command: /Users/builder/azdo/_work/1/s/macios/builds/downloads/dotnet-sdk-11.0.100-p...

Html Report (VSDrops) Download

❌ monotouch tests (MacCatalyst)

1 tests failed, 18 tests passed.

Failed tests

  • monotouch-test/Mac Catalyst/Release (managed static registrar): Failed (Test run failed.
    Tests run: 3738 Passed: 3578 Inconclusive: 10 Failed: 2 Ignored: 158)

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
✅ dotnettests (MacCatalyst): 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 9 tests passed. Html Report (VSDrops) Download
✅ linker: All 44 tests passed. Html Report (VSDrops) Download
✅ monotouch (iOS): All 15 tests passed. Html Report (VSDrops) Download
✅ monotouch (macOS): All 12 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

Linux Build Verification

Linux build succeeded

Pipeline on Agent
Hash: 7c0da78aad4733345337cba69e2b6a286dad65a0 [PR build]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants