diff --git a/build-tools/automation/yaml-templates/stage-package-tests.yaml b/build-tools/automation/yaml-templates/stage-package-tests.yaml index d4fcdecd5ba..b858b9a2a94 100644 --- a/build-tools/automation/yaml-templates/stage-package-tests.yaml +++ b/build-tools/automation/yaml-templates/stage-package-tests.yaml @@ -198,6 +198,16 @@ stages: artifactSource: bin/Test$(XA.Build.Configuration)/$(DotNetTargetFramework)-android/Mono.Android.NET_Tests-Signed.aab artifactFolder: $(DotNetTargetFramework)-AotLlvm + - template: /build-tools/automation/yaml-templates/apk-instrumentation.yaml + parameters: + configuration: $(XA.Build.Configuration) + testName: Mono.Android.NET_Tests-CoreCLR + project: tests/Mono.Android-Tests/Mono.Android-Tests/Mono.Android.NET-Tests.csproj + testResultsFiles: TestResult-Mono.Android.NET_Tests-$(XA.Build.Configuration)CoreCLR.xml + extraBuildArgs: -p:TestsFlavor=CoreCLR -p:UseMonoRuntime=false -p:AndroidEnableMarshalMethods=false + artifactSource: bin/Test$(XA.Build.Configuration)/$(DotNetTargetFramework)-android/Mono.Android.NET_Tests-Signed.aab + artifactFolder: $(DotNetTargetFramework)-CoreCLR + - template: /build-tools/automation/yaml-templates/apk-instrumentation.yaml parameters: configuration: $(XA.Build.Configuration) diff --git a/build-tools/scripts/TestApks.targets b/build-tools/scripts/TestApks.targets index 091089c0a0e..fa028e8c3bb 100644 --- a/build-tools/scripts/TestApks.targets +++ b/build-tools/scripts/TestApks.targets @@ -18,7 +18,7 @@ - android-arm64;android-x86;android-x64; + android-arm64;android-x86;android-x64; 29 arm64-v8a x86_64 diff --git a/tests/Mono.Android-Tests/Mono.Android-Tests/Java.Interop/JnienvTest.cs b/tests/Mono.Android-Tests/Mono.Android-Tests/Java.Interop/JnienvTest.cs index 420544ed116..e28317387d4 100644 --- a/tests/Mono.Android-Tests/Mono.Android-Tests/Java.Interop/JnienvTest.cs +++ b/tests/Mono.Android-Tests/Mono.Android-Tests/Java.Interop/JnienvTest.cs @@ -239,6 +239,7 @@ public void SetField_PermitNullValues () } [Test] + [Category ("CoreCLRIgnore")] //TODO: https://github.com/dotnet/android/issues/10069 public void CreateTypeWithExportedMethods () { using (var e = new ContainsExportedMethods ()) { @@ -251,6 +252,7 @@ public void CreateTypeWithExportedMethods () } [Test] + [Category ("CoreCLRIgnore")] //TODO: https://github.com/dotnet/android/issues/10069 public void ActivatedDirectObjectSubclassesShouldBeRegistered () { if (Build.VERSION.SdkInt <= BuildVersionCodes.GingerbreadMr1) @@ -426,7 +428,7 @@ public void ManagedToJavaTypeMapping () Assert.AreEqual (null, m, "`JnienvTest` does *not* subclass Java.Lang.Object, it should *not* be in the typemap!"); } - [Test] + [Test, Category ("GCBridge")] public void DoNotLeakWeakReferences () { GC.Collect (); diff --git a/tests/Mono.Android-Tests/Mono.Android-Tests/Java.Lang/ObjectTest.cs b/tests/Mono.Android-Tests/Mono.Android-Tests/Java.Lang/ObjectTest.cs index e6a051b170a..1d656e434a9 100644 --- a/tests/Mono.Android-Tests/Mono.Android-Tests/Java.Lang/ObjectTest.cs +++ b/tests/Mono.Android-Tests/Mono.Android-Tests/Java.Lang/ObjectTest.cs @@ -66,6 +66,7 @@ static MethodInfo MakeGenericMethod (MethodInfo method, Type type) => } [Test] + [Category ("CoreCLRIgnore")] //TODO: https://github.com/dotnet/android/issues/10069 public void JnienvCreateInstance_RegistersMultipleInstances () { using (var adapter = new CreateInstance_OverrideAbsListView_Adapter (Application.Context)) { diff --git a/tests/Mono.Android-Tests/Mono.Android-Tests/Mono.Android.NET-Tests.csproj b/tests/Mono.Android-Tests/Mono.Android-Tests/Mono.Android.NET-Tests.csproj index 8690e4b8e10..b56fdfa8857 100644 --- a/tests/Mono.Android-Tests/Mono.Android-Tests/Mono.Android.NET-Tests.csproj +++ b/tests/Mono.Android-Tests/Mono.Android-Tests/Mono.Android.NET-Tests.csproj @@ -22,6 +22,8 @@ IL2037 true + $(DefineConstants);CORECLR + $(DefineConstants);NATIVEAOT DotNetIgnore + + $(ExcludeCategories):CoreCLRIgnore:SSL:NTLM:GCBridge:RuntimeConfig $(ExcludeCategories):LLVMIgnore $(ExcludeCategories):InetAccess:NetworkInterfaces diff --git a/tests/Mono.Android-Tests/Mono.Android-Tests/System.Net/SslTest.cs b/tests/Mono.Android-Tests/Mono.Android-Tests/System.Net/SslTest.cs index ba104387632..fb497006bf3 100644 --- a/tests/Mono.Android-Tests/Mono.Android-Tests/System.Net/SslTest.cs +++ b/tests/Mono.Android-Tests/Mono.Android-Tests/System.Net/SslTest.cs @@ -9,8 +9,8 @@ using NUnit.Framework; namespace System.NetTests { - - [TestFixture, Category ("InetAccess")] + // TODO: https://github.com/dotnet/android/issues/10069 + [TestFixture, Category ("InetAccess"), Category ("SSL")] public class SslTest { bool ShouldIgnoreException (WebException wex) diff --git a/tests/Mono.Android-Tests/Mono.Android-Tests/System/AppContextTests.cs b/tests/Mono.Android-Tests/Mono.Android-Tests/System/AppContextTests.cs index 8b086b5011a..4cfd9856eed 100644 --- a/tests/Mono.Android-Tests/Mono.Android-Tests/System/AppContextTests.cs +++ b/tests/Mono.Android-Tests/Mono.Android-Tests/System/AppContextTests.cs @@ -6,6 +6,7 @@ namespace SystemTests { [TestFixture] + [Category ("RuntimeConfig")] //TODO: https://github.com/dotnet/android/issues/10069 public class AppContextTests { static readonly object [] GetDataSource = new object [] { diff --git a/tests/Mono.Android-Tests/Mono.Android-Tests/System/ExceptionTest.cs b/tests/Mono.Android-Tests/Mono.Android-Tests/System/ExceptionTest.cs index 017308edf7c..96cf8a921fd 100644 --- a/tests/Mono.Android-Tests/Mono.Android-Tests/System/ExceptionTest.cs +++ b/tests/Mono.Android-Tests/Mono.Android-Tests/System/ExceptionTest.cs @@ -29,6 +29,7 @@ static Java.Lang.Throwable CreateJavaProxyThrowable (Exception e) } [Test] + [Category ("CoreCLRIgnore")] //TODO: https://github.com/dotnet/android/issues/10069 [RequiresUnreferencedCode ("Tests trimming unsafe features")] public void InnerExceptionIsSet () { diff --git a/tests/Mono.Android-Tests/Mono.Android-Tests/Xamarin.Android.Net/AndroidClientHandlerTests.cs b/tests/Mono.Android-Tests/Mono.Android-Tests/Xamarin.Android.Net/AndroidClientHandlerTests.cs index effae7a832b..a41040b9223 100644 --- a/tests/Mono.Android-Tests/Mono.Android-Tests/Xamarin.Android.Net/AndroidClientHandlerTests.cs +++ b/tests/Mono.Android-Tests/Mono.Android-Tests/Xamarin.Android.Net/AndroidClientHandlerTests.cs @@ -46,6 +46,7 @@ namespace Xamarin.Android.NetTests { [Category("InetAccess")] + [Category ("SSL")] // TODO: https://github.com/dotnet/android/issues/10069 public abstract class HttpClientHandlerTestBase { protected abstract HttpMessageHandler CreateHandler (); diff --git a/tests/Mono.Android-Tests/Mono.Android-Tests/Xamarin.Android.Net/AndroidMessageHandlerNegotiateAuthenticationTests.cs b/tests/Mono.Android-Tests/Mono.Android-Tests/Xamarin.Android.Net/AndroidMessageHandlerNegotiateAuthenticationTests.cs index f767c456cb9..8be6bef6896 100644 --- a/tests/Mono.Android-Tests/Mono.Android-Tests/Xamarin.Android.Net/AndroidMessageHandlerNegotiateAuthenticationTests.cs +++ b/tests/Mono.Android-Tests/Mono.Android-Tests/Xamarin.Android.Net/AndroidMessageHandlerNegotiateAuthenticationTests.cs @@ -13,7 +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")] + [Category ("InetAccess"), Category ("NTLM")] // TODO: https://github.com/dotnet/android/issues/10069 public sealed class AndroidMessageHandlerNegotiateAuthenticationTests { // Negotiate authentication is available for Android since .NET 7 diff --git a/tests/Mono.Android-Tests/Mono.Android-Tests/Xamarin.Android.Net/AndroidMessageHandlerTests.cs b/tests/Mono.Android-Tests/Mono.Android-Tests/Xamarin.Android.Net/AndroidMessageHandlerTests.cs index 5b4dceaa775..bd3b6088bfc 100644 --- a/tests/Mono.Android-Tests/Mono.Android-Tests/Xamarin.Android.Net/AndroidMessageHandlerTests.cs +++ b/tests/Mono.Android-Tests/Mono.Android-Tests/Xamarin.Android.Net/AndroidMessageHandlerTests.cs @@ -14,6 +14,7 @@ namespace Xamarin.Android.NetTests { [TestFixture] + [Category ("SSL")] // TODO: https://github.com/dotnet/android/issues/10069 public class AndroidMessageHandlerTests : AndroidHandlerTestBase { protected override HttpMessageHandler CreateHandler () diff --git a/tests/Mono.Android-Tests/Mono.Android-Tests/Xamarin.Android.RuntimeTests/NUnitInstrumentation.cs b/tests/Mono.Android-Tests/Mono.Android-Tests/Xamarin.Android.RuntimeTests/NUnitInstrumentation.cs index 0a58cd6bc81..1909bb5ddd9 100644 --- a/tests/Mono.Android-Tests/Mono.Android-Tests/Xamarin.Android.RuntimeTests/NUnitInstrumentation.cs +++ b/tests/Mono.Android-Tests/Mono.Android-Tests/Xamarin.Android.RuntimeTests/NUnitInstrumentation.cs @@ -30,13 +30,17 @@ protected NUnitInstrumentation(IntPtr handle, JniHandleOwnership transfer) protected override IList GetTestAssemblies() { Assembly asm = Assembly.GetExecutingAssembly(); + #if !NATIVEAOT && !CORECLR // TODO: Java.Interop-Tests not passing yet Assembly ji = typeof (Java.InteropTests.JavaInterop_Tests_Reference).Assembly; + #endif return new List() { new TestAssemblyInfo (asm, asm.Location ?? String.Empty), + #if !NATIVEAOT && !CORECLR new TestAssemblyInfo (ji, ji.Location ?? String.Empty), + #endif }; } }