Skip to content

Add failing NativeAOT custom configuration device test - #12451

Open
jonathanpeppers wants to merge 1 commit into
mainfrom
jonathanpeppers-test-appstore-nativeaot
Open

Add failing NativeAOT custom configuration device test#12451
jonathanpeppers wants to merge 1 commit into
mainfrom
jonathanpeppers-test-appstore-nativeaot

Conversation

@jonathanpeppers

Copy link
Copy Markdown
Member

Adds a parameterized MSBuildDeviceIntegration regression test for NativeAOT apps using an AppStore configuration configured like Release.

The test covers both dotnet build -c AppStore and dotnet publish -c AppStore, then installs the produced APK and verifies that the activity launches.

This PR is expected to fail until the product issue is fixed. Both cases currently fail while resolving NativeAOT runtime-pack libraries derived from the custom configuration name; the existing Release NativeAOT control test passes and launches on the same device.

Fixes: #10851

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

Copilot-Session: e48442c2-2acb-4228-9eec-4b7930738a0f
Copilot AI lite review requested due to automatic review settings August 19, 2026 17:59

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 new MSBuildDeviceIntegration device regression test intended to cover NativeAOT builds/publishes using a custom “release-like” configuration name (AppStore) and validate the produced APK can be installed and launched on-device, matching the scenario from #10851.

Changes:

  • Adds NativeAOTCustomReleaseConfiguration device test parameterized over dotnet build vs dotnet publish.
  • Uses a custom release configuration name (AppStore) while setting Release-like MSBuild properties (Optimize=true, DebugType=None).
  • Installs the produced signed APK via adb and asserts the activity launches.
Suppressed comments (1)

tests/MSBuildDeviceIntegration/Tests/InstallAndRunTests.cs:2786

  • adb install output commonly includes additional lines (e.g., "Performing Streamed Install") before "Success". Using Assert.AreEqual("Success", ...) can make the test fail even when install succeeded; assert that the output contains "Success" instead.
			Assert.AreEqual ("Success", RunAdbCommand ($"install -r \"{apk}\"").Trim (), "APK should install.");

Comment on lines +2757 to +2759
[Test]
public void NativeAOTCustomReleaseConfiguration ([Values] bool publish)
{
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.

[NativeAOT] Build fails when configuration is not 'Release' or Debug

2 participants