Skip to content

Commit 9ab2952

Browse files
[tests] enable Java.Interop-Tests for CoreCLR (#10095)
Until a "GC Bridge" exists, for `Java.Interop-Tests` to work on the new runtimes, we need to set: <DefineConstants Condition=" '$(UseMonoRuntime)' == 'false' or '$(PublishAot)' == 'true' ">$(DefineConstants);NO_GC_BRIDGE_SUPPORT</DefineConstants> When a "GC Bridge" becomes available, we can remove the `$(DefineConstants)` in the future.
1 parent b61cac3 commit 9ab2952

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

tests/Mono.Android-Tests/Java.Interop-Tests/Java.Interop-Tests.NET.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
<SignAssembly>true</SignAssembly>
1515
<AssemblyOriginatorKeyFile>..\..\..\product.snk</AssemblyOriginatorKeyFile>
1616
<DefineConstants>$(DefineConstants);NO_MARSHAL_MEMBER_BUILDER_SUPPORT</DefineConstants>
17+
<DefineConstants Condition=" '$(UseMonoRuntime)' == 'false' or '$(PublishAot)' == 'true' ">$(DefineConstants);NO_GC_BRIDGE_SUPPORT</DefineConstants>
1718
<JavaInteropTestDirectory>$(JavaInteropSourceDirectory)\tests\Java.Interop-Tests\</JavaInteropTestDirectory>
1819
</PropertyGroup>
1920

tests/Mono.Android-Tests/Mono.Android-Tests/Xamarin.Android.RuntimeTests/NUnitInstrumentation.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,15 @@ protected NUnitInstrumentation(IntPtr handle, JniHandleOwnership transfer)
3030
protected override IList<TestAssemblyInfo> GetTestAssemblies()
3131
{
3232
Assembly asm = Assembly.GetExecutingAssembly();
33-
#if !NATIVEAOT && !CORECLR // TODO: Java.Interop-Tests not passing yet
33+
#if !NATIVEAOT // TODO: Java.Interop-Tests not passing yet
3434
Assembly ji = typeof (Java.InteropTests.JavaInterop_Tests_Reference).Assembly;
3535
#endif
3636

3737

3838
return new List<TestAssemblyInfo>()
3939
{
4040
new TestAssemblyInfo (asm, asm.Location ?? String.Empty),
41-
#if !NATIVEAOT && !CORECLR
41+
#if !NATIVEAOT
4242
new TestAssemblyInfo (ji, ji.Location ?? String.Empty),
4343
#endif
4444
};

0 commit comments

Comments
 (0)