Skip to content

Add RunOnAndroid_MauiNativeAOT integration test#34360

Merged
PureWeen merged 5 commits into
dotnet:mainfrom
sbomer:naotTest
Apr 27, 2026
Merged

Add RunOnAndroid_MauiNativeAOT integration test#34360
PureWeen merged 5 commits into
dotnet:mainfrom
sbomer:naotTest

Conversation

@sbomer
Copy link
Copy Markdown
Member

@sbomer sbomer commented Mar 6, 2026

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 (which uses the Linux Android pool).

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.
Copilot AI review requested due to automatic review settings March 6, 2026 18:56
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 6, 2026

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.sh | bash -s -- 34360

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.ps1) } 34360"

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

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] test RunOnAndroid_MauiNativeAOT added to AndroidTemplateTests, configuring NativeAOT-specific MSBuild properties (including NDK path, ABI-aware RID selection, and TargetFrameworks restriction to android), then building/installing via the Install target and running the app with XHarness.

Comment thread src/TestUtils/src/Microsoft.Maui.IntegrationTests/AndroidTemplateTests.cs Outdated
…ateTests.cs

Co-authored-by: Copilot <175728472+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

Copilot reviewed 1 out of 1 changed files in this pull request and generated 2 comments.

Comment thread src/TestUtils/src/Microsoft.Maui.IntegrationTests/AndroidTemplateTests.cs Outdated
@sbomer
Copy link
Copy Markdown
Member Author

sbomer commented Apr 14, 2026

@rmarinho @PureWeen PTAL

Copy link
Copy Markdown
Member

@jonathanpeppers jonathanpeppers left a comment

Choose a reason for hiding this comment

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

If the RunOnAndroid_MauiNativeAOT test passes, LGTM.

It doesn't look like it asserts 0 warnings or anything, so it should pass.

@PureWeen PureWeen merged commit 93b6fa6 into dotnet:main Apr 27, 2026
31 checks passed
@github-actions github-actions Bot added this to the .NET 10 SR7 milestone Apr 27, 2026
@github-actions github-actions Bot locked and limited conversation to collaborators May 28, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants