Skip to content

Commit

Permalink
[tests] add test for $(AdbTargetArchitecture)
Browse files Browse the repository at this point in the history
Context: #8662
Context: xamarin/monodroid#1537

* Bump to xamarin/monodroid@6ba6f3b6

Changes: xamarin/monodroid@ae47ded...6ba6f3b

* [tools/msbuild] implement $(AdbTargetArchitecture) for IDEs
  • Loading branch information
jonathanpeppers committed Sep 5, 2024
1 parent ac8a922 commit 0440a84
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .external
Original file line number Diff line number Diff line change
@@ -1 +1 @@
xamarin/monodroid:main@ae47dedcdb9d7cd83c18630b3941ecb4b9441d7c
xamarin/monodroid:main@6ba6f3b6be8b679b7ea21e8c2fed452b43ef20e0
16 changes: 16 additions & 0 deletions tests/MSBuildDeviceIntegration/Tests/InstallTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -626,6 +626,22 @@ public void AdbTargetChangesAppBundle ()
Assert.AreNotEqual (before, after, $"{apkset} should change!");
}

[Test]
public void AdbTargetArchitecture ()
{
AssertCommercialBuild ();
AssertHasDevices ();

const string abi = "x86_64";
var proj = new XamarinAndroidApplicationProject ();

using var b = CreateApkBuilder ();
b.Verbosity = LoggerVerbosity.Diagnostic;
Assert.IsTrue (b.Install (proj, parameters: [ $"AdbTargetArchitecture={abi}" ]), "install should have succeeded.");
Assert.IsTrue (StringAssertEx.ContainsText (b.LastBuildOutput, $"Using $(AdbTargetArchitecture): {abi}"),
$"`_GetPrimaryCpuAbi` should be skipped for $(AdbTargetArchitecture)!");
}

[Test]
public void AppWithAndroidJavaSource ()
{
Expand Down

0 comments on commit 0440a84

Please sign in to comment.