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 @@ -208,6 +208,16 @@ stages:
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)
testName: Mono.Android.NET_Tests-NativeAOT
project: tests/Mono.Android-Tests/Mono.Android-Tests/Mono.Android.NET-Tests.csproj
testResultsFiles: TestResult-Mono.Android.NET_Tests-$(XA.Build.Configuration)NativeAOT.xml
extraBuildArgs: -p:TestsFlavor=NativeAOT -p:PublishAot=true
artifactSource: bin/Test$(XA.Build.Configuration)/$(DotNetTargetFramework)-android/Mono.Android.NET_Tests-Signed.aab
artifactFolder: $(DotNetTargetFramework)-NativeAOT

- template: /build-tools/automation/yaml-templates/apk-instrumentation.yaml
parameters:
configuration: $(XA.Build.Configuration)
Expand Down
8 changes: 0 additions & 8 deletions samples/NativeAOT/NativeAOT.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,4 @@
<!-- Only property required to opt into NativeAOT -->
<PublishAot>true</PublishAot>
</PropertyGroup>

<!-- Settings for CI -->
<PropertyGroup Condition=" '$(RunningOnCI)' == 'true' ">
<_NuGetFolderOnCI>..\..\bin\Build$(Configuration)\nuget-unsigned</_NuGetFolderOnCI>
<RestoreAdditionalProjectSources Condition="Exists('$(_NuGetFolderOnCI)')">$(_NuGetFolderOnCI)</RestoreAdditionalProjectSources>
<_FastDeploymentDiagnosticLogging>true</_FastDeploymentDiagnosticLogging>
</PropertyGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using System.Reflection;
using System.Threading;
Expand All @@ -11,9 +12,10 @@
using NUnit.Framework;

namespace Java.InteropTests {
[TestFixture]
[TestFixture, Category ("NativeTypeMap")]
public class AndroidValueManagerContractTests : JniRuntimeJniValueManagerContract {

[DynamicallyAccessedMembers (DynamicallyAccessedMemberTypes.PublicParameterlessConstructor)]
protected override Type ValueManagerType => typeof (Android.Runtime.AndroidValueManager);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ public void SetField_PermitNullValues ()
}
}

[Test]
[Test, Category ("Export")]
[Category ("CoreCLRIgnore")] //TODO: https://github.com/dotnet/android/issues/10069
public void CreateTypeWithExportedMethods ()
{
Expand All @@ -251,7 +251,7 @@ public void CreateTypeWithExportedMethods ()
}
}

[Test]
[Test, Category ("Export")]
[Category ("CoreCLRIgnore")] //TODO: https://github.com/dotnet/android/issues/10069
public void ActivatedDirectObjectSubclassesShouldBeRegistered ()
{
Expand Down Expand Up @@ -407,7 +407,7 @@ public void MoarThreadingTests ()
Assert.IsNull (ignore_t2, string.Format ("No exception should be thrown [t2]! Got: {0}", ignore_t2));
}

[Test]
[Test, Category ("NativeTypeMap")]
public void JavaToManagedTypeMapping ()
{
Type m = Java.Interop.TypeManager.GetJavaToManagedType ("android/content/res/Resources");
Expand All @@ -416,7 +416,7 @@ public void JavaToManagedTypeMapping ()
Assert.AreEqual (null, m);
}

[Test]
[Test, Category ("NativeTypeMap")]
public void ManagedToJavaTypeMapping ()
{
Type type = typeof(Activity);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ static MethodInfo MakeGenericMethod (MethodInfo method, Type type) =>

[Test]
[Category ("CoreCLRIgnore")] //TODO: https://github.com/dotnet/android/issues/10069
[Category ("NativeAOTIgnore")] //TODO: https://github.com/dotnet/android/issues/10079
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 @@ -33,6 +33,8 @@
<ExcludeCategories>DotNetIgnore</ExcludeCategories>
<!-- TODO: https://github.com/dotnet/android/issues/10069 -->
<ExcludeCategories Condition=" '$(UseMonoRuntime)' == 'false' ">$(ExcludeCategories):CoreCLRIgnore:SSL:NTLM:GCBridge:RuntimeConfig</ExcludeCategories>
<!-- TODO: https://github.com/dotnet/android/issues/10079 -->
<ExcludeCategories Condition=" '$(PublishAot)' == 'true' ">$(ExcludeCategories):NativeAOTIgnore:SSL:NTLM:GCBridge:AndroidClientHandler:Export:NativeTypeMap</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 @@ -49,6 +49,7 @@ public void GetData (string name, string expected)
};

[Test]
[Category ("NativeAOTIgnore")] // These switches only exist in Mono & CoreCLR BCL assemblies
[TestCaseSource (nameof (TestPrivateSwitchesSource))]
public void TestPrivateSwitches (
[DynamicallyAccessedMembers (DynamicallyAccessedMemberTypes.All)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ static Java.Lang.Throwable CreateJavaProxyThrowable (Exception e)

[Test]
[Category ("CoreCLRIgnore")] //TODO: https://github.com/dotnet/android/issues/10069
[Category ("NativeAOTIgnore")] // NativeAOT has very limited stack traces
[RequiresUnreferencedCode ("Tests trimming unsafe features")]
public void InnerExceptionIsSet ()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ bool IgnoreIfConnectionFailed (WebException wex, out bool connectionFailed)
}
}

[Category ("AndroidClientHandler")]
public abstract class AndroidHandlerTestBase : HttpClientHandlerTestBase
{
static IEnumerable<Exception> Exceptions (Exception e)
Expand Down Expand Up @@ -316,6 +317,7 @@ public bool ShouldIgnoreSuccessStatusCode (HttpStatusCode code)
}

[TestFixture]
[Category ("AndroidClientHandler")]
public class AndroidClientHandlerTests : AndroidHandlerTestBase
{
protected override HttpMessageHandler CreateHandler ()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1062,6 +1062,7 @@ public static implicit operator HttpMessageHandler (AndroidHandlerSettingsAdapte
}

[TestFixture]
[Category ("AndroidClientHandler")]
public class AndroidClientHandlerIntegrationTests : HttpClientIntegrationTestBase
{
protected override AndroidHandlerSettingsAdapter CreateHandler ()
Expand Down
Loading