Skip to content

Commit c9bb3bb

Browse files
Test fixes
1 parent ee15740 commit c9bb3bb

File tree

6 files changed

+9
-6
lines changed

6 files changed

+9
-6
lines changed

src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/AotTests.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,6 @@ public void BuildAotApplicationWithSpecialCharactersInProject (string testName,
127127
IsRelease = isRelease,
128128
AotAssemblies = aot,
129129
};
130-
proj.SetAndroidSupportedAbis ("armeabi-v7a", "arm64-v8a", "x86", "x86_64");
131130
using (var builder = CreateApkBuilder (Path.Combine (rootPath, proj.ProjectName))){
132131
Assert.IsTrue (builder.Build (proj), "Build should have succeeded.");
133132
}

tests/MSBuildDeviceIntegration/Tests/BundleToolTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public class BundleToolTests : DeviceTest
1919
new object[] { true },
2020
};
2121

22-
static readonly string [] Abis = new [] { "armeabi-v7a", "arm64-v8a", "x86", "x86_64" };
22+
static readonly string [] Abis = ["arm64-v8a", "x86_64"];
2323
XamarinAndroidLibraryProject lib;
2424
XamarinAndroidApplicationProject app;
2525
ProjectBuilder libBuilder, appBuilder;

tests/MSBuildDeviceIntegration/Tests/DebuggingTest.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -383,6 +383,8 @@ public Foo ()
383383
IsRelease = false,
384384
EmbedAssembliesIntoApk = embedAssemblies,
385385
};
386+
// MonoVM-only test
387+
app.SetRuntime (Android.Tasks.AndroidRuntime.MonoVM);
386388
if (!useLatestSdk) {
387389
lib.TargetFramework = "net9.0-android";
388390
app.TargetFramework = "net9.0-android";

tests/MSBuildDeviceIntegration/Tests/InstallAndRunTests.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,7 @@ public void JsonDeserializationCreatesJavaHandle ([Values (false, true)] bool is
386386
proj.SetProperty ("NoWarn", "SYSLIB0011");
387387

388388
if (isRelease || !TestEnvironment.CommercialBuildAvailable) {
389-
proj.SetAndroidSupportedAbis ("armeabi-v7a", "arm64-v8a", "x86", "x86_64");
389+
proj.SetAndroidSupportedAbis (DeviceAbi);
390390
}
391391

392392
proj.References.Add (new BuildItem.Reference ("System.Runtime.Serialization"));
@@ -553,8 +553,7 @@ public void SingleProject_ApplicationId ([Values (false, true)] bool testOnly)
553553
if (testOnly)
554554
proj.AndroidManifest = proj.AndroidManifest.Replace ("<application", "<application android:testOnly=\"true\"");
555555

556-
var abis = new string [] { "armeabi-v7a", "arm64-v8a", "x86", "x86_64" };
557-
proj.SetAndroidSupportedAbis (abis);
556+
proj.SetAndroidSupportedAbis (DeviceAbi);
558557
builder = CreateApkBuilder ();
559558
Assert.IsTrue (builder.Install (proj), "Install should have succeeded.");
560559
RunProjectAndAssert (proj, builder);

tests/MSBuildDeviceIntegration/Tests/InstallTests.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,8 @@ public void LoggingPropsShouldCreateOverrideDirForRelease ()
320320
var proj = new XamarinAndroidApplicationProject {
321321
IsRelease = true,
322322
};
323+
// MonoVM-only test
324+
proj.SetRuntime (Android.Tasks.AndroidRuntime.MonoVM);
323325
// Set debuggable=true to allow run-as command usage with a release build
324326
proj.AndroidManifest = proj.AndroidManifest.Replace ("<application ", "<application android:debuggable=\"true\" ");
325327
proj.SetAndroidSupportedAbis (DeviceAbi);
@@ -607,7 +609,6 @@ public void AdbTargetChangesAppBundle ()
607609
IsRelease = true
608610
};
609611
proj.SetProperty ("AndroidPackageFormat", "aab");
610-
proj.SetAndroidSupportedAbis ("armeabi-v7a", "arm64-v8a", "x86", "x86_64");
611612

612613
using var b = CreateApkBuilder ();
613614
Assert.IsTrue (b.Install (proj), "first build should have succeeded.");

tests/MSBuildDeviceIntegration/Tests/PerformanceTest.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,8 @@ XamarinAndroidApplicationProject CreateApplicationProject ()
135135
{
136136
var proj = new XamarinAndroidApplicationProject () {
137137
};
138+
// TODO: update times for CoreCLR in the future
139+
proj.SetRuntime (Android.Tasks.AndroidRuntime.MonoVM);
138140
proj.SetAndroidSupportedAbis (DeviceAbi); // Use a single ABI
139141
proj.SetProperty ("_FastDeploymentDiagnosticLogging", "False");
140142
return proj;

0 commit comments

Comments
 (0)