Add RunOnAndroid_MauiNativeAOT integration test#34360
Conversation
Add a test that builds a NativeAOT-compiled MAUI app for Android, deploys it to an emulator, and verifies it launches successfully using XHarness. This mirrors the existing RunOniOS_MauiNativeAOT test for iOS and runs in the existing mac_runandroid_tests CI lane.
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.sh | bash -s -- 34360Or
iex "& { $(irm https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.ps1) } 34360" |
There was a problem hiding this comment.
Pull request overview
This PR adds a new integration test RunOnAndroid_MauiNativeAOT that builds a NativeAOT-compiled MAUI app for Android, installs it on an emulator, and verifies it launches successfully using XHarness. It mirrors the existing RunOniOS_MauiNativeAOT test in AppleTemplateTests.cs and will automatically be picked up by the existing mac_runandroid_tests CI lane via the class-level [Trait("Category", "RunOnAndroid")] attribute.
Changes:
- New
[Fact]testRunOnAndroid_MauiNativeAOTadded toAndroidTemplateTests, configuring NativeAOT-specific MSBuild properties (including NDK path, ABI-aware RID selection, andTargetFrameworksrestriction toandroid), then building/installing via theInstalltarget and running the app with XHarness.
…ateTests.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
jonathanpeppers
left a comment
There was a problem hiding this comment.
If the RunOnAndroid_MauiNativeAOT test passes, LGTM.
It doesn't look like it asserts 0 warnings or anything, so it should pass.
Add a test that builds a NativeAOT-compiled MAUI app for Android, deploys it to an emulator, and verifies it launches successfully using XHarness. This mirrors the existing RunOniOS_MauiNativeAOT test for iOS and runs in the existing
mac_runandroid_testsCI lane (which uses the Linux Android pool).