diff --git a/build-tools/automation/azure-pipelines.yaml b/build-tools/automation/azure-pipelines.yaml index 5730e4c8572..5f0f403d5ce 100644 --- a/build-tools/automation/azure-pipelines.yaml +++ b/build-tools/automation/azure-pipelines.yaml @@ -697,10 +697,6 @@ stages: - template: yaml-templates/apk-instrumentation.yaml parameters: - # TODO: disable LLVM test, see: - # https://github.com/dotnet/runtime/issues/68914 - # https://github.com/dotnet/runtime/issues/73304 - condition: false configuration: $(XA.Build.Configuration) testName: Mono.Android.NET_Tests-AotLlvm project: tests/Mono.Android-Tests/Runtime-Microsoft.Android.Sdk/Mono.Android.NET-Tests.csproj diff --git a/src/Xamarin.Android.Build.Tasks/Microsoft.Android.Sdk/targets/Microsoft.Android.Sdk.Aot.targets b/src/Xamarin.Android.Build.Tasks/Microsoft.Android.Sdk/targets/Microsoft.Android.Sdk.Aot.targets index cac685b8837..b1aeef2e4b8 100644 --- a/src/Xamarin.Android.Build.Tasks/Microsoft.Android.Sdk/targets/Microsoft.Android.Sdk.Aot.targets +++ b/src/Xamarin.Android.Build.Tasks/Microsoft.Android.Sdk/targets/Microsoft.Android.Sdk.Aot.targets @@ -61,7 +61,7 @@ They run in a context of an inner build with a single $(RuntimeIdentifier). GetAotConfigs (NdkTools ndk) foreach (var abi in SupportedAbis) { (string aotCompiler, string outdir, string mtriple, AndroidTargetArch arch) = GetAbiSettings (abi); - if (EnableLLVM && !ndk.ValidateNdkPlatform (LogMessage, LogCodedError, arch, enableLLVM:EnableLLVM)) { + if (UseAndroidNdk && !ndk.ValidateNdkPlatform (LogMessage, LogCodedError, arch, enableLLVM:EnableLLVM)) { yield return Config.Invalid; yield break; } diff --git a/src/Xamarin.Android.Build.Tasks/Tasks/GetAotArguments.cs b/src/Xamarin.Android.Build.Tasks/Tasks/GetAotArguments.cs index aea3dffaa9f..29850857e0c 100644 --- a/src/Xamarin.Android.Build.Tasks/Tasks/GetAotArguments.cs +++ b/src/Xamarin.Android.Build.Tasks/Tasks/GetAotArguments.cs @@ -75,6 +75,7 @@ public abstract class GetAotArguments : AndroidAsyncTask protected AotMode AotMode; protected SequencePointsMode SequencePointsMode; protected string SdkBinDirectory = ""; + protected bool UseAndroidNdk => !string.IsNullOrWhiteSpace (AndroidNdkDirectory); public static bool GetAndroidAotMode(string androidAotMode, out AotMode aotMode) { @@ -125,7 +126,7 @@ public static bool TryGetSequencePointsMode (string value, out SequencePointsMod protected string GetToolPrefix (NdkTools ndk, AndroidTargetArch arch, out int level) { level = 0; - return EnableLLVM + return UseAndroidNdk ? ndk.GetNdkToolPrefixForAOT (arch, level = GetNdkApiLevel (ndk, arch)) : Path.Combine (AndroidBinUtilsDirectory, $"{ndk.GetArchDirName (arch)}-"); } @@ -230,7 +231,7 @@ protected void GetAotOptions (NdkTools ndk, AndroidTargetArch arch, int level, s MsymPath = outdir; string ldName; - if (EnableLLVM) { + if (UseAndroidNdk) { ldName = ndk.GetToolPath (NdkToolKind.Linker, arch, level); if (!string.IsNullOrEmpty (ldName)) { ldName = Path.GetFileName (ldName); @@ -250,11 +251,11 @@ protected void GetAotOptions (NdkTools ndk, AndroidTargetArch arch, int level, s } } - string GetLdFlags(NdkTools ndk, AndroidTargetArch arch, int level, string toolPrefix) + string GetLdFlags (NdkTools ndk, AndroidTargetArch arch, int level, string toolPrefix) { var toolchainPath = toolPrefix.Substring (0, toolPrefix.LastIndexOf (Path.DirectorySeparatorChar)); var ldFlags = new StringBuilder (); - if (EnableLLVM) { + if (UseAndroidNdk && EnableLLVM) { string androidLibPath = string.Empty; try { androidLibPath = ndk.GetDirectoryPath (NdkToolchainDir.PlatformLib, arch, level); @@ -306,7 +307,9 @@ string GetLdFlags(NdkTools ndk, AndroidTargetArch arch, int level, string toolPr // Without the flag, `lld` will modify AOT-generated code in a way that the Mono runtime doesn't support. Until // the runtime issue is fixed, we need to pass this flag then. // - ldFlags.Append ("--no-relax"); + if (!UseAndroidNdk) { + ldFlags.Append ("--no-relax"); + } } if (StripLibraries) { diff --git a/src/Xamarin.Android.Build.Tasks/Tasks/GetAotAssemblies.cs b/src/Xamarin.Android.Build.Tasks/Tasks/GetAotAssemblies.cs index d9c98fa208a..0a28426e98c 100644 --- a/src/Xamarin.Android.Build.Tasks/Tasks/GetAotAssemblies.cs +++ b/src/Xamarin.Android.Build.Tasks/Tasks/GetAotAssemblies.cs @@ -15,7 +15,7 @@ public class GetAotAssemblies : GetAotArguments public override Task RunTaskAsync () { - NdkTools ndk = NdkTools.Create (AndroidNdkDirectory, logErrors: EnableLLVM, log: Log); + NdkTools ndk = NdkTools.Create (AndroidNdkDirectory, logErrors: UseAndroidNdk, log: Log); if (Log.HasLoggedErrors) { return Task.CompletedTask; // NdkTools.Create will log appropriate error } diff --git a/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/AotTests.cs b/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/AotTests.cs index bf2b00b166e..f9641bff999 100644 --- a/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/AotTests.cs +++ b/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/AotTests.cs @@ -111,74 +111,43 @@ public void BuildBasicApplicationReleaseProfiledAotWithoutDefaultProfile () } static object [] AotChecks () => new object [] { - new object[] { - /* supportedAbis */ "armeabi-v7a", - /* enableLLVM */ false, - /* expectedResult */ true, - /* usesAssemblyBlobs */ false, - }, - new object[] { - /* supportedAbis */ "armeabi-v7a", - /* enableLLVM */ false, - /* expectedResult */ true, - /* usesAssemblyBlobs */ true, - }, - new object[] { - /* supportedAbis */ "armeabi-v7a", - /* enableLLVM */ true, - /* expectedResult */ true, - /* usesAssemblyBlobs */ false, - }, - new object[] { - /* supportedAbis */ "arm64-v8a", - /* enableLLVM */ false, - /* expectedResult */ true, - /* usesAssemblyBlobs */ false, - }, new object[] { /* supportedAbis */ "arm64-v8a", - /* enableLLVM */ true, - /* expectedResult */ true, - /* usesAssemblyBlobs */ false, - }, - new object[] { - /* supportedAbis */ "x86", /* enableLLVM */ false, - /* expectedResult */ true, /* usesAssemblyBlobs */ false, }, new object[] { - /* supportedAbis */ "x86", + /* supportedAbis */ "armeabi-v7a;x86", /* enableLLVM */ true, - /* expectedResult */ true, - /* usesAssemblyBlobs */ false, + /* usesAssemblyBlobs */ true, }, new object[] { - /* supportedAbis */ "x86_64", + /* supportedAbis */ "armeabi-v7a;arm64-v8a;x86;x86_64", /* enableLLVM */ false, - /* expectedResult */ true, - /* usesAssemblyBlobs */ false, + /* usesAssemblyBlobs */ true, }, new object[] { - /* supportedAbis */ "x86_64", + /* supportedAbis */ "armeabi-v7a;arm64-v8a;x86;x86_64", /* enableLLVM */ true, - /* expectedResult */ true, /* usesAssemblyBlobs */ false, }, }; [Test] [TestCaseSource (nameof (AotChecks))] - public void BuildAotApplicationAndÜmläüts (string supportedAbis, bool enableLLVM, bool expectedResult, bool usesAssemblyBlobs) + public void BuildAotApplicationWithNdkAndBundleAndÜmläüts (string supportedAbis, bool enableLLVM, bool usesAssemblyBlobs) { - var path = Path.Combine ("temp", string.Format ("BuildAotApplication AndÜmläüts_{0}_{1}_{2}_{3}", supportedAbis, enableLLVM, expectedResult, usesAssemblyBlobs)); + var abisSanitized = supportedAbis.Replace (";", "").Replace ("-", "").Replace ("_", ""); + var path = Path.Combine ("temp", string.Format ("BuildAotNdk AndÜmläüts_{0}_{1}_{2}", abisSanitized, enableLLVM, usesAssemblyBlobs)); var proj = new XamarinAndroidApplicationProject () { IsRelease = true, - BundleAssemblies = false, AotAssemblies = true, PackageName = "com.xamarin.buildaotappwithspecialchars", }; - proj.SetProperty (KnownProperties.TargetFrameworkVersion, "v5.1"); + if (!Builder.UseDotNet) { + proj.BundleAssemblies = true; + } + proj.SetProperty ("AndroidNdkDirectory", AndroidNdkPath); proj.SetAndroidSupportedAbis (supportedAbis); proj.SetProperty ("EnableLLVM", enableLLVM.ToString ()); proj.SetProperty ("AndroidUseAssemblyStore", usesAssemblyBlobs.ToString ()); @@ -193,12 +162,8 @@ public void BuildAotApplicationAndÜmläüts (string supportedAbis, bool enableL "; } using (var b = CreateApkBuilder (path)) { - if (!b.GetSupportedRuntimes ().Any (x => supportedAbis == x.Abi)) - Assert.Ignore ($"Runtime for {supportedAbis} was not available."); b.ThrowOnBuildFailure = false; - Assert.AreEqual (expectedResult, b.Build (proj), "Build should have {0}.", expectedResult ? "succeeded" : "failed"); - if (!expectedResult) - return; + Assert.IsTrue (b.Build (proj), "Build should have succeeded."); //NOTE: Windows has shortened paths such as: C:\Users\myuser\ANDROI~3\ndk\PLATFO~1\AN3971~1\arch-x86\usr\lib\libc.so if (checkMinLlvmPath && !IsWindows && !Builder.UseDotNet) { Xamarin.Android.Tasks.NdkTools ndk = Xamarin.Android.Tasks.NdkTools.Create (AndroidNdkPath); @@ -216,8 +181,11 @@ public void BuildAotApplicationAndÜmläüts (string supportedAbis, bool enableL } foreach (var abi in supportedAbis.Split (new char [] { ';' })) { var intermediate = Path.Combine (Root, b.ProjectDirectory, proj.IntermediateOutputPath); - var libapp = Path.Combine (intermediate, "bundles", abi, "libmonodroid_bundle_app.so"); - FileAssert.DoesNotExist (libapp); + if (!Builder.UseDotNet) { + var libapp = Path.Combine (Root, b.ProjectDirectory, proj.IntermediateOutputPath, + "bundles", abi, "libmonodroid_bundle_app.so"); + Assert.IsTrue (File.Exists (libapp), abi + " libmonodroid_bundle_app.so does not exist"); + } var aotNativeLibrary = Builder.UseDotNet ? Path.Combine (intermediate, AbiUtils.AbiToRuntimeIdentifier (abi), "aot", "UnnamedProject.dll.so") : Path.Combine (intermediate, "aot", abi, "libaot-UnnamedProject.dll.so"); @@ -226,14 +194,19 @@ public void BuildAotApplicationAndÜmläüts (string supportedAbis, bool enableL proj.OutputPath, $"{proj.PackageName}-Signed.apk"); var helper = new ArchiveAssemblyHelper (apk, usesAssemblyBlobs); - Assert.IsTrue (helper.Exists ("assemblies/UnnamedProject.dll"), $"UnnamedProject.dll should be in the {proj.PackageName}-Signed.apk"); + if (!Builder.UseDotNet) { + // BundleAssemblies=true + Assert.IsFalse (helper.Exists ("assemblies/UnnamedProject.dll"), $"UnnamedProject.dll should not be in the {proj.PackageName}-Signed.apk"); + } else { + Assert.IsTrue (helper.Exists ("assemblies/UnnamedProject.dll"), $"UnnamedProject.dll should be in the {proj.PackageName}-Signed.apk"); + } using (var zipFile = ZipHelper.OpenZip (apk)) { Assert.IsNotNull (ZipHelper.ReadFileFromZip (zipFile, string.Format ("lib/{0}/libaot-UnnamedProject.dll.so", abi)), $"lib/{0}/libaot-UnnamedProject.dll.so should be in the {proj.PackageName}-Signed.apk", abi); } } - Assert.AreEqual (expectedResult, b.Build (proj), "Second Build should have {0}.", expectedResult ? "succeeded" : "failed"); + Assert.IsTrue (b.Build (proj), "Second Build should have succeeded."); Assert.IsTrue ( b.Output.IsTargetSkipped ("_CompileJava"), "the _CompileJava target should be skipped"); @@ -245,46 +218,39 @@ public void BuildAotApplicationAndÜmläüts (string supportedAbis, bool enableL [Test] [TestCaseSource (nameof (AotChecks))] - [Category ("Minor"), Category ("MkBundle")] - public void BuildAotApplicationAndBundleAndÜmläüts (string supportedAbis, bool enableLLVM, bool expectedResult, bool usesAssemblyBlobs) + public void BuildAotApplicationAndÜmläüts (string supportedAbis, bool enableLLVM, bool usesAssemblyBlobs) { - var path = Path.Combine ("temp", string.Format ("BuildAotApplicationAndBundle AndÜmläüts_{0}_{1}_{2}_{3}", supportedAbis, enableLLVM, expectedResult, usesAssemblyBlobs)); + var abisSanitized = supportedAbis.Replace (";", "").Replace ("-", "").Replace ("_", ""); + var path = Path.Combine ("temp", string.Format ("BuildAot AndÜmläüts_{0}_{1}_{2}", abisSanitized, enableLLVM, usesAssemblyBlobs)); var proj = new XamarinAndroidApplicationProject () { IsRelease = true, - BundleAssemblies = true, AotAssemblies = true, PackageName = "com.xamarin.buildaotappandbundlewithspecialchars", }; - proj.SetProperty ("AndroidNdkDirectory", AndroidNdkPath); - proj.SetProperty (KnownProperties.TargetFrameworkVersion, "v5.1"); proj.SetAndroidSupportedAbis (supportedAbis); proj.SetProperty ("EnableLLVM", enableLLVM.ToString ()); proj.SetProperty ("AndroidUseAssemblyStore", usesAssemblyBlobs.ToString ()); using (var b = CreateApkBuilder (path)) { - if (!b.GetSupportedRuntimes ().Any (x => supportedAbis == x.Abi)) - Assert.Ignore ($"Runtime for {supportedAbis} was not available."); b.ThrowOnBuildFailure = false; - Assert.AreEqual (expectedResult, b.Build (proj), "Build should have {0}.", expectedResult ? "succeeded" : "failed"); - if (!expectedResult) - return; + Assert.IsTrue (b.Build (proj), "Build should have succeeded."); foreach (var abi in supportedAbis.Split (new char [] { ';' })) { - var libapp = Path.Combine (Root, b.ProjectDirectory, proj.IntermediateOutputPath, - "bundles", abi, "libmonodroid_bundle_app.so"); - Assert.IsTrue (File.Exists (libapp), abi + " libmonodroid_bundle_app.so does not exist"); - var assemblies = Path.Combine (Root, b.ProjectDirectory, proj.IntermediateOutputPath, - "aot", abi, "libaot-UnnamedProject.dll.so"); - Assert.IsTrue (File.Exists (assemblies), "{0} libaot-UnnamedProject.dll.so does not exist", abi); + var intermediate = Path.Combine (Root, b.ProjectDirectory, proj.IntermediateOutputPath); + var aotNativeLibrary = Builder.UseDotNet ? + Path.Combine (intermediate, AbiUtils.AbiToRuntimeIdentifier (abi), "aot", "UnnamedProject.dll.so") : + Path.Combine (intermediate, "aot", abi, "libaot-UnnamedProject.dll.so"); + FileAssert.Exists (aotNativeLibrary); var apk = Path.Combine (Root, b.ProjectDirectory, proj.OutputPath, $"{proj.PackageName}-Signed.apk"); + var helper = new ArchiveAssemblyHelper (apk, usesAssemblyBlobs); - Assert.IsFalse (helper.Exists ("assemblies/UnnamedProject.dll"), $"UnnamedProject.dll should not be in the {proj.PackageName}-Signed.apk"); + Assert.IsTrue (helper.Exists ("assemblies/UnnamedProject.dll"), $"UnnamedProject.dll should be in the {proj.PackageName}-Signed.apk"); using (var zipFile = ZipHelper.OpenZip (apk)) { Assert.IsNotNull (ZipHelper.ReadFileFromZip (zipFile, string.Format ("lib/{0}/libaot-UnnamedProject.dll.so", abi)), $"lib/{0}/libaot-UnnamedProject.dll.so should be in the {proj.PackageName}-Signed.apk", abi); } } - Assert.AreEqual (expectedResult, b.Build (proj), "Second Build should have {0}.", expectedResult ? "succeeded" : "failed"); + Assert.IsTrue (b.Build (proj), "Second Build should have succeeded."); Assert.IsTrue ( b.Output.IsTargetSkipped ("_CompileJava"), "the _CompileJava target should be skipped"); @@ -441,7 +407,6 @@ public static void Foo () { } [Test] - [Ignore ("Ignore while investigating/fixing.")] [Category ("LLVM")] public void NoSymbolsArgShouldReduceAppSize ([Values ("", "Hybrid")] string androidAotMode, [Values (false, true)] bool skipDebugSymbols) { diff --git a/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/Tasks/MakeBundleNativeCodeExternalTests.cs b/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/Tasks/MakeBundleNativeCodeExternalTests.cs index abf5cfcc1f8..67cd3c88145 100644 --- a/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/Tasks/MakeBundleNativeCodeExternalTests.cs +++ b/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/Tasks/MakeBundleNativeCodeExternalTests.cs @@ -62,9 +62,13 @@ public void XA5104AndroidNdkNotFound (string androidNdkDirectory) IntermediateAssemblyDir = path }; - Assert.IsFalse (task2.Execute (), "Task should fail!"); - BuildErrorEventArgs error2 = errors [1]; - Assert.AreEqual (error1.Message, error2.Message, "Aot and MakeBundleNativeCodeExternal should produce the same error messages."); + if (androidNdkDirectory == "DoesNotExist") { + Assert.IsFalse (task2.Execute (), "Task should fail!"); + BuildErrorEventArgs error2 = errors [1]; + Assert.AreEqual (error1.Message, error2.Message, "Aot and MakeBundleNativeCodeExternal should produce the same error messages."); + } else { + Assert.IsTrue (task2.Execute (), "Aot task should succeed with null or empty NDK!"); + } } } } diff --git a/src/Xamarin.Android.Build.Tasks/Xamarin.Android.Legacy.targets b/src/Xamarin.Android.Build.Tasks/Xamarin.Android.Legacy.targets index 5448a442828..e7a6d33e6b2 100644 --- a/src/Xamarin.Android.Build.Tasks/Xamarin.Android.Legacy.targets +++ b/src/Xamarin.Android.Build.Tasks/Xamarin.Android.Legacy.targets @@ -693,7 +693,7 @@ projects. .NET 5 projects will not import this file. - diff --git a/tests/MSBuildDeviceIntegration/Tests/InstallAndRunTests.cs b/tests/MSBuildDeviceIntegration/Tests/InstallAndRunTests.cs index c6680b2b081..d00dc301db8 100644 --- a/tests/MSBuildDeviceIntegration/Tests/InstallAndRunTests.cs +++ b/tests/MSBuildDeviceIntegration/Tests/InstallAndRunTests.cs @@ -660,6 +660,34 @@ public void RunWithInterpreterEnabled ([Values (false, true)] bool isRelease) Assert.IsTrue (didStart, "Activity should have started."); } + [Test] + public void RunWithLLVMEnabled () + { + AssertHasDevices (); + + var proj = new XamarinAndroidApplicationProject () { + IsRelease = true, + }; + proj.SetAndroidSupportedAbis ("armeabi-v7a", "x86", "x86_64"); + proj.SetProperty ("EnableLLVM", true.ToString ()); + if (!Builder.UseDotNet) { + proj.AotAssemblies = true; + } + + builder = CreateApkBuilder (); + Assert.IsTrue (builder.Install (proj), "Install should have succeeded."); + + if (Builder.UseDotNet) + Assert.True (builder.RunTarget (proj, "Run"), "Project should have run."); + else if (CommercialBuildAvailable) + Assert.True (builder.RunTarget (proj, "_Run"), "Project should have run."); + else + AdbStartActivity ($"{proj.PackageName}/{proj.JavaPackageName}.MainActivity"); + + Assert.IsTrue (WaitForActivityToStart (proj.PackageName, "MainActivity", + Path.Combine (Root, builder.ProjectDirectory, "startup-logcat.log"))); + } + [Test] public void SingleProject_ApplicationId () { diff --git a/tests/Mono.Android-Tests/Mono.Android-Tests.csproj b/tests/Mono.Android-Tests/Mono.Android-Tests.csproj index ecb42c0de24..1d4a287f573 100644 --- a/tests/Mono.Android-Tests/Mono.Android-Tests.csproj +++ b/tests/Mono.Android-Tests/Mono.Android-Tests.csproj @@ -34,6 +34,7 @@ $(AndroidLatestStableFrameworkVersion) + true diff --git a/tests/Mono.Android-Tests/Runtime-AppBundle/Mono.Android-TestsAppBundle.csproj b/tests/Mono.Android-Tests/Runtime-AppBundle/Mono.Android-TestsAppBundle.csproj index b839e5a34f1..31c82cf592d 100644 --- a/tests/Mono.Android-Tests/Runtime-AppBundle/Mono.Android-TestsAppBundle.csproj +++ b/tests/Mono.Android-Tests/Runtime-AppBundle/Mono.Android-TestsAppBundle.csproj @@ -29,6 +29,7 @@ $(AndroidFrameworkVersion) + true diff --git a/tests/Mono.Android-Tests/Runtime-Microsoft.Android.Sdk/Mono.Android.NET-Tests.csproj b/tests/Mono.Android-Tests/Runtime-Microsoft.Android.Sdk/Mono.Android.NET-Tests.csproj index d956ffc8f54..4543d58f976 100644 --- a/tests/Mono.Android-Tests/Runtime-Microsoft.Android.Sdk/Mono.Android.NET-Tests.csproj +++ b/tests/Mono.Android-Tests/Runtime-Microsoft.Android.Sdk/Mono.Android.NET-Tests.csproj @@ -20,13 +20,15 @@ -$(TestsFlavor)NET6 IL2037 true + DotNetIgnore - $(ExcludeCategories):InetAccess - $(ExcludeCategories):IgnoreInterpreter + $(ExcludeCategories):InetAccess:NetworkInterfaces diff --git a/tests/Mono.Android-Tests/Runtime-MultiDex/Mono.Android-TestsMultiDex.csproj b/tests/Mono.Android-Tests/Runtime-MultiDex/Mono.Android-TestsMultiDex.csproj index 1c7a1e4e247..848607e2899 100644 --- a/tests/Mono.Android-Tests/Runtime-MultiDex/Mono.Android-TestsMultiDex.csproj +++ b/tests/Mono.Android-Tests/Runtime-MultiDex/Mono.Android-TestsMultiDex.csproj @@ -29,6 +29,7 @@ $(AndroidFrameworkVersion) + true diff --git a/tests/Mono.Android-Tests/Xamarin.Android.Net/AndroidMessageHandlerNegotiateAuthenticationTests.cs b/tests/Mono.Android-Tests/Xamarin.Android.Net/AndroidMessageHandlerNegotiateAuthenticationTests.cs index e231aa8445a..f767c456cb9 100644 --- a/tests/Mono.Android-Tests/Xamarin.Android.Net/AndroidMessageHandlerNegotiateAuthenticationTests.cs +++ b/tests/Mono.Android-Tests/Xamarin.Android.Net/AndroidMessageHandlerNegotiateAuthenticationTests.cs @@ -13,6 +13,7 @@ namespace Xamarin.Android.NetTests { // Important: We expect the Negotiate authentication feature to be enabled in all of these tests because we set $(AndroidUseNegotiateAuthentication)=true // in the Mono.Android.NET-Tests.csproj file. [TestFixture] + [Category ("InetAccess")] public sealed class AndroidMessageHandlerNegotiateAuthenticationTests { // Negotiate authentication is available for Android since .NET 7 diff --git a/tests/Xamarin.Forms-Performance-Integration/Droid/Xamarin.Forms.Performance.Integration.Droid.csproj b/tests/Xamarin.Forms-Performance-Integration/Droid/Xamarin.Forms.Performance.Integration.Droid.csproj index c5676c56e1b..18505d4c067 100644 --- a/tests/Xamarin.Forms-Performance-Integration/Droid/Xamarin.Forms.Performance.Integration.Droid.csproj +++ b/tests/Xamarin.Forms-Performance-Integration/Droid/Xamarin.Forms.Performance.Integration.Droid.csproj @@ -29,6 +29,7 @@ $(AndroidFrameworkVersion) + true diff --git a/tools/xabuild/XABuild.cs b/tools/xabuild/XABuild.cs index 8023b0ab2b0..8e00cc94b3b 100644 --- a/tools/xabuild/XABuild.cs +++ b/tools/xabuild/XABuild.cs @@ -135,8 +135,6 @@ static void CreateConfig (XABuildPaths paths) SetProperty (toolsets, "TargetFrameworkRootPath", paths.FrameworksDirectory + Path.DirectorySeparatorChar); //NOTE: Must include trailing \ if (!string.IsNullOrEmpty (paths.AndroidSdkDirectory)) SetProperty (toolsets, "AndroidSdkDirectory", paths.AndroidSdkDirectory); - if (!string.IsNullOrEmpty (paths.AndroidNdkDirectory)) - SetProperty (toolsets, "AndroidNdkDirectory", paths.AndroidNdkDirectory); var projectImportSearchPaths = toolsets.SelectSingleNode ("projectImportSearchPaths"); var searchPaths = projectImportSearchPaths.SelectSingleNode ($"searchPaths[@os='{paths.SearchPathsOS}']") as XmlElement;