@@ -26,17 +26,47 @@ protected NUnitInstrumentation(IntPtr handle, JniHandleOwnership transfer)
2626 : base ( handle , transfer )
2727 {
2828 if ( AppContext . TryGetSwitch ( "Microsoft.Android.Runtime.RuntimeFeature.TrimmableTypeMap" , out bool trimmableTypeMap ) && trimmableTypeMap ) {
29+ var excludedCategories = new List < string > {
30+ "Export" ,
31+ "GCBridge" ,
32+ "NativeTypeMap" ,
33+ "SSL" ,
34+ "TrimmableIgnore" ,
35+ } ;
36+ if ( AppContext . TryGetSwitch ( "Microsoft.Android.Runtime.RuntimeFeature.IsCoreClrRuntime" , out bool isCoreClrRuntime ) && isCoreClrRuntime ) {
37+ excludedCategories . Add ( "CoreCLRIgnore" ) ;
38+ }
39+ ExcludedCategories = excludedCategories ;
40+
2941 // Java.Interop-Tests fixtures that use JavaObject types (not Java.Lang.Object)
3042 // don't have JCW Java classes in the trimmable APK, and method remapping
3143 // tests require Java-side support not present in the trimmable path.
32- // Exclude these entire fixtures to prevent ClassNotFoundException crashes.
44+ // Keep short simple names alongside fully-qualified names because the
45+ // instrumentation filter matches both individual tests and fixtures.
3346 ExcludedTestNames = new [ ] {
47+ "JavaObjectTest" ,
3448 "Java.InteropTests.JavaObjectTest" ,
49+ "JavaObjectExtensionsTests" ,
50+ "Java.InteropTests.JavaObjectExtensionsTests" ,
51+ "InvokeVirtualFromConstructorTests" ,
3552 "Java.InteropTests.InvokeVirtualFromConstructorTests" ,
53+ "JniPeerMembersTests" ,
3654 "Java.InteropTests.JniPeerMembersTests" ,
55+ "JniTypeManagerTests" ,
3756 "Java.InteropTests.JniTypeManagerTests" ,
57+ "JniValueMarshaler_object_ContractTests" ,
3858 "Java.InteropTests.JniValueMarshaler_object_ContractTests" ,
59+ "InnerExceptionIsNotAProxy" ,
3960 "Java.InteropTests.JavaExceptionTests.InnerExceptionIsNotAProxy" ,
61+ "JavaPeerableExtensionsTests" ,
62+ "JavaAs" ,
63+ "JavaAs_Exceptions" ,
64+ "JavaAs_InstanceThatDoesNotImplementInterfaceReturnsNull" ,
65+ "Java.InteropTests.JavaPeerableExtensionsTests" ,
66+ "CreateTypeWithExportedMethods" ,
67+ "Java.InteropTests.JnienvTest.CreateTypeWithExportedMethods" ,
68+ "DoNotLeakWeakReferences" ,
69+ "Java.InteropTests.JnienvTest.DoNotLeakWeakReferences" ,
4070 } ;
4171 }
4272 }
0 commit comments