Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions build-tools/automation/yaml-templates/stage-package-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion build-tools/scripts/TestApks.targets
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

<PropertyGroup>
<!-- APK tests might run on 32-bit emulators -->
<RuntimeIdentifiers Condition=" '$(RuntimeIdentifier)' == '' ">android-arm64;android-x86;android-x64;</RuntimeIdentifiers>
<RuntimeIdentifiers Condition=" '$(RuntimeIdentifier)' == '' and '$(PublishAot)' != 'true' and '$(UseMonoRuntime)' != 'false' ">android-arm64;android-x86;android-x64;</RuntimeIdentifiers>
<TestAvdApiLevel Condition=" '$(TestAvdApiLevel)' == '' ">29</TestAvdApiLevel>
<TestAvdAbi Condition=" '$(TestAvdAbi)' == '' and '$(HostOS)' == 'Darwin' and '$(HostOSArchitecture)' == 'Arm64' ">arm64-v8a</TestAvdAbi>
<TestAvdAbi Condition=" '$(TestAvdAbi)' == '' ">x86_64</TestAvdAbi>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 ()) {
Expand All @@ -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)
Expand Down Expand Up @@ -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 ();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,17 @@
<WarningsAsErrors>IL2037</WarningsAsErrors>
<AndroidUseNegotiateAuthentication>true</AndroidUseNegotiateAuthentication>
<AndroidNdkDirectory></AndroidNdkDirectory>
<DefineConstants Condition=" '$(UseMonoRuntime)' == 'false' ">$(DefineConstants);CORECLR</DefineConstants>
<DefineConstants Condition=" '$(PublishAot)' == 'true' ">$(DefineConstants);NATIVEAOT</DefineConstants>
<!--
TODO: Fix excluded tests
For $(EnableLLVM)
InetAccess excluded: https://github.com/dotnet/runtime/issues/73304
NetworkInterfaces excluded: https://github.com/dotnet/runtime/issues/75155
-->
<ExcludeCategories>DotNetIgnore</ExcludeCategories>
<!-- TODO: https://github.com/dotnet/android/issues/10069 -->
<ExcludeCategories Condition=" '$(UseMonoRuntime)' == 'false' ">$(ExcludeCategories):CoreCLRIgnore:SSL:NTLM:GCBridge:RuntimeConfig</ExcludeCategories>
<!-- FIXME: LLVMIgnore https://github.com/dotnet/runtime/issues/89190 -->
<ExcludeCategories Condition=" '$(EnableLLVM)' == 'true' ">$(ExcludeCategories):LLVMIgnore</ExcludeCategories>
<ExcludeCategories Condition=" '$(EnableLLVM)' == 'true' ">$(ExcludeCategories):InetAccess:NetworkInterfaces</ExcludeCategories>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 [] {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 ()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 ();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 ()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,17 @@ protected NUnitInstrumentation(IntPtr handle, JniHandleOwnership transfer)
protected override IList<TestAssemblyInfo> 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<TestAssemblyInfo>()
{
new TestAssemblyInfo (asm, asm.Location ?? String.Empty),
#if !NATIVEAOT && !CORECLR
new TestAssemblyInfo (ji, ji.Location ?? String.Empty),
#endif
};
}
}
Expand Down