diff --git a/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/BuildTest.OSS.cs b/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/BuildTest.OSS.cs index 07bbb755b13..4e0567b9acf 100644 --- a/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/BuildTest.OSS.cs +++ b/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/BuildTest.OSS.cs @@ -13,6 +13,16 @@ public partial class BuildTest : BaseTest { #pragma warning disable 414 static object [] AotChecks = new object [] { + new object[] { + /* supportedAbis */ "armeabi", + /* enableLLVM */ false, + /* expectedResult */ true, + }, + new object[] { + /* supportedAbis */ "armeabi", + /* enableLLVM */ true, + /* expectedResult */ true, + }, new object[] { /* supportedAbis */ "armeabi-v7a", /* enableLLVM */ false, @@ -23,6 +33,16 @@ public partial class BuildTest : BaseTest /* enableLLVM */ true, /* expectedResult */ true, }, + new object[] { + /* supportedAbis */ "arm64-v8a", + /* enableLLVM */ false, + /* expectedResult */ true, + }, + new object[] { + /* supportedAbis */ "arm64-v8a", + /* enableLLVM */ true, + /* expectedResult */ true, + }, new object[] { /* supportedAbis */ "x86", /* enableLLVM */ false, @@ -33,6 +53,16 @@ public partial class BuildTest : BaseTest /* enableLLVM */ true, /* expectedResult */ true, }, + new object[] { + /* supportedAbis */ "x86_64", + /* enableLLVM */ false, + /* expectedResult */ true, + }, + new object[] { + /* supportedAbis */ "x86_64", + /* enableLLVM */ true, + /* expectedResult */ true, + }, }; static object [] ProguardChecks = new object [] { diff --git a/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/BuildTest.cs b/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/BuildTest.cs index 77b3499a74e..cab2ebc331e 100644 --- a/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/BuildTest.cs +++ b/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/BuildTest.cs @@ -222,7 +222,9 @@ public void BuildAotApplication (string supportedAbis, bool enableLLVM, bool exp } using (var b = CreateApkBuilder (path)) { if (!b.CrossCompilerAvailable (supportedAbis)) - Assert.Ignore ("Cross compiler was not available"); + Assert.Ignore ($"Cross compiler for {supportedAbis} was not available"); + if (!b.GetSupportedRuntimes ().Any (x => supportedAbis == x.Abi)) + Assert.Ignore ($"Runtime for {supportedAbis} was not available."); b.ThrowOnBuildFailure = false; b.Verbosity = LoggerVerbosity.Diagnostic; Assert.AreEqual (expectedResult, b.Build (proj), "Build should have {0}.", expectedResult ? "succeeded" : "failed"); @@ -281,6 +283,8 @@ public void BuildAotApplicationAndBundle (string supportedAbis, bool enableLLVM, using (var b = CreateApkBuilder (path)) { if (!b.CrossCompilerAvailable (supportedAbis)) Assert.Ignore ("Cross compiler was not available"); + 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) diff --git a/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/ManifestTest.OSS.cs b/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/ManifestTest.OSS.cs new file mode 100644 index 00000000000..6e889582ef3 --- /dev/null +++ b/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/ManifestTest.OSS.cs @@ -0,0 +1,29 @@ +using System; +using System.Linq; +using NUnit.Framework; +using Xamarin.ProjectTools; +using System.IO; +using System.Xml; +using System.Xml.Linq; +using System.Xml.XPath; +using Xamarin.Tools.Zip; + +namespace Xamarin.Android.Build.Tests +{ + public partial class ManifestTest : BaseTest + { + static object [] DebuggerAttributeCases = new object [] { + // DebugType, isRelease, extpected + new object[] { "", true, false, }, + new object[] { "", false, true, }, + new object[] { "None", true, false, }, + new object[] { "None", false, false, }, + new object[] { "PdbOnly", true, false, }, + new object[] { "PdbOnly", false, true, }, + new object[] { "Full", true, false, }, + new object[] { "Full", false, true, }, + new object[] { "Portable", true, false, }, + new object[] { "Portable", false, true, }, + }; + } +} diff --git a/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/ManifestTest.cs b/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/ManifestTest.cs index 30fcc1ca399..ceebaee3164 100644 --- a/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/ManifestTest.cs +++ b/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/ManifestTest.cs @@ -10,7 +10,7 @@ namespace Xamarin.Android.Build.Tests { - public class ManifestTest : BaseTest + public partial class ManifestTest : BaseTest { readonly string TargetSdkManifest = @" @@ -436,20 +436,6 @@ public void ManifestPlaceHolders2 () } } - static object[] DebuggerAttributeCases = new object[] { - // DebugType, isRelease, extpected - new object[] { "", true, false, }, - new object[] { "", false, true, }, - new object[] { "None", true, false, }, - new object[] { "None", false, false, }, - new object[] { "PdbOnly", true, false, }, - new object[] { "PdbOnly", false, true, }, - new object[] { "Full", true, false, }, - new object[] { "Full", false, true, }, - new object[] { "Portable", true, false, }, - new object[] { "Portable", false, true, }, - }; - [Test] [TestCaseSource ("DebuggerAttributeCases")] public void DebuggerAttribute (string debugType, bool isRelease, bool expected) diff --git a/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/Xamarin.Android.Build.Tests.csproj b/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/Xamarin.Android.Build.Tests.csproj index 71ac3703bf7..dd125f52e0b 100644 --- a/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/Xamarin.Android.Build.Tests.csproj +++ b/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/Xamarin.Android.Build.Tests.csproj @@ -58,5 +58,6 @@ + diff --git a/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.ProjectTools/Common/ProjectBuilder.cs b/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.ProjectTools/Common/ProjectBuilder.cs index 20cd257f7d5..9566758d051 100644 --- a/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.ProjectTools/Common/ProjectBuilder.cs +++ b/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.ProjectTools/Common/ProjectBuilder.cs @@ -121,7 +121,7 @@ public RuntimeInfo [] GetSupportedRuntimes () var runtimeInfo = new List (); var outdir = FrameworkLibDirectory; var path = Path.Combine (outdir, IsUnix ? Path.Combine ("xbuild", "Xamarin", "Android", "lib") : ""); - foreach (var file in Directory.EnumerateFiles (path, "libmono-android.*.*.so", SearchOption.AllDirectories)) { + foreach (var file in Directory.EnumerateFiles (path, "libmono-android.*.so", SearchOption.AllDirectories)) { string fullFilePath = Path.GetFullPath (file); DirectoryInfo parentDir = Directory.GetParent (fullFilePath); if (parentDir == null) diff --git a/src/Xamarin.Android.Build.Tasks/Xamarin.Android.Common.targets b/src/Xamarin.Android.Build.Tasks/Xamarin.Android.Common.targets index f0bdd856c47..0aa206f5571 100755 --- a/src/Xamarin.Android.Build.Tasks/Xamarin.Android.Common.targets +++ b/src/Xamarin.Android.Build.Tasks/Xamarin.Android.Common.targets @@ -177,7 +177,8 @@ Copyright (C) 2011-2012 Xamarin. All rights reserved. MonoAndroid v$(_XAMajorVersionNumber).0 True - True + False + True False False False