Skip to content

Commit

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

* Bump to xamarin/monodroid@352bcbe8

Changes: xamarin/monodroid@1a9ee37...352bcbe

* [tools/msbuild] implement $(AdbTargetArchitecture) for IDEs

* Bump to c158adfd6f
  • Loading branch information
jonathanpeppers authored Sep 23, 2024
1 parent 8a6a033 commit 45bb7f3
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,2 +1,2 @@
xamarin/monodroid:release/8.0.4xx@1a9ee3733285238e0630f230c383cf3df1a6736d
xamarin/monodroid:release/8.0.4xx@352bcbe8cc06aeba358450f57846218ef274bf01
mono/mono:2020-02@6dd9def57ce969ca04a0ecd9ef72c0a8f069112d
16 changes: 16 additions & 0 deletions tests/MSBuildDeviceIntegration/Tests/InstallTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -633,6 +633,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 45bb7f3

Please sign in to comment.