Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/linker.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Voorhees <mrvoorhe@users.noreply.github.com>2021-09-11 09:42:45 +0300
committerGitHub <noreply@github.com>2021-09-11 09:42:45 +0300
commitbe8ec96d897e0817cb89578405c154b4f9252ac5 (patch)
tree62ccf9327a06883569a8038c31425ab14947e08a /test/Mono.Linker.Tests.Cases
parent0c359eadea75bde0de74d784fdc45788b3668e73 (diff)
Refactor how test case metadata is obtained. (#2268)
Diffstat (limited to 'test/Mono.Linker.Tests.Cases')
-rw-r--r--test/Mono.Linker.Tests.Cases/Attributes/NoSecurity/CoreLibrarySecurityAttributeTypesAreRemoved.cs4
-rw-r--r--test/Mono.Linker.Tests.Cases/Attributes/OnlyKeepUsed/ComAttributesAreRemovedWhenFeatureExcluded.cs4
-rw-r--r--test/Mono.Linker.Tests.Cases/Attributes/TypeWithDynamicInterfaceCastableImplementationAttributeIsKept.cs4
-rw-r--r--test/Mono.Linker.Tests.Cases/BCLFeatures/ETW/BaseRemovedEventSource.cs4
-rw-r--r--test/Mono.Linker.Tests.Cases/BCLFeatures/ETW/BaseRemovedEventSourceEmptyBody.cs4
-rw-r--r--test/Mono.Linker.Tests.Cases/BCLFeatures/ETW/BaseRemovedEventSourceNonVoidReturn.cs4
-rw-r--r--test/Mono.Linker.Tests.Cases/BCLFeatures/ETW/Excluded.cs4
-rw-r--r--test/Mono.Linker.Tests.Cases/BCLFeatures/ETW/LocalsOfModifiedMethodAreRemoved.cs4
-rw-r--r--test/Mono.Linker.Tests.Cases/BCLFeatures/ETW/NonEventWithLog.cs4
-rw-r--r--test/Mono.Linker.Tests.Cases/BCLFeatures/ETW/StubbedMethodWithExceptionHandlers.cs4
-rw-r--r--test/Mono.Linker.Tests.Cases/CommandLine/AddCustomStep.cs5
-rw-r--r--test/Mono.Linker.Tests.Cases/CommandLine/CustomStepData.cs5
-rw-r--r--test/Mono.Linker.Tests.Cases/CoreLink/DelegateAndMulticastDelegateKeepInstantiatedReqs.cs4
-rw-r--r--test/Mono.Linker.Tests.Cases/CoreLink/LinkingOfCoreLibrariesRemovesUnusedMethods.cs4
-rw-r--r--test/Mono.Linker.Tests.Cases/CoreLink/LinkingOfCoreLibrariesRemovesUnusedTypes.cs4
-rw-r--r--test/Mono.Linker.Tests.Cases/CoreLink/NoSecurityPlusOnlyKeepUsedRemovesAllSecurityAttributesFromCoreLibraries.cs4
-rw-r--r--test/Mono.Linker.Tests.Cases/Extensibility/CustomStepCanPreserveMethodsAfterMark.cs3
-rw-r--r--test/Mono.Linker.Tests.Cases/Extensibility/CustomStepCanPreserveMethodsBeforeMark.cs3
-rw-r--r--test/Mono.Linker.Tests.Cases/Extensibility/SubStepDispatcherFields.cs3
-rw-r--r--test/Mono.Linker.Tests.Cases/Extensibility/SubStepDispatcherUsage.cs3
-rw-r--r--test/Mono.Linker.Tests.Cases/FeatureSettings/FeatureDescriptors.cs4
-rw-r--r--test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/DefaultInterfaceMethods/DefaultInterfaceMethodCallIntoClass.cs8
-rw-r--r--test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/DefaultInterfaceMethods/GenericDefaultInterfaceMethods.cs8
-rw-r--r--test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/DefaultInterfaceMethods/InterfaceWithAttributeOnImplementation.cs4
-rw-r--r--test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/DefaultInterfaceMethods/SimpleDefaultInterfaceMethod.cs8
-rw-r--r--test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/DefaultInterfaceMethods/UnusedDefaultInterfaceImplementation.cs8
-rw-r--r--test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/OnReferenceType/UnusedComInterfaceIsRemovedWhenComFeatureExcluded.cs4
-rw-r--r--test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/StaticInterfaceMethods/GenericsBasic_Delegate.cs4
-rw-r--r--test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/StaticInterfaceMethods/GenericsBasic_Direct.cs4
-rw-r--r--test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/StaticInterfaceMethods/GenericsBasic_Ldftn.cs4
-rw-r--r--test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/StaticInterfaceMethods/GenericsFull.cs4
-rw-r--r--test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/StaticInterfaceMethods/TypeHierarchyBasic.cs4
-rw-r--r--test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/StaticInterfaceMethods/TypeHierarchyFull.cs4
-rw-r--r--test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/StaticInterfaceMethods/VarianceBasic.cs4
-rw-r--r--test/Mono.Linker.Tests.Cases/Libraries/CopyUsedAssemblyWithMainEntryRoot.cs3
-rw-r--r--test/Mono.Linker.Tests.Cases/Libraries/CopyUsedAssemblyWithPublicRoots.cs3
-rw-r--r--test/Mono.Linker.Tests.Cases/Libraries/RootLibraryInternalsWithIVT.cs3
-rw-r--r--test/Mono.Linker.Tests.Cases/Libraries/RootLibraryVisibleAndDescriptor.cs3
-rw-r--r--test/Mono.Linker.Tests.Cases/Libraries/RootLibraryVisibleForwarders.cs3
-rw-r--r--test/Mono.Linker.Tests.Cases/Libraries/RootLibraryVisibleForwardersWithoutReference.cs3
-rw-r--r--test/Mono.Linker.Tests.Cases/LinkXml/CanPreserveExcludedFeatureCom.cs4
-rw-r--r--test/Mono.Linker.Tests.Cases/LinkXml/FeatureExclude/OnAssembly.cs4
-rw-r--r--test/Mono.Linker.Tests.Cases/LinkXml/FeatureExclude/OnEvent.cs4
-rw-r--r--test/Mono.Linker.Tests.Cases/LinkXml/FeatureExclude/OnField.cs4
-rw-r--r--test/Mono.Linker.Tests.Cases/LinkXml/FeatureExclude/OnMethod.cs4
-rw-r--r--test/Mono.Linker.Tests.Cases/LinkXml/FeatureExclude/OnProperty.cs4
-rw-r--r--test/Mono.Linker.Tests.Cases/LinkXml/FeatureExclude/OnType.cs4
-rw-r--r--test/Mono.Linker.Tests.Cases/Logging/CommonLogs.cs5
-rw-r--r--test/Mono.Linker.Tests.Cases/Mono.Linker.Tests.Cases.csproj2
-rw-r--r--test/Mono.Linker.Tests.Cases/PreserveDependencies/PreserveDependencyDeprecated.cs4
-rw-r--r--test/Mono.Linker.Tests.Cases/References/ReferencesAreRemovedWhenAllUsagesAreRemoved.cs4
-rw-r--r--test/Mono.Linker.Tests.Cases/Symbols/ReferenceWithMdbAndSymbolLinkingEnabled.cs4
-rw-r--r--test/Mono.Linker.Tests.Cases/Symbols/ReferenceWithMdbAndSymbolLinkingEnabledAndDeterministicMvid.cs4
-rw-r--r--test/Mono.Linker.Tests.Cases/Symbols/ReferenceWithMdbAndSymbolLinkingEnabledAndNewMvid.cs4
-rw-r--r--test/Mono.Linker.Tests.Cases/Symbols/ReferenceWithMdbCopyActionAndSymbolLinkingEnabled.cs4
-rw-r--r--test/Mono.Linker.Tests.Cases/Symbols/ReferenceWithPdbCopyActionAndSymbolLinkingEnabled.cs5
-rw-r--r--test/Mono.Linker.Tests.Cases/Symbols/ReferencesWithMixedSymbolTypesAndSymbolLinkingEnabled.cs17
-rw-r--r--test/Mono.Linker.Tests.Cases/Symbols/ReferencesWithMixedSymbolTypesWithMdbAndSymbolLinkingEnabled.cs73
-rw-r--r--test/Mono.Linker.Tests.Cases/TestFramework/CanCompileReferencesWithResourcesWithMcs.cs4
-rw-r--r--test/Mono.Linker.Tests.Cases/TestFramework/CanCompileTestCaseWithMcs.cs4
-rw-r--r--test/Mono.Linker.Tests.Cases/TestFramework/VerifyExpectModifiedAttributesWork.cs4
-rw-r--r--test/Mono.Linker.Tests.Cases/Warnings/Individual/CustomStepWithWarnings.cs4
-rw-r--r--test/Mono.Linker.Tests.Cases/Warnings/WarningSuppression/SuppressWarningsUsingTargetViaXmlMono.cs (renamed from test/Mono.Linker.Tests.Cases/Warnings/WarningSuppression/SuppressWarningsUsingTargetViaXml.cs)22
-rw-r--r--test/Mono.Linker.Tests.Cases/Warnings/WarningSuppression/SuppressWarningsUsingTargetViaXmlNetCore.cs27
64 files changed, 164 insertions, 223 deletions
diff --git a/test/Mono.Linker.Tests.Cases/Attributes/NoSecurity/CoreLibrarySecurityAttributeTypesAreRemoved.cs b/test/Mono.Linker.Tests.Cases/Attributes/NoSecurity/CoreLibrarySecurityAttributeTypesAreRemoved.cs
index c7738db8a..2644b5dbb 100644
--- a/test/Mono.Linker.Tests.Cases/Attributes/NoSecurity/CoreLibrarySecurityAttributeTypesAreRemoved.cs
+++ b/test/Mono.Linker.Tests.Cases/Attributes/NoSecurity/CoreLibrarySecurityAttributeTypesAreRemoved.cs
@@ -7,9 +7,7 @@ using Mono.Linker.Tests.Cases.Expectations.Metadata;
namespace Mono.Linker.Tests.Cases.Attributes.NoSecurity
{
-#if NETCOREAPP
- [IgnoreTestCase ("Not important for .NET Core build")]
-#endif
+ [TestCaseRequirements (TestRunCharacteristics.TargetingNetFramework, "Not important for .NET Core build")]
[SetupLinkerTrimMode ("link")]
[SetupLinkerArgument ("--strip-security", "true")]
[Reference ("System.dll")]
diff --git a/test/Mono.Linker.Tests.Cases/Attributes/OnlyKeepUsed/ComAttributesAreRemovedWhenFeatureExcluded.cs b/test/Mono.Linker.Tests.Cases/Attributes/OnlyKeepUsed/ComAttributesAreRemovedWhenFeatureExcluded.cs
index e33e7d27f..36877e80c 100644
--- a/test/Mono.Linker.Tests.Cases/Attributes/OnlyKeepUsed/ComAttributesAreRemovedWhenFeatureExcluded.cs
+++ b/test/Mono.Linker.Tests.Cases/Attributes/OnlyKeepUsed/ComAttributesAreRemovedWhenFeatureExcluded.cs
@@ -4,9 +4,7 @@ using Mono.Linker.Tests.Cases.Expectations.Metadata;
namespace Mono.Linker.Tests.Cases.Attributes.OnlyKeepUsed
{
-#if NETCOREAPP
- [IgnoreTestCase ("--exclude-feature is not supported on .NET Core")]
-#endif
+ [TestCaseRequirements (TestRunCharacteristics.TargetingNetFramework, "--exclude-feature is not supported on .NET Core")]
[SetupLinkerArgument ("--used-attrs-only", "true")]
[SetupLinkerArgument ("--exclude-feature", "com")]
public class ComAttributesAreRemovedWhenFeatureExcluded
diff --git a/test/Mono.Linker.Tests.Cases/Attributes/TypeWithDynamicInterfaceCastableImplementationAttributeIsKept.cs b/test/Mono.Linker.Tests.Cases/Attributes/TypeWithDynamicInterfaceCastableImplementationAttributeIsKept.cs
index fdc1b590d..f1c1f9f04 100644
--- a/test/Mono.Linker.Tests.Cases/Attributes/TypeWithDynamicInterfaceCastableImplementationAttributeIsKept.cs
+++ b/test/Mono.Linker.Tests.Cases/Attributes/TypeWithDynamicInterfaceCastableImplementationAttributeIsKept.cs
@@ -9,9 +9,7 @@ using Mono.Linker.Tests.Cases.Expectations.Assertions;
using Mono.Linker.Tests.Cases.Expectations.Metadata;
namespace Mono.Linker.Tests.Cases.Attributes
{
-#if !NETCOREAPP
- [IgnoreTestCase ("Requires support for default interface methods")]
-#endif
+ [TestCaseRequirements (TestRunCharacteristics.TargetingNetCore, "Requires net5 or newer")]
[SetupCompileBefore ("interface.dll", new[] { "Dependencies/IReferencedAssembly.cs" })]
[SetupCompileBefore ("impl.dll", new[] { "Dependencies/IReferencedAssemblyImpl.cs" },
references: new[] { "interface.dll" }, addAsReference: false)]
diff --git a/test/Mono.Linker.Tests.Cases/BCLFeatures/ETW/BaseRemovedEventSource.cs b/test/Mono.Linker.Tests.Cases/BCLFeatures/ETW/BaseRemovedEventSource.cs
index 8bb85bda8..deafdd3a8 100644
--- a/test/Mono.Linker.Tests.Cases/BCLFeatures/ETW/BaseRemovedEventSource.cs
+++ b/test/Mono.Linker.Tests.Cases/BCLFeatures/ETW/BaseRemovedEventSource.cs
@@ -5,9 +5,7 @@ using Mono.Linker.Tests.Cases.Expectations.Metadata;
namespace Mono.Linker.Tests.Cases.BCLFeatures.ETW
{
-#if NETCOREAPP
- [IgnoreTestCase ("--exclude-feature is not supported on .NET Core")]
-#endif
+ [TestCaseRequirements (TestRunCharacteristics.TargetingNetFramework, "--exclude-feature is not supported on .NET Core")]
[SetupLinkerArgument ("--exclude-feature", "etw")]
// Keep framework code that calls EventSource methods like OnEventCommand
[SetupLinkerTrimMode ("skip")]
diff --git a/test/Mono.Linker.Tests.Cases/BCLFeatures/ETW/BaseRemovedEventSourceEmptyBody.cs b/test/Mono.Linker.Tests.Cases/BCLFeatures/ETW/BaseRemovedEventSourceEmptyBody.cs
index cb6e83ed4..b72b66afb 100644
--- a/test/Mono.Linker.Tests.Cases/BCLFeatures/ETW/BaseRemovedEventSourceEmptyBody.cs
+++ b/test/Mono.Linker.Tests.Cases/BCLFeatures/ETW/BaseRemovedEventSourceEmptyBody.cs
@@ -4,9 +4,7 @@ using Mono.Linker.Tests.Cases.Expectations.Metadata;
namespace Mono.Linker.Tests.Cases.BCLFeatures.ETW
{
-#if NETCOREAPP
- [IgnoreTestCase ("--exclude-feature is not supported on .NET Core")]
-#endif
+ [TestCaseRequirements (TestRunCharacteristics.TargetingNetFramework, "--exclude-feature is not supported on .NET Core")]
[SetupLinkerArgument ("--exclude-feature", "etw")]
// Keep framework code that calls EventSource methods like OnEventCommand
[SetupLinkerTrimMode ("skip")]
diff --git a/test/Mono.Linker.Tests.Cases/BCLFeatures/ETW/BaseRemovedEventSourceNonVoidReturn.cs b/test/Mono.Linker.Tests.Cases/BCLFeatures/ETW/BaseRemovedEventSourceNonVoidReturn.cs
index 6adb3e217..d6ac1d1ad 100644
--- a/test/Mono.Linker.Tests.Cases/BCLFeatures/ETW/BaseRemovedEventSourceNonVoidReturn.cs
+++ b/test/Mono.Linker.Tests.Cases/BCLFeatures/ETW/BaseRemovedEventSourceNonVoidReturn.cs
@@ -4,9 +4,7 @@ using Mono.Linker.Tests.Cases.Expectations.Metadata;
namespace Mono.Linker.Tests.Cases.BCLFeatures.ETW
{
-#if NETCOREAPP
- [IgnoreTestCase ("--exclude-feature is not supported on .NET Core")]
-#endif
+ [TestCaseRequirements (TestRunCharacteristics.TargetingNetFramework, "--exclude-feature is not supported on .NET Core")]
[SetupLinkerArgument ("--exclude-feature", "etw")]
// Keep framework code that calls EventSource methods like OnEventCommand
[SetupLinkerTrimMode ("skip")]
diff --git a/test/Mono.Linker.Tests.Cases/BCLFeatures/ETW/Excluded.cs b/test/Mono.Linker.Tests.Cases/BCLFeatures/ETW/Excluded.cs
index 7256d8066..e09f837cf 100644
--- a/test/Mono.Linker.Tests.Cases/BCLFeatures/ETW/Excluded.cs
+++ b/test/Mono.Linker.Tests.Cases/BCLFeatures/ETW/Excluded.cs
@@ -5,9 +5,7 @@ using Mono.Linker.Tests.Cases.Expectations.Metadata;
namespace Mono.Linker.Tests.Cases.BCLFeatures.ETW
{
-#if NETCOREAPP
- [IgnoreTestCase ("--exclude-feature is not supported on .NET Core")]
-#endif
+ [TestCaseRequirements (TestRunCharacteristics.TargetingNetFramework, "--exclude-feature is not supported on .NET Core")]
[SetupLinkerArgument ("--exclude-feature", "etw")]
// Keep framework code that calls EventSource methods like OnEventCommand
[SetupLinkerTrimMode ("skip")]
diff --git a/test/Mono.Linker.Tests.Cases/BCLFeatures/ETW/LocalsOfModifiedMethodAreRemoved.cs b/test/Mono.Linker.Tests.Cases/BCLFeatures/ETW/LocalsOfModifiedMethodAreRemoved.cs
index ed61c571e..ea9788dbc 100644
--- a/test/Mono.Linker.Tests.Cases/BCLFeatures/ETW/LocalsOfModifiedMethodAreRemoved.cs
+++ b/test/Mono.Linker.Tests.Cases/BCLFeatures/ETW/LocalsOfModifiedMethodAreRemoved.cs
@@ -4,9 +4,7 @@ using Mono.Linker.Tests.Cases.Expectations.Metadata;
namespace Mono.Linker.Tests.Cases.BCLFeatures.ETW
{
-#if NETCOREAPP
- [IgnoreTestCase ("--exclude-feature is not supported on .NET Core")]
-#endif
+ [TestCaseRequirements (TestRunCharacteristics.TargetingNetFramework, "--exclude-feature is not supported on .NET Core")]
[SetupLinkerArgument ("--exclude-feature", "etw")]
// Keep framework code that calls EventSource methods like OnEventCommand
[SetupLinkerTrimMode ("skip")]
diff --git a/test/Mono.Linker.Tests.Cases/BCLFeatures/ETW/NonEventWithLog.cs b/test/Mono.Linker.Tests.Cases/BCLFeatures/ETW/NonEventWithLog.cs
index c986cb167..f02daab28 100644
--- a/test/Mono.Linker.Tests.Cases/BCLFeatures/ETW/NonEventWithLog.cs
+++ b/test/Mono.Linker.Tests.Cases/BCLFeatures/ETW/NonEventWithLog.cs
@@ -5,9 +5,7 @@ using Mono.Linker.Tests.Cases.Expectations.Metadata;
namespace Mono.Linker.Tests.Cases.BCLFeatures.ETW
{
-#if NETCOREAPP
- [IgnoreTestCase ("--exclude-feature is not supported on .NET Core")]
-#endif
+ [TestCaseRequirements (TestRunCharacteristics.TargetingNetFramework, "--exclude-feature is not supported on .NET Core")]
[SetupLinkerArgument ("--exclude-feature", "etw")]
// Used to avoid different compilers generating different IL which can mess up the instruction asserts
[SetupCompileArgument ("/optimize+")]
diff --git a/test/Mono.Linker.Tests.Cases/BCLFeatures/ETW/StubbedMethodWithExceptionHandlers.cs b/test/Mono.Linker.Tests.Cases/BCLFeatures/ETW/StubbedMethodWithExceptionHandlers.cs
index 73c6820a9..a38256f9b 100644
--- a/test/Mono.Linker.Tests.Cases/BCLFeatures/ETW/StubbedMethodWithExceptionHandlers.cs
+++ b/test/Mono.Linker.Tests.Cases/BCLFeatures/ETW/StubbedMethodWithExceptionHandlers.cs
@@ -5,9 +5,7 @@ using Mono.Linker.Tests.Cases.Expectations.Metadata;
namespace Mono.Linker.Tests.Cases.BCLFeatures.ETW
{
-#if NETCOREAPP
- [IgnoreTestCase ("--exclude-feature is not supported on .NET Core")]
-#endif
+ [TestCaseRequirements (TestRunCharacteristics.TargetingNetFramework, "--exclude-feature is not supported on .NET Core")]
[SetupLinkerArgument ("--exclude-feature", "etw")]
// Keep framework code that calls EventSource methods like OnEventCommand
[SetupLinkerTrimMode ("skip")]
diff --git a/test/Mono.Linker.Tests.Cases/CommandLine/AddCustomStep.cs b/test/Mono.Linker.Tests.Cases/CommandLine/AddCustomStep.cs
index 79271dcfb..b2d10ed2c 100644
--- a/test/Mono.Linker.Tests.Cases/CommandLine/AddCustomStep.cs
+++ b/test/Mono.Linker.Tests.Cases/CommandLine/AddCustomStep.cs
@@ -3,12 +3,7 @@ using Mono.Linker.Tests.Cases.Expectations.Metadata;
namespace Mono.Linker.Tests.Cases.CommandLine
{
-
-#if !NETCOREAPP
- [IgnoreTestCase ("Can be enabled once MonoBuild produces a dll from which we can grab the types in the Mono.Linker namespace.")]
-#else
[SetupCompileBefore ("CustomStepDummy.dll", new[] { "Dependencies/CustomStepDummy.cs" }, new[] { "illink.dll" })]
-#endif
[SetupLinkerArgument ("--custom-step", "CustomStep.CustomStepDummy,CustomStepDummy.dll")]
[SetupLinkerArgument ("--custom-step", "-CleanStep:CustomStep.CustomStepDummy,CustomStepDummy.dll")]
[SetupLinkerArgument ("--custom-step", "+CleanStep:CustomStep.CustomStepDummy,CustomStepDummy.dll")]
diff --git a/test/Mono.Linker.Tests.Cases/CommandLine/CustomStepData.cs b/test/Mono.Linker.Tests.Cases/CommandLine/CustomStepData.cs
index 2530b7e62..296803bf8 100644
--- a/test/Mono.Linker.Tests.Cases/CommandLine/CustomStepData.cs
+++ b/test/Mono.Linker.Tests.Cases/CommandLine/CustomStepData.cs
@@ -3,12 +3,7 @@ using Mono.Linker.Tests.Cases.Expectations.Metadata;
namespace Mono.Linker.Tests.Cases.CommandLine
{
-
-#if !NETCOREAPP
- [IgnoreTestCase ("Can be enabled once MonoBuild produces a dll from which we can grab the types in the Mono.Linker namespace.")]
-#else
[SetupCompileBefore ("CustomStepUser.dll", new[] { "Dependencies/CustomStepUser.cs" }, new[] { "illink.dll" })]
-#endif
[SetupLinkerArgument ("--custom-step", "CustomStep.CustomStepUser,CustomStepUser.dll")]
[SetupLinkerArgument ("--custom-data", "NewKey=UserValue")]
[SetupLinkerArgument ("--verbose")]
diff --git a/test/Mono.Linker.Tests.Cases/CoreLink/DelegateAndMulticastDelegateKeepInstantiatedReqs.cs b/test/Mono.Linker.Tests.Cases/CoreLink/DelegateAndMulticastDelegateKeepInstantiatedReqs.cs
index 2cc14fb20..86890e5cb 100644
--- a/test/Mono.Linker.Tests.Cases/CoreLink/DelegateAndMulticastDelegateKeepInstantiatedReqs.cs
+++ b/test/Mono.Linker.Tests.Cases/CoreLink/DelegateAndMulticastDelegateKeepInstantiatedReqs.cs
@@ -7,9 +7,7 @@ using Mono.Linker.Tests.Cases.Expectations.Metadata;
namespace Mono.Linker.Tests.Cases.CoreLink
{
-#if !NETCOREAPP
- [IgnoreTestCase ("Only for .NET Core for some reason")]
-#endif
+ [TestCaseRequirements (TestRunCharacteristics.TargetingNetCore, "Only for .NET Core")]
/// <summary>
/// Delegate and is created from
/// </summary>
diff --git a/test/Mono.Linker.Tests.Cases/CoreLink/LinkingOfCoreLibrariesRemovesUnusedMethods.cs b/test/Mono.Linker.Tests.Cases/CoreLink/LinkingOfCoreLibrariesRemovesUnusedMethods.cs
index 74826cd34..873fed9bc 100644
--- a/test/Mono.Linker.Tests.Cases/CoreLink/LinkingOfCoreLibrariesRemovesUnusedMethods.cs
+++ b/test/Mono.Linker.Tests.Cases/CoreLink/LinkingOfCoreLibrariesRemovesUnusedMethods.cs
@@ -7,9 +7,7 @@ using Mono.Linker.Tests.Cases.Expectations.Metadata;
namespace Mono.Linker.Tests.Cases.CoreLink
{
-#if NETCOREAPP
- [IgnoreTestCase ("Not important for .NET Core build")]
-#endif
+ [TestCaseRequirements (TestRunCharacteristics.TargetingNetFramework, "Not important for .NET Core build")]
[SetupLinkerTrimMode ("link")]
[KeptAssembly (PlatformAssemblies.CoreLib)]
diff --git a/test/Mono.Linker.Tests.Cases/CoreLink/LinkingOfCoreLibrariesRemovesUnusedTypes.cs b/test/Mono.Linker.Tests.Cases/CoreLink/LinkingOfCoreLibrariesRemovesUnusedTypes.cs
index e05755374..f90b3ac43 100644
--- a/test/Mono.Linker.Tests.Cases/CoreLink/LinkingOfCoreLibrariesRemovesUnusedTypes.cs
+++ b/test/Mono.Linker.Tests.Cases/CoreLink/LinkingOfCoreLibrariesRemovesUnusedTypes.cs
@@ -6,9 +6,7 @@ using Mono.Linker.Tests.Cases.Expectations.Metadata;
namespace Mono.Linker.Tests.Cases.CoreLink
{
-#if NETCOREAPP
- [IgnoreTestCase ("Not important for .NET Core build")]
-#endif
+ [TestCaseRequirements (TestRunCharacteristics.TargetingNetFramework, "Not important for .NET Core build")]
[SetupLinkerTrimMode ("link")]
[Reference ("System.dll")]
diff --git a/test/Mono.Linker.Tests.Cases/CoreLink/NoSecurityPlusOnlyKeepUsedRemovesAllSecurityAttributesFromCoreLibraries.cs b/test/Mono.Linker.Tests.Cases/CoreLink/NoSecurityPlusOnlyKeepUsedRemovesAllSecurityAttributesFromCoreLibraries.cs
index b76a18c05..6b0e4bf50 100644
--- a/test/Mono.Linker.Tests.Cases/CoreLink/NoSecurityPlusOnlyKeepUsedRemovesAllSecurityAttributesFromCoreLibraries.cs
+++ b/test/Mono.Linker.Tests.Cases/CoreLink/NoSecurityPlusOnlyKeepUsedRemovesAllSecurityAttributesFromCoreLibraries.cs
@@ -7,9 +7,7 @@ using Mono.Linker.Tests.Cases.Expectations.Metadata;
namespace Mono.Linker.Tests.Cases.CoreLink
{
-#if NETCOREAPP
- [IgnoreTestCase ("Not important for .NET Core build")]
-#endif
+ [TestCaseRequirements (TestRunCharacteristics.TargetingNetFramework, "Not important for .NET Core build")]
[SetupLinkerTrimMode ("link")]
[SetupLinkerArgument ("--strip-security", "true")]
[SetupLinkerArgument ("--used-attrs-only", "true")]
diff --git a/test/Mono.Linker.Tests.Cases/Extensibility/CustomStepCanPreserveMethodsAfterMark.cs b/test/Mono.Linker.Tests.Cases/Extensibility/CustomStepCanPreserveMethodsAfterMark.cs
index d3e32e816..277fe0c28 100644
--- a/test/Mono.Linker.Tests.Cases/Extensibility/CustomStepCanPreserveMethodsAfterMark.cs
+++ b/test/Mono.Linker.Tests.Cases/Extensibility/CustomStepCanPreserveMethodsAfterMark.cs
@@ -3,9 +3,6 @@ using Mono.Linker.Tests.Cases.Expectations.Metadata;
namespace Mono.Linker.Tests.Cases.Extensibility
{
-#if !NETCOREAPP
- [IgnoreTestCase ("Specific to the illink build")]
-#endif
[SetupCompileBefore ("CustomStepAfterMark.dll", new[] { "Dependencies/PreserveMethodsSubStep.cs" }, new[] { "illink.dll", "Mono.Cecil.dll", "netstandard.dll" })]
[SetupLinkerArgument ("--custom-step", "+MarkStep:PreserveMethodsSubStep,CustomStepAfterMark.dll")]
public class CustomStepCanPreserveMethodsAfterMark
diff --git a/test/Mono.Linker.Tests.Cases/Extensibility/CustomStepCanPreserveMethodsBeforeMark.cs b/test/Mono.Linker.Tests.Cases/Extensibility/CustomStepCanPreserveMethodsBeforeMark.cs
index d479cfcc9..409e23d7e 100644
--- a/test/Mono.Linker.Tests.Cases/Extensibility/CustomStepCanPreserveMethodsBeforeMark.cs
+++ b/test/Mono.Linker.Tests.Cases/Extensibility/CustomStepCanPreserveMethodsBeforeMark.cs
@@ -3,9 +3,6 @@ using Mono.Linker.Tests.Cases.Expectations.Metadata;
namespace Mono.Linker.Tests.Cases.Extensibility
{
-#if !NETCOREAPP
- [IgnoreTestCase ("Specific to the illink build")]
-#endif
[SetupCompileBefore ("CustomStepBeforeMark.dll", new[] { "Dependencies/PreserveMethodsSubStep.cs" }, new[] { "illink.dll", "Mono.Cecil.dll", "netstandard.dll" })]
[SetupLinkerArgument ("--custom-step", "-MarkStep:PreserveMethodsSubStep,CustomStepBeforeMark.dll")]
public class CustomStepCanPreserveMethodsBeforeMark
diff --git a/test/Mono.Linker.Tests.Cases/Extensibility/SubStepDispatcherFields.cs b/test/Mono.Linker.Tests.Cases/Extensibility/SubStepDispatcherFields.cs
index 74fb34927..f84b1facd 100644
--- a/test/Mono.Linker.Tests.Cases/Extensibility/SubStepDispatcherFields.cs
+++ b/test/Mono.Linker.Tests.Cases/Extensibility/SubStepDispatcherFields.cs
@@ -3,9 +3,6 @@ using Mono.Linker.Tests.Cases.Expectations.Metadata;
namespace Mono.Linker.Tests.Cases.Extensibility
{
-#if !NETCOREAPP
- [IgnoreTestCase ("Specific to the illink build")]
-#endif
[SetupCompileBefore ("MyDispatcherFields.dll", new[] { "Dependencies/MyDispatcher.cs", "Dependencies/CustomSubStepFields.cs" }, new[] { "illink.dll", "Mono.Cecil.dll", "netstandard.dll" })]
[SetupLinkerArgument ("--custom-step", "-MarkStep:MyDispatcher,MyDispatcherFields.dll")]
public class SubStepDispatcherFields
diff --git a/test/Mono.Linker.Tests.Cases/Extensibility/SubStepDispatcherUsage.cs b/test/Mono.Linker.Tests.Cases/Extensibility/SubStepDispatcherUsage.cs
index 7dbdbc994..20ab3b356 100644
--- a/test/Mono.Linker.Tests.Cases/Extensibility/SubStepDispatcherUsage.cs
+++ b/test/Mono.Linker.Tests.Cases/Extensibility/SubStepDispatcherUsage.cs
@@ -3,9 +3,6 @@ using Mono.Linker.Tests.Cases.Expectations.Metadata;
namespace Mono.Linker.Tests.Cases.Extensibility
{
-#if !NETCOREAPP
- [IgnoreTestCase ("Specific to the illink build")]
-#endif
[SetupCompileBefore ("MyDispatcherUsage.dll", new[] { "Dependencies/MyDispatcher.cs", "Dependencies/CustomSubStep.cs" }, new[] { "illink.dll", "Mono.Cecil.dll", "netstandard.dll" })]
[SetupLinkerArgument ("--custom-step", "-MarkStep:MyDispatcher,MyDispatcherUsage.dll")]
public class SubStepDispatcherUsage
diff --git a/test/Mono.Linker.Tests.Cases/FeatureSettings/FeatureDescriptors.cs b/test/Mono.Linker.Tests.Cases/FeatureSettings/FeatureDescriptors.cs
index d70c2eca4..5023372e6 100644
--- a/test/Mono.Linker.Tests.Cases/FeatureSettings/FeatureDescriptors.cs
+++ b/test/Mono.Linker.Tests.Cases/FeatureSettings/FeatureDescriptors.cs
@@ -4,9 +4,7 @@ using Mono.Linker.Tests.Cases.Expectations.Metadata;
namespace Mono.Linker.Tests.Cases.FeatureSettings
{
-#if !NETCOREAPP
- [IgnoreTestCase ("Feature settings in descriptors are not supported on Mono.")]
-#endif
+ [TestCaseRequirements (TestRunCharacteristics.TargetingNetCore, "Feature settings in descriptors are not supported on Mono.")]
[SetupLinkerDescriptorFile ("FeatureDescriptorsGlobalTrue.xml")]
[SetupLinkerDescriptorFile ("FeatureDescriptorsGlobalFalse.xml")]
[SetupLinkerDescriptorFile ("FeatureDescriptors.xml")]
diff --git a/test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/DefaultInterfaceMethods/DefaultInterfaceMethodCallIntoClass.cs b/test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/DefaultInterfaceMethods/DefaultInterfaceMethodCallIntoClass.cs
index c5e8e3ee7..c09e07322 100644
--- a/test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/DefaultInterfaceMethods/DefaultInterfaceMethodCallIntoClass.cs
+++ b/test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/DefaultInterfaceMethods/DefaultInterfaceMethodCallIntoClass.cs
@@ -6,19 +6,17 @@ using Mono.Linker.Tests.Cases.Expectations.Metadata;
namespace Mono.Linker.Tests.Cases.Inheritance.Interfaces.DefaultInterfaceMethods
{
-#if !NETCOREAPP
- [IgnoreTestCase ("Requires support for default interface methods")]
-#endif
+ [TestCaseRequirements (TestRunCharacteristics.SupportsDefaultInterfaceMethods, "Requires support for default interface methods")]
class DefaultInterfaceMethodCallIntoClass
{
public static void Main ()
{
-#if NETCOREAPP
+#if SUPPORTS_DEFAULT_INTERFACE_METHODS
((IBase) new Derived ()).Frob ();
#endif
}
-#if NETCOREAPP
+#if SUPPORTS_DEFAULT_INTERFACE_METHODS
[Kept]
interface IBase
{
diff --git a/test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/DefaultInterfaceMethods/GenericDefaultInterfaceMethods.cs b/test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/DefaultInterfaceMethods/GenericDefaultInterfaceMethods.cs
index 6e4d6f1ab..4584297ad 100644
--- a/test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/DefaultInterfaceMethods/GenericDefaultInterfaceMethods.cs
+++ b/test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/DefaultInterfaceMethods/GenericDefaultInterfaceMethods.cs
@@ -5,20 +5,18 @@ using Mono.Linker.Tests.Cases.Expectations.Assertions;
namespace Mono.Linker.Tests.Cases.Inheritance.Interfaces.DefaultInterfaceMethods
{
-#if !NETCOREAPP
- [IgnoreTestCase ("Requires support for default interface methods")]
-#endif
+ [TestCaseRequirements (TestRunCharacteristics.SupportsDefaultInterfaceMethods, "Requires support for default interface methods")]
class GenericDefaultInterfaceMethods
{
public static void Main ()
{
-#if NETCOREAPP
+#if SUPPORTS_DEFAULT_INTERFACE_METHODS
((IFoo<int>) new Bar ()).Method (12);
((IFoo<int>) new Baz ()).Method (12);
#endif
}
-#if NETCOREAPP
+#if SUPPORTS_DEFAULT_INTERFACE_METHODS
[Kept]
interface IFoo<T>
{
diff --git a/test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/DefaultInterfaceMethods/InterfaceWithAttributeOnImplementation.cs b/test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/DefaultInterfaceMethods/InterfaceWithAttributeOnImplementation.cs
index d280d090d..cd6553578 100644
--- a/test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/DefaultInterfaceMethods/InterfaceWithAttributeOnImplementation.cs
+++ b/test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/DefaultInterfaceMethods/InterfaceWithAttributeOnImplementation.cs
@@ -7,9 +7,7 @@ using Mono.Linker.Tests.Cases.Expectations.Metadata;
namespace Mono.Linker.Tests.Cases.Inheritance.Interfaces.DefaultInterfaceMethods
{
[SetupLinkerArgument ("--skip-unresolved", "true")]
-#if !NETCOREAPP
- [IgnoreTestCase ("Only for .NET Core for some reason")]
-#endif
+ [TestCaseRequirements (TestRunCharacteristics.SupportsDefaultInterfaceMethods, "Requires support for default interface methods")]
[Define ("IL_ASSEMBLY_AVAILABLE")]
[SetupCompileBefore ("library.dll", new[] { "Dependencies/InterfaceWithAttributeOnImpl.il" })]
class InterfaceWithAttributeOnImplementation
diff --git a/test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/DefaultInterfaceMethods/SimpleDefaultInterfaceMethod.cs b/test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/DefaultInterfaceMethods/SimpleDefaultInterfaceMethod.cs
index 7838085d3..08fafadb2 100644
--- a/test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/DefaultInterfaceMethods/SimpleDefaultInterfaceMethod.cs
+++ b/test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/DefaultInterfaceMethods/SimpleDefaultInterfaceMethod.cs
@@ -6,19 +6,17 @@ using Mono.Linker.Tests.Cases.Expectations.Metadata;
namespace Mono.Linker.Tests.Cases.Inheritance.Interfaces.DefaultInterfaceMethods
{
-#if !NETCOREAPP
- [IgnoreTestCase ("Requires support for default interface methods")]
-#endif
+ [TestCaseRequirements (TestRunCharacteristics.SupportsDefaultInterfaceMethods, "Requires support for default interface methods")]
class SimpleDefaultInterfaceMethod
{
public static void Main ()
{
-#if NETCOREAPP
+#if SUPPORTS_DEFAULT_INTERFACE_METHODS
((IBasic) new Basic ()).DoSomething ();
#endif
}
-#if NETCOREAPP
+#if SUPPORTS_DEFAULT_INTERFACE_METHODS
[Kept]
interface IBasic
{
diff --git a/test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/DefaultInterfaceMethods/UnusedDefaultInterfaceImplementation.cs b/test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/DefaultInterfaceMethods/UnusedDefaultInterfaceImplementation.cs
index 15114d3c5..46ed48963 100644
--- a/test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/DefaultInterfaceMethods/UnusedDefaultInterfaceImplementation.cs
+++ b/test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/DefaultInterfaceMethods/UnusedDefaultInterfaceImplementation.cs
@@ -5,19 +5,17 @@ using Mono.Linker.Tests.Cases.Expectations.Assertions;
namespace Mono.Linker.Tests.Cases.Inheritance.Interfaces.DefaultInterfaceMethods
{
-#if !NETCOREAPP
- [IgnoreTestCase ("Requires support for default interface methods")]
-#endif
+ [TestCaseRequirements (TestRunCharacteristics.SupportsDefaultInterfaceMethods, "Requires support for default interface methods")]
class UnusedDefaultInterfaceImplementation
{
public static void Main ()
{
-#if NETCOREAPP
+#if SUPPORTS_DEFAULT_INTERFACE_METHODS
((IFoo) new Foo ()).InterfaceMethod ();
#endif
}
-#if NETCOREAPP
+#if SUPPORTS_DEFAULT_INTERFACE_METHODS
[Kept]
interface IFoo
{
diff --git a/test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/OnReferenceType/UnusedComInterfaceIsRemovedWhenComFeatureExcluded.cs b/test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/OnReferenceType/UnusedComInterfaceIsRemovedWhenComFeatureExcluded.cs
index 3f0d5b8ca..35afe034f 100644
--- a/test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/OnReferenceType/UnusedComInterfaceIsRemovedWhenComFeatureExcluded.cs
+++ b/test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/OnReferenceType/UnusedComInterfaceIsRemovedWhenComFeatureExcluded.cs
@@ -4,9 +4,7 @@ using Mono.Linker.Tests.Cases.Expectations.Metadata;
namespace Mono.Linker.Tests.Cases.Inheritance.Interfaces.OnReferenceType
{
-#if NETCOREAPP
- [IgnoreTestCase ("--exclude-feature is not supported on .NET Core")]
-#endif
+ [TestCaseRequirements (TestRunCharacteristics.TargetingNetFramework, "--exclude-feature is not supported on .NET Core")]
[SetupLinkerArgument ("--exclude-feature", "com")]
public class UnusedComInterfaceIsRemovedWhenComFeatureExcluded
{
diff --git a/test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/StaticInterfaceMethods/GenericsBasic_Delegate.cs b/test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/StaticInterfaceMethods/GenericsBasic_Delegate.cs
index d49454468..0b41b8034 100644
--- a/test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/StaticInterfaceMethods/GenericsBasic_Delegate.cs
+++ b/test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/StaticInterfaceMethods/GenericsBasic_Delegate.cs
@@ -7,9 +7,7 @@ using Mono.Linker.Tests.Cases.Expectations.Metadata;
namespace Mono.Linker.Tests.Cases.Inheritance.Interfaces.StaticInterfaceMethods
{
[SetupLinkerArgument ("--skip-unresolved", "true")]
-#if !NETCOREAPP
- [IgnoreTestCase("Only for .NET Core for some reason")]
-#endif
+ [TestCaseRequirements (TestRunCharacteristics.SupportsStaticInterfaceMethods, "Requires a framework that supports static interface methods")]
[Define ("IL_ASSEMBLY_AVAILABLE")]
[SetupCompileBefore ("library.dll", new[] { "Dependencies/GenericsBasic_Delegate.il" })]
[KeptTypeInAssembly ("library.dll", "IFaceNonGeneric")]
diff --git a/test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/StaticInterfaceMethods/GenericsBasic_Direct.cs b/test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/StaticInterfaceMethods/GenericsBasic_Direct.cs
index a59472989..3c3de21e2 100644
--- a/test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/StaticInterfaceMethods/GenericsBasic_Direct.cs
+++ b/test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/StaticInterfaceMethods/GenericsBasic_Direct.cs
@@ -7,9 +7,7 @@ using Mono.Linker.Tests.Cases.Expectations.Metadata;
namespace Mono.Linker.Tests.Cases.Inheritance.Interfaces.StaticInterfaceMethods
{
[SetupLinkerArgument ("--skip-unresolved", "true")]
-#if !NETCOREAPP
- [IgnoreTestCase("Only for .NET Core for some reason")]
-#endif
+ [TestCaseRequirements (TestRunCharacteristics.SupportsStaticInterfaceMethods, "Requires a framework that supports static interface methods")]
[Define ("IL_ASSEMBLY_AVAILABLE")]
[SetupCompileBefore ("library.dll", new[] { "Dependencies/GenericsBasic_Direct.il" })]
[KeptTypeInAssembly ("library.dll", "IFaceNonGeneric")]
diff --git a/test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/StaticInterfaceMethods/GenericsBasic_Ldftn.cs b/test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/StaticInterfaceMethods/GenericsBasic_Ldftn.cs
index 66b6932e8..2ccdb9ab9 100644
--- a/test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/StaticInterfaceMethods/GenericsBasic_Ldftn.cs
+++ b/test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/StaticInterfaceMethods/GenericsBasic_Ldftn.cs
@@ -7,9 +7,7 @@ using Mono.Linker.Tests.Cases.Expectations.Metadata;
namespace Mono.Linker.Tests.Cases.Inheritance.Interfaces.StaticInterfaceMethods
{
[SetupLinkerArgument ("--skip-unresolved", "true")]
-#if !NETCOREAPP
- [IgnoreTestCase("Only for .NET Core for some reason")]
-#endif
+ [TestCaseRequirements (TestRunCharacteristics.SupportsStaticInterfaceMethods, "Requires a framework that supports static interface methods")]
[Define ("IL_ASSEMBLY_AVAILABLE")]
[SetupCompileBefore ("library.dll", new[] { "Dependencies/GenericsBasic_Ldftn.il" })]
[KeptTypeInAssembly ("library.dll", "IFaceNonGeneric")]
diff --git a/test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/StaticInterfaceMethods/GenericsFull.cs b/test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/StaticInterfaceMethods/GenericsFull.cs
index 2361b535c..6bf22b528 100644
--- a/test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/StaticInterfaceMethods/GenericsFull.cs
+++ b/test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/StaticInterfaceMethods/GenericsFull.cs
@@ -7,9 +7,7 @@ using Mono.Linker.Tests.Cases.Expectations.Metadata;
namespace Mono.Linker.Tests.Cases.Inheritance.Interfaces.StaticInterfaceMethods
{
[SetupLinkerArgument ("--skip-unresolved", "true")]
-#if !NETCOREAPP
- [IgnoreTestCase("Only for .NET Core for some reason")]
-#endif
+ [TestCaseRequirements (TestRunCharacteristics.SupportsStaticInterfaceMethods, "Requires a framework that supports static interface methods")]
[Define ("IL_ASSEMBLY_AVAILABLE")]
[SetupCompileBefore ("library.dll", new[] { "Dependencies/GenericsFull.il" })]
[KeptTypeInAssembly ("library.dll", "IFaceNonGeneric")]
diff --git a/test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/StaticInterfaceMethods/TypeHierarchyBasic.cs b/test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/StaticInterfaceMethods/TypeHierarchyBasic.cs
index 15c89c6ce..b5a73ab1b 100644
--- a/test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/StaticInterfaceMethods/TypeHierarchyBasic.cs
+++ b/test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/StaticInterfaceMethods/TypeHierarchyBasic.cs
@@ -7,9 +7,7 @@ using Mono.Linker.Tests.Cases.Expectations.Metadata;
namespace Mono.Linker.Tests.Cases.Inheritance.Interfaces.StaticInterfaceMethods
{
[SetupLinkerArgument ("--skip-unresolved", "true")]
-#if !NETCOREAPP
- [IgnoreTestCase("Only for .NET Core for some reason")]
-#endif
+ [TestCaseRequirements (TestRunCharacteristics.SupportsStaticInterfaceMethods, "Requires a framework that supports static interface methods")]
[Define ("IL_ASSEMBLY_AVAILABLE")]
[SetupCompileBefore ("library.dll", new[] { "Dependencies/TypeHierarchyBasic.il" })]
[KeptMemberInAssembly ("library.dll", "InterfaceScenario1", "Method()")]
diff --git a/test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/StaticInterfaceMethods/TypeHierarchyFull.cs b/test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/StaticInterfaceMethods/TypeHierarchyFull.cs
index 201a09e31..24750e982 100644
--- a/test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/StaticInterfaceMethods/TypeHierarchyFull.cs
+++ b/test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/StaticInterfaceMethods/TypeHierarchyFull.cs
@@ -7,9 +7,7 @@ using Mono.Linker.Tests.Cases.Expectations.Metadata;
namespace Mono.Linker.Tests.Cases.Inheritance.Interfaces.StaticInterfaceMethods
{
[SetupLinkerArgument ("--skip-unresolved", "true")]
-#if !NETCOREAPP
- [IgnoreTestCase("Only for .NET Core for some reason")]
-#endif
+ [TestCaseRequirements (TestRunCharacteristics.SupportsStaticInterfaceMethods, "Requires a framework that supports static interface methods")]
[Define ("IL_ASSEMBLY_AVAILABLE")]
[SetupCompileBefore ("library.dll", new[] { "Dependencies/TypeHierarchyFull.il" })]
diff --git a/test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/StaticInterfaceMethods/VarianceBasic.cs b/test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/StaticInterfaceMethods/VarianceBasic.cs
index 35c3fadde..414290e39 100644
--- a/test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/StaticInterfaceMethods/VarianceBasic.cs
+++ b/test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/StaticInterfaceMethods/VarianceBasic.cs
@@ -7,9 +7,7 @@ using Mono.Linker.Tests.Cases.Expectations.Metadata;
namespace Mono.Linker.Tests.Cases.Inheritance.Interfaces.StaticInterfaceMethods
{
[SetupLinkerArgument ("--skip-unresolved", "true")]
-#if !NETCOREAPP
- [IgnoreTestCase("Only for .NET Core for some reason")]
-#endif
+ [TestCaseRequirements (TestRunCharacteristics.SupportsStaticInterfaceMethods, "Requires a framework that supports static interface methods")]
[Define ("IL_ASSEMBLY_AVAILABLE")]
[SetupCompileBefore ("library.dll", new[] { "Dependencies/VarianceBasic.il" })]
diff --git a/test/Mono.Linker.Tests.Cases/Libraries/CopyUsedAssemblyWithMainEntryRoot.cs b/test/Mono.Linker.Tests.Cases/Libraries/CopyUsedAssemblyWithMainEntryRoot.cs
index 7373fa05c..1aa6bdace 100644
--- a/test/Mono.Linker.Tests.Cases/Libraries/CopyUsedAssemblyWithMainEntryRoot.cs
+++ b/test/Mono.Linker.Tests.Cases/Libraries/CopyUsedAssemblyWithMainEntryRoot.cs
@@ -4,9 +4,6 @@ using Mono.Linker.Tests.Cases.Libraries.Dependencies;
namespace Mono.Linker.Tests.Cases.Libraries
{
-#if !NETCOREAPP
- [IgnoreTestCase ("Correctly handled by illink only")]
-#endif
[Kept]
[KeptMember (".ctor()")]
[SetupLinkerAction ("copyused", "test")]
diff --git a/test/Mono.Linker.Tests.Cases/Libraries/CopyUsedAssemblyWithPublicRoots.cs b/test/Mono.Linker.Tests.Cases/Libraries/CopyUsedAssemblyWithPublicRoots.cs
index 32f5cae83..b3e7bca6b 100644
--- a/test/Mono.Linker.Tests.Cases/Libraries/CopyUsedAssemblyWithPublicRoots.cs
+++ b/test/Mono.Linker.Tests.Cases/Libraries/CopyUsedAssemblyWithPublicRoots.cs
@@ -3,9 +3,6 @@ using Mono.Linker.Tests.Cases.Expectations.Metadata;
namespace Mono.Linker.Tests.Cases.Libraries
{
-#if !NETCOREAPP
- [IgnoreTestCase ("Correctly handled by illink only")]
-#endif
[Kept]
[KeptMember (".ctor()")]
[SetupLinkerAction ("copyused", "test")]
diff --git a/test/Mono.Linker.Tests.Cases/Libraries/RootLibraryInternalsWithIVT.cs b/test/Mono.Linker.Tests.Cases/Libraries/RootLibraryInternalsWithIVT.cs
index 4e96cb92c..4e0fa2deb 100644
--- a/test/Mono.Linker.Tests.Cases/Libraries/RootLibraryInternalsWithIVT.cs
+++ b/test/Mono.Linker.Tests.Cases/Libraries/RootLibraryInternalsWithIVT.cs
@@ -10,9 +10,6 @@ using Mono.Linker.Tests.Cases.Expectations.Metadata;
namespace Mono.Linker.Tests.Cases.Libraries
{
-#if !NETCOREAPP
- [IgnoreTestCase ("Build with illink")]
-#endif
[Kept]
[KeptMember (".ctor()")]
[SetupLinkerLinkPublicAndFamily]
diff --git a/test/Mono.Linker.Tests.Cases/Libraries/RootLibraryVisibleAndDescriptor.cs b/test/Mono.Linker.Tests.Cases/Libraries/RootLibraryVisibleAndDescriptor.cs
index 0535e45ce..0f3309358 100644
--- a/test/Mono.Linker.Tests.Cases/Libraries/RootLibraryVisibleAndDescriptor.cs
+++ b/test/Mono.Linker.Tests.Cases/Libraries/RootLibraryVisibleAndDescriptor.cs
@@ -4,9 +4,6 @@ using Mono.Linker.Tests.Cases.Expectations.Metadata;
namespace Mono.Linker.Tests.Cases.Libraries
{
-#if !NETCOREAPP
- [IgnoreTestCase ("Build with illink")]
-#endif
[Kept]
[KeptMember (".ctor()")]
[SetupLinkerLinkPublicAndFamily]
diff --git a/test/Mono.Linker.Tests.Cases/Libraries/RootLibraryVisibleForwarders.cs b/test/Mono.Linker.Tests.Cases/Libraries/RootLibraryVisibleForwarders.cs
index c82831501..09e3fed90 100644
--- a/test/Mono.Linker.Tests.Cases/Libraries/RootLibraryVisibleForwarders.cs
+++ b/test/Mono.Linker.Tests.Cases/Libraries/RootLibraryVisibleForwarders.cs
@@ -8,9 +8,6 @@ using Mono.Linker.Tests.Cases.Expectations.Metadata;
namespace Mono.Linker.Tests.Cases.Libraries
{
-#if !NETCOREAPP
- [IgnoreTestCase ("Build with illink")]
-#endif
[SetupCompileBefore ("library.dll", new[] { "Dependencies/RootLibraryVisibleForwarders_Lib.cs" })]
[SetupLinkerLinkPublicAndFamily]
[Define ("RootLibraryVisibleForwarders")]
diff --git a/test/Mono.Linker.Tests.Cases/Libraries/RootLibraryVisibleForwardersWithoutReference.cs b/test/Mono.Linker.Tests.Cases/Libraries/RootLibraryVisibleForwardersWithoutReference.cs
index 877d2a289..bf566ead6 100644
--- a/test/Mono.Linker.Tests.Cases/Libraries/RootLibraryVisibleForwardersWithoutReference.cs
+++ b/test/Mono.Linker.Tests.Cases/Libraries/RootLibraryVisibleForwardersWithoutReference.cs
@@ -8,9 +8,6 @@ using Mono.Linker.Tests.Cases.Expectations.Metadata;
namespace Mono.Linker.Tests.Cases.Libraries
{
-#if !NETCOREAPP
- [IgnoreTestCase ("Build with illink")]
-#endif
[SetupCompileBefore ("library.dll", new[] { "Dependencies/RootLibraryVisibleForwarders_Lib.cs" }, outputSubFolder: "isolated")]
[SetupLinkerLinkPublicAndFamily]
[SetupLinkerArgument ("-a", "isolated/library.dll", "visible")] // Checks for no-eager exported type resolving
diff --git a/test/Mono.Linker.Tests.Cases/LinkXml/CanPreserveExcludedFeatureCom.cs b/test/Mono.Linker.Tests.Cases/LinkXml/CanPreserveExcludedFeatureCom.cs
index 223741227..169da0b98 100644
--- a/test/Mono.Linker.Tests.Cases/LinkXml/CanPreserveExcludedFeatureCom.cs
+++ b/test/Mono.Linker.Tests.Cases/LinkXml/CanPreserveExcludedFeatureCom.cs
@@ -5,9 +5,7 @@ using Mono.Linker.Tests.Cases.Expectations.Metadata;
namespace Mono.Linker.Tests.Cases.LinkXml
{
-#if NETCOREAPP
- [IgnoreTestCase ("--exclude-feature is not supported on .NET Core")]
-#endif
+ [TestCaseRequirements (TestRunCharacteristics.TargetingNetFramework, "--exclude-feature is not supported on .NET Core")]
[SetupLinkerArgument ("--exclude-feature", "com")]
[SetupLinkerDescriptorFile ("CanPreserveExcludedFeatureCom.xml")]
public class CanPreserveExcludedFeatureCom
diff --git a/test/Mono.Linker.Tests.Cases/LinkXml/FeatureExclude/OnAssembly.cs b/test/Mono.Linker.Tests.Cases/LinkXml/FeatureExclude/OnAssembly.cs
index 7cc91f8f6..6f53fcf0a 100644
--- a/test/Mono.Linker.Tests.Cases/LinkXml/FeatureExclude/OnAssembly.cs
+++ b/test/Mono.Linker.Tests.Cases/LinkXml/FeatureExclude/OnAssembly.cs
@@ -4,9 +4,7 @@ using Mono.Linker.Tests.Cases.LinkXml.FeatureExclude.Dependencies;
namespace Mono.Linker.Tests.Cases.LinkXml.FeatureExclude
{
-#if NETCOREAPP
- [IgnoreTestCase ("--exclude-feature is not supported on .NET Core")]
-#endif
+ [TestCaseRequirements (TestRunCharacteristics.TargetingNetFramework, "--exclude-feature is not supported on .NET Core")]
[SetupLinkerArgument ("--exclude-feature", "one")]
[SetupCompileBefore ("library1.dll", new[] { typeof (OnAssembly_Lib1) })]
[SetupCompileBefore ("library2.dll", new[] { typeof (OnAssembly_Lib2) })]
diff --git a/test/Mono.Linker.Tests.Cases/LinkXml/FeatureExclude/OnEvent.cs b/test/Mono.Linker.Tests.Cases/LinkXml/FeatureExclude/OnEvent.cs
index ad5116cbf..47ae4e649 100644
--- a/test/Mono.Linker.Tests.Cases/LinkXml/FeatureExclude/OnEvent.cs
+++ b/test/Mono.Linker.Tests.Cases/LinkXml/FeatureExclude/OnEvent.cs
@@ -4,9 +4,7 @@ using Mono.Linker.Tests.Cases.Expectations.Metadata;
namespace Mono.Linker.Tests.Cases.LinkXml.FeatureExclude
{
-#if NETCOREAPP
- [IgnoreTestCase ("--exclude-feature is not supported on .NET Core")]
-#endif
+ [TestCaseRequirements (TestRunCharacteristics.TargetingNetFramework, "--exclude-feature is not supported on .NET Core")]
[SetupLinkerArgument ("--exclude-feature", "one")]
[SetupLinkerDescriptorFile ("OnEvent.xml")]
public class OnEvent
diff --git a/test/Mono.Linker.Tests.Cases/LinkXml/FeatureExclude/OnField.cs b/test/Mono.Linker.Tests.Cases/LinkXml/FeatureExclude/OnField.cs
index 319e53092..0fcea8b37 100644
--- a/test/Mono.Linker.Tests.Cases/LinkXml/FeatureExclude/OnField.cs
+++ b/test/Mono.Linker.Tests.Cases/LinkXml/FeatureExclude/OnField.cs
@@ -3,9 +3,7 @@ using Mono.Linker.Tests.Cases.Expectations.Metadata;
namespace Mono.Linker.Tests.Cases.LinkXml.FeatureExclude
{
-#if NETCOREAPP
- [IgnoreTestCase ("--exclude-feature is not supported on .NET Core")]
-#endif
+ [TestCaseRequirements (TestRunCharacteristics.TargetingNetFramework, "--exclude-feature is not supported on .NET Core")]
[SetupLinkerArgument ("--exclude-feature", "one")]
[SetupLinkerDescriptorFile ("OnField.xml")]
public class OnField
diff --git a/test/Mono.Linker.Tests.Cases/LinkXml/FeatureExclude/OnMethod.cs b/test/Mono.Linker.Tests.Cases/LinkXml/FeatureExclude/OnMethod.cs
index a59b3d8f0..503a5a483 100644
--- a/test/Mono.Linker.Tests.Cases/LinkXml/FeatureExclude/OnMethod.cs
+++ b/test/Mono.Linker.Tests.Cases/LinkXml/FeatureExclude/OnMethod.cs
@@ -3,9 +3,7 @@ using Mono.Linker.Tests.Cases.Expectations.Metadata;
namespace Mono.Linker.Tests.Cases.LinkXml.FeatureExclude
{
-#if NETCOREAPP
- [IgnoreTestCase ("--exclude-feature is not supported on .NET Core")]
-#endif
+ [TestCaseRequirements (TestRunCharacteristics.TargetingNetFramework, "--exclude-feature is not supported on .NET Core")]
[SetupLinkerArgument ("--exclude-feature", "one")]
[SetupLinkerDescriptorFile ("OnMethod.xml")]
public class OnMethod
diff --git a/test/Mono.Linker.Tests.Cases/LinkXml/FeatureExclude/OnProperty.cs b/test/Mono.Linker.Tests.Cases/LinkXml/FeatureExclude/OnProperty.cs
index 59618d9ba..eae178bae 100644
--- a/test/Mono.Linker.Tests.Cases/LinkXml/FeatureExclude/OnProperty.cs
+++ b/test/Mono.Linker.Tests.Cases/LinkXml/FeatureExclude/OnProperty.cs
@@ -3,9 +3,7 @@ using Mono.Linker.Tests.Cases.Expectations.Metadata;
namespace Mono.Linker.Tests.Cases.LinkXml.FeatureExclude
{
-#if NETCOREAPP
- [IgnoreTestCase ("--exclude-feature is not supported on .NET Core")]
-#endif
+ [TestCaseRequirements (TestRunCharacteristics.TargetingNetFramework, "--exclude-feature is not supported on .NET Core")]
[SetupLinkerArgument ("--exclude-feature", "one")]
[SetupLinkerDescriptorFile ("OnProperty.xml")]
public class OnProperty
diff --git a/test/Mono.Linker.Tests.Cases/LinkXml/FeatureExclude/OnType.cs b/test/Mono.Linker.Tests.Cases/LinkXml/FeatureExclude/OnType.cs
index b789958f6..d21e10c4e 100644
--- a/test/Mono.Linker.Tests.Cases/LinkXml/FeatureExclude/OnType.cs
+++ b/test/Mono.Linker.Tests.Cases/LinkXml/FeatureExclude/OnType.cs
@@ -3,9 +3,7 @@ using Mono.Linker.Tests.Cases.Expectations.Metadata;
namespace Mono.Linker.Tests.Cases.LinkXml.FeatureExclude
{
-#if NETCOREAPP
- [IgnoreTestCase ("--exclude-feature is not supported on .NET Core")]
-#endif
+ [TestCaseRequirements (TestRunCharacteristics.TargetingNetFramework, "--exclude-feature is not supported on .NET Core")]
[SetupLinkerArgument ("--exclude-feature", "one")]
[SetupLinkerDescriptorFile ("OnType.xml")]
public class OnType
diff --git a/test/Mono.Linker.Tests.Cases/Logging/CommonLogs.cs b/test/Mono.Linker.Tests.Cases/Logging/CommonLogs.cs
index 1ced566df..a65685c90 100644
--- a/test/Mono.Linker.Tests.Cases/Logging/CommonLogs.cs
+++ b/test/Mono.Linker.Tests.Cases/Logging/CommonLogs.cs
@@ -3,12 +3,7 @@ using Mono.Linker.Tests.Cases.Expectations.Metadata;
namespace Mono.Linker.Tests.Cases.Logging
{
-
-#if !NETCOREAPP
- [IgnoreTestCase ("Can be enabled once MonoBuild produces a dll from which we can grab the types in the Mono.Linker namespace.")]
-#else
[SetupCompileBefore ("LogStep.dll", new[] { "Dependencies/LogStep.cs" }, new[] { "illink.dll", "Mono.Cecil.dll" })]
-#endif
[SetupLinkerArgument ("--custom-step", "Log.LogStep,LogStep.dll")]
[SetupLinkerArgument ("--verbose")]
[LogContains ("ILLink: error IL6001: Error")]
diff --git a/test/Mono.Linker.Tests.Cases/Mono.Linker.Tests.Cases.csproj b/test/Mono.Linker.Tests.Cases/Mono.Linker.Tests.Cases.csproj
index 71a33ea86..29cde9ab6 100644
--- a/test/Mono.Linker.Tests.Cases/Mono.Linker.Tests.Cases.csproj
+++ b/test/Mono.Linker.Tests.Cases/Mono.Linker.Tests.Cases.csproj
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <DefineConstants>$(DefineConstants);INCLUDE_EXPECTATIONS</DefineConstants>
+ <DefineConstants>$(DefineConstants);INCLUDE_EXPECTATIONS;SUPPORTS_DEFAULT_INTERFACE_METHODS</DefineConstants>
<WarningLevel>0</WarningLevel>
<AnalysisLevel>0</AnalysisLevel>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
diff --git a/test/Mono.Linker.Tests.Cases/PreserveDependencies/PreserveDependencyDeprecated.cs b/test/Mono.Linker.Tests.Cases/PreserveDependencies/PreserveDependencyDeprecated.cs
index 90bd398d4..20d204586 100644
--- a/test/Mono.Linker.Tests.Cases/PreserveDependencies/PreserveDependencyDeprecated.cs
+++ b/test/Mono.Linker.Tests.Cases/PreserveDependencies/PreserveDependencyDeprecated.cs
@@ -4,9 +4,7 @@ using Mono.Linker.Tests.Cases.Expectations.Metadata;
namespace Mono.Linker.Tests.Cases.PreserveDependencies
{
-#if !NETCOREAPP
- [IgnoreTestCase ("This test checks that PreserveDependency correctly issues a warning on .NET Core where it is deprecated.")]
-#endif
+ [TestCaseRequirements (TestRunCharacteristics.TargetingNetCore, "This test checks that PreserveDependency correctly issues a warning on .NET Core where it is deprecated.")]
[SetupCompileBefore ("FakeSystemAssembly.dll", new[] { "Dependencies/PreserveDependencyAttribute.cs" })]
class PreserveDependencyDeprecated
{
diff --git a/test/Mono.Linker.Tests.Cases/References/ReferencesAreRemovedWhenAllUsagesAreRemoved.cs b/test/Mono.Linker.Tests.Cases/References/ReferencesAreRemovedWhenAllUsagesAreRemoved.cs
index 31f8502c7..045607bc9 100644
--- a/test/Mono.Linker.Tests.Cases/References/ReferencesAreRemovedWhenAllUsagesAreRemoved.cs
+++ b/test/Mono.Linker.Tests.Cases/References/ReferencesAreRemovedWhenAllUsagesAreRemoved.cs
@@ -5,9 +5,7 @@ using Mono.Linker.Tests.Cases.Expectations.Metadata;
namespace Mono.Linker.Tests.Cases.References
{
-#if NETCOREAPP
- [IgnoreTestCase ("Asserts are specific to .NET Framework")]
-#endif
+ [TestCaseRequirements (TestRunCharacteristics.TargetingNetFramework, "Asserts are specific to .NET Framework")]
[SetupLinkerTrimMode ("link")]
// Il8n & the blacklist step pollute the results with extra stuff that didn't need to be
// preserved for this test case so we need to disable them
diff --git a/test/Mono.Linker.Tests.Cases/Symbols/ReferenceWithMdbAndSymbolLinkingEnabled.cs b/test/Mono.Linker.Tests.Cases/Symbols/ReferenceWithMdbAndSymbolLinkingEnabled.cs
index faa78652c..c01959493 100644
--- a/test/Mono.Linker.Tests.Cases/Symbols/ReferenceWithMdbAndSymbolLinkingEnabled.cs
+++ b/test/Mono.Linker.Tests.Cases/Symbols/ReferenceWithMdbAndSymbolLinkingEnabled.cs
@@ -5,9 +5,7 @@ using Mono.Linker.Tests.Cases.Symbols.Dependencies;
namespace Mono.Linker.Tests.Cases.Symbols
{
-#if NETCOREAPP
- [IgnoreTestCase ("mdb files are not supported with .NET Core")]
-#endif
+ [TestCaseRequirements (TestRunCharacteristics.TargetingNetFramework, "mdb files are not supported with .NET Core")]
[Reference ("Dependencies/LibraryWithMdb/LibraryWithMdb.dll")]
[ReferenceDependency ("Dependencies/LibraryWithMdb/LibraryWithMdb.dll.mdb")]
[SetupLinkerLinkSymbols ("true")]
diff --git a/test/Mono.Linker.Tests.Cases/Symbols/ReferenceWithMdbAndSymbolLinkingEnabledAndDeterministicMvid.cs b/test/Mono.Linker.Tests.Cases/Symbols/ReferenceWithMdbAndSymbolLinkingEnabledAndDeterministicMvid.cs
index 6f7bff937..bb477b7b0 100644
--- a/test/Mono.Linker.Tests.Cases/Symbols/ReferenceWithMdbAndSymbolLinkingEnabledAndDeterministicMvid.cs
+++ b/test/Mono.Linker.Tests.Cases/Symbols/ReferenceWithMdbAndSymbolLinkingEnabledAndDeterministicMvid.cs
@@ -4,9 +4,7 @@ using Mono.Linker.Tests.Cases.Symbols.Dependencies;
namespace Mono.Linker.Tests.Cases.Symbols
{
-#if NETCOREAPP
- [IgnoreTestCase ("mdb files are not supported with .NET Core")]
-#endif
+ [TestCaseRequirements (TestRunCharacteristics.TargetingNetFramework, "mdb files are not supported with .NET Core")]
[Reference ("Dependencies/LibraryWithMdb/LibraryWithMdb.dll")]
[ReferenceDependency ("Dependencies/LibraryWithMdb/LibraryWithMdb.dll.mdb")]
[SetupLinkerLinkSymbols ("true")]
diff --git a/test/Mono.Linker.Tests.Cases/Symbols/ReferenceWithMdbAndSymbolLinkingEnabledAndNewMvid.cs b/test/Mono.Linker.Tests.Cases/Symbols/ReferenceWithMdbAndSymbolLinkingEnabledAndNewMvid.cs
index bf9c60540..68291c12b 100644
--- a/test/Mono.Linker.Tests.Cases/Symbols/ReferenceWithMdbAndSymbolLinkingEnabledAndNewMvid.cs
+++ b/test/Mono.Linker.Tests.Cases/Symbols/ReferenceWithMdbAndSymbolLinkingEnabledAndNewMvid.cs
@@ -4,9 +4,7 @@ using Mono.Linker.Tests.Cases.Symbols.Dependencies;
namespace Mono.Linker.Tests.Cases.Symbols
{
-#if NETCOREAPP
- [IgnoreTestCase ("mdb files are not supported with .NET Core")]
-#endif
+ [TestCaseRequirements (TestRunCharacteristics.TargetingNetFramework, "mdb files are not supported with .NET Core")]
[Reference ("Dependencies/LibraryWithMdb/LibraryWithMdb.dll")]
[ReferenceDependency ("Dependencies/LibraryWithMdb/LibraryWithMdb.dll.mdb")]
[SetupLinkerLinkSymbols ("true")]
diff --git a/test/Mono.Linker.Tests.Cases/Symbols/ReferenceWithMdbCopyActionAndSymbolLinkingEnabled.cs b/test/Mono.Linker.Tests.Cases/Symbols/ReferenceWithMdbCopyActionAndSymbolLinkingEnabled.cs
index af8638778..04eeb8452 100644
--- a/test/Mono.Linker.Tests.Cases/Symbols/ReferenceWithMdbCopyActionAndSymbolLinkingEnabled.cs
+++ b/test/Mono.Linker.Tests.Cases/Symbols/ReferenceWithMdbCopyActionAndSymbolLinkingEnabled.cs
@@ -4,9 +4,7 @@ using Mono.Linker.Tests.Cases.Symbols.Dependencies;
namespace Mono.Linker.Tests.Cases.Symbols
{
-#if NETCOREAPP
- [IgnoreTestCase ("mdb files are not supported with .NET Core")]
-#endif
+ [TestCaseRequirements (TestRunCharacteristics.TargetingNetFramework, "mdb files are not supported with .NET Core")]
[Reference ("Dependencies/LibraryWithMdb/LibraryWithMdb.dll")]
[ReferenceDependency ("Dependencies/LibraryWithMdb/LibraryWithMdb.dll.mdb")]
[SetupLinkerLinkSymbols ("true")]
diff --git a/test/Mono.Linker.Tests.Cases/Symbols/ReferenceWithPdbCopyActionAndSymbolLinkingEnabled.cs b/test/Mono.Linker.Tests.Cases/Symbols/ReferenceWithPdbCopyActionAndSymbolLinkingEnabled.cs
index e457b9952..f7b3e6864 100644
--- a/test/Mono.Linker.Tests.Cases/Symbols/ReferenceWithPdbCopyActionAndSymbolLinkingEnabled.cs
+++ b/test/Mono.Linker.Tests.Cases/Symbols/ReferenceWithPdbCopyActionAndSymbolLinkingEnabled.cs
@@ -4,13 +4,14 @@ using Mono.Linker.Tests.Cases.Symbols.Dependencies;
namespace Mono.Linker.Tests.Cases.Symbols
{
-#if NETCOREAPP && !WIN32
+#if !WIN32
// .NET Core type forwarders cause the assembly action to be
// changed from "copy" to "save" (to remove references to removed
// typeforwarders). However, saving the native PDB is only
// supported on windows.
- [IgnoreTestCase ("Only supported on Windows on .NET Core.")]
+ [IgnoreTestCase ("Only supported on Windows")]
#endif
+ [TestCaseRequirements (TestRunCharacteristics.TargetingNetFramework, "Only supported on Windows on .NET Framework.")]
[Reference ("Dependencies/LibraryWithPdb/LibraryWithPdb.dll")]
[ReferenceDependency ("Dependencies/LibraryWithPdb/LibraryWithPdb.pdb")]
[SetupLinkerLinkSymbols ("true")]
diff --git a/test/Mono.Linker.Tests.Cases/Symbols/ReferencesWithMixedSymbolTypesAndSymbolLinkingEnabled.cs b/test/Mono.Linker.Tests.Cases/Symbols/ReferencesWithMixedSymbolTypesAndSymbolLinkingEnabled.cs
index 0cc9358bc..646cbaf5e 100644
--- a/test/Mono.Linker.Tests.Cases/Symbols/ReferencesWithMixedSymbolTypesAndSymbolLinkingEnabled.cs
+++ b/test/Mono.Linker.Tests.Cases/Symbols/ReferencesWithMixedSymbolTypesAndSymbolLinkingEnabled.cs
@@ -6,11 +6,6 @@ using Mono.Linker.Tests.Cases.Symbols.Dependencies;
namespace Mono.Linker.Tests.Cases.Symbols
{
[SetupLinkerArgument ("--skip-unresolved", "true")]
-#if !NETCOREAPP
- [Reference ("Dependencies/LibraryWithMdb/LibraryWithMdb.dll")]
- [ReferenceDependency ("Dependencies/LibraryWithMdb/LibraryWithMdb.dll.mdb")]
-#endif
-
[Reference ("Dependencies/LibraryWithPdb/LibraryWithPdb.dll")]
[ReferenceDependency ("Dependencies/LibraryWithPdb/LibraryWithPdb.pdb")]
@@ -22,9 +17,6 @@ namespace Mono.Linker.Tests.Cases.Symbols
[SetupLinkerLinkSymbols ("true")]
[KeptSymbols ("test.exe")]
-#if !NETCOREAPP
- [KeptSymbols ("LibraryWithMdb.dll")]
-#endif
#if WIN32
[KeptSymbols ("LibraryWithPdb.dll")]
#else
@@ -34,12 +26,6 @@ namespace Mono.Linker.Tests.Cases.Symbols
[KeptSymbols ("LibraryWithEmbeddedPdbSymbols.dll")]
[KeptSymbols ("LibraryWithPortablePdbSymbols.dll")]
-
-#if !NETCOREAPP
- [KeptMemberInAssembly ("LibraryWithMdb.dll", typeof (LibraryWithMdb), "SomeMethod()")]
- [RemovedMemberInAssembly ("LibraryWithMdb.dll", typeof (LibraryWithMdb), "NotUsed()")]
-#endif
-
[KeptMemberInAssembly ("LibraryWithPdb.dll", typeof (LibraryWithPdb), "SomeMethod()")]
[RemovedMemberInAssembly ("LibraryWithPdb.dll", typeof (LibraryWithPdb), "NotUsed()")]
@@ -59,9 +45,6 @@ namespace Mono.Linker.Tests.Cases.Symbols
SomeMethod ();
LibraryWithCompilerDefaultSymbols.SomeMethod ();
LibraryWithPdb.SomeMethod ();
-#if !NETCOREAPP
- LibraryWithMdb.SomeMethod ();
-#endif
LibraryWithEmbeddedPdbSymbols.SomeMethod ();
LibraryWithPortablePdbSymbols.SomeMethod ();
}
diff --git a/test/Mono.Linker.Tests.Cases/Symbols/ReferencesWithMixedSymbolTypesWithMdbAndSymbolLinkingEnabled.cs b/test/Mono.Linker.Tests.Cases/Symbols/ReferencesWithMixedSymbolTypesWithMdbAndSymbolLinkingEnabled.cs
new file mode 100644
index 000000000..179e6be96
--- /dev/null
+++ b/test/Mono.Linker.Tests.Cases/Symbols/ReferencesWithMixedSymbolTypesWithMdbAndSymbolLinkingEnabled.cs
@@ -0,0 +1,73 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+using Mono.Linker.Tests.Cases.Expectations.Assertions;
+using Mono.Linker.Tests.Cases.Expectations.Metadata;
+using Mono.Linker.Tests.Cases.Symbols.Dependencies;
+
+namespace Mono.Linker.Tests.Cases.Symbols
+{
+ [TestCaseRequirements (TestRunCharacteristics.TargetingNetFramework, "mdb files are not supported with .NET Core")]
+ [SetupLinkerArgument ("--skip-unresolved", "true")]
+ [Reference ("Dependencies/LibraryWithMdb/LibraryWithMdb.dll")]
+ [ReferenceDependency ("Dependencies/LibraryWithMdb/LibraryWithMdb.dll.mdb")]
+
+ [Reference ("Dependencies/LibraryWithPdb/LibraryWithPdb.dll")]
+ [ReferenceDependency ("Dependencies/LibraryWithPdb/LibraryWithPdb.pdb")]
+
+ [SetupCompileBefore ("LibraryWithCompilerDefaultSymbols.dll", new[] { "Dependencies/LibraryWithCompilerDefaultSymbols.cs" }, additionalArguments: "/debug:full")]
+ [SetupCompileBefore ("LibraryWithPortablePdbSymbols.dll", new[] { "Dependencies/LibraryWithPortablePdbSymbols.cs" }, additionalArguments: "/debug:portable", compilerToUse: "csc")]
+ [SetupCompileBefore ("LibraryWithEmbeddedPdbSymbols.dll", new[] { "Dependencies/LibraryWithEmbeddedPdbSymbols.cs" }, additionalArguments: "/debug:embedded", compilerToUse: "csc")]
+
+ [SetupCompileArgument ("/debug:full")]
+ [SetupLinkerLinkSymbols ("true")]
+
+ [KeptSymbols ("test.exe")]
+ [KeptSymbols ("LibraryWithMdb.dll")]
+#if WIN32
+ [KeptSymbols ("LibraryWithPdb.dll")]
+#else
+ [RemovedSymbols ("LibraryWithPdb.dll")]
+#endif
+ [KeptSymbols ("LibraryWithCompilerDefaultSymbols.dll")]
+ [KeptSymbols ("LibraryWithEmbeddedPdbSymbols.dll")]
+ [KeptSymbols ("LibraryWithPortablePdbSymbols.dll")]
+
+ [KeptMemberInAssembly ("LibraryWithMdb.dll", typeof (LibraryWithMdb), "SomeMethod()")]
+ [RemovedMemberInAssembly ("LibraryWithMdb.dll", typeof (LibraryWithMdb), "NotUsed()")]
+
+ [KeptMemberInAssembly ("LibraryWithPdb.dll", typeof (LibraryWithPdb), "SomeMethod()")]
+ [RemovedMemberInAssembly ("LibraryWithPdb.dll", typeof (LibraryWithPdb), "NotUsed()")]
+
+ [KeptMemberInAssembly ("LibraryWithCompilerDefaultSymbols.dll", typeof (LibraryWithCompilerDefaultSymbols), "SomeMethod()")]
+ [RemovedMemberInAssembly ("LibraryWithCompilerDefaultSymbols.dll", typeof (LibraryWithCompilerDefaultSymbols), "NotUsed()")]
+
+ [KeptMemberInAssembly ("LibraryWithEmbeddedPdbSymbols.dll", typeof (LibraryWithEmbeddedPdbSymbols), "SomeMethod()")]
+ [RemovedMemberInAssembly ("LibraryWithEmbeddedPdbSymbols.dll", typeof (LibraryWithEmbeddedPdbSymbols), "NotUsed()")]
+
+ [KeptMemberInAssembly ("LibraryWithPortablePdbSymbols.dll", typeof (LibraryWithPortablePdbSymbols), "SomeMethod()")]
+ [RemovedMemberInAssembly ("LibraryWithPortablePdbSymbols.dll", typeof (LibraryWithPortablePdbSymbols), "NotUsed()")]
+ public class ReferencesWithMixedSymbolTypesWithMdbAndSymbolLinkingEnabled
+ {
+ static void Main ()
+ {
+ // Use some stuff so that we can verify that the linker output correct results
+ SomeMethod ();
+ LibraryWithCompilerDefaultSymbols.SomeMethod ();
+ LibraryWithPdb.SomeMethod ();
+ LibraryWithMdb.SomeMethod ();
+ LibraryWithEmbeddedPdbSymbols.SomeMethod ();
+ LibraryWithPortablePdbSymbols.SomeMethod ();
+ }
+
+ [Kept]
+ static void SomeMethod ()
+ {
+ }
+
+ static void NotUsed ()
+ {
+ }
+ }
+} \ No newline at end of file
diff --git a/test/Mono.Linker.Tests.Cases/TestFramework/CanCompileReferencesWithResourcesWithMcs.cs b/test/Mono.Linker.Tests.Cases/TestFramework/CanCompileReferencesWithResourcesWithMcs.cs
index ba244d272..a71b1f258 100644
--- a/test/Mono.Linker.Tests.Cases/TestFramework/CanCompileReferencesWithResourcesWithMcs.cs
+++ b/test/Mono.Linker.Tests.Cases/TestFramework/CanCompileReferencesWithResourcesWithMcs.cs
@@ -4,9 +4,7 @@ using Mono.Linker.Tests.Cases.TestFramework.Dependencies;
namespace Mono.Linker.Tests.Cases.TestFramework
{
-#if NETCOREAPP
- [IgnoreTestCase ("Don't try to compile with mcs on .NET Core")]
-#endif
+ [TestCaseRequirements (TestRunCharacteristics.TestFrameworkSupportsMcs, "A test framework that supports using mcs is required")]
[SetupCompileBefore ("library.dll",
new[] { "Dependencies/CanCompileReferencesWithResources_Lib1.cs" },
resources: new object[] { "Dependencies/CanCompileReferencesWithResources_Lib1.txt" },
diff --git a/test/Mono.Linker.Tests.Cases/TestFramework/CanCompileTestCaseWithMcs.cs b/test/Mono.Linker.Tests.Cases/TestFramework/CanCompileTestCaseWithMcs.cs
index b7986d035..78a468e26 100644
--- a/test/Mono.Linker.Tests.Cases/TestFramework/CanCompileTestCaseWithMcs.cs
+++ b/test/Mono.Linker.Tests.Cases/TestFramework/CanCompileTestCaseWithMcs.cs
@@ -5,9 +5,7 @@ using Mono.Linker.Tests.Cases.TestFramework.Dependencies;
namespace Mono.Linker.Tests.Cases.TestFramework
{
-#if NETCOREAPP
- [IgnoreTestCase ("Don't try to compile with mcs on .NET Core.")]
-#endif
+ [TestCaseRequirements (TestRunCharacteristics.TestFrameworkSupportsMcs, "A test framework that supports using mcs is required")]
[SetupCSharpCompilerToUse ("mcs")]
// Use all of the compiler setup attributes so that we can verify they all work
diff --git a/test/Mono.Linker.Tests.Cases/TestFramework/VerifyExpectModifiedAttributesWork.cs b/test/Mono.Linker.Tests.Cases/TestFramework/VerifyExpectModifiedAttributesWork.cs
index 99d3a8832..4b03a4afe 100644
--- a/test/Mono.Linker.Tests.Cases/TestFramework/VerifyExpectModifiedAttributesWork.cs
+++ b/test/Mono.Linker.Tests.Cases/TestFramework/VerifyExpectModifiedAttributesWork.cs
@@ -9,9 +9,7 @@ namespace Mono.Linker.Tests.Cases.TestFramework
/// This test is here to give some coverage to the attribute to ensure it doesn't break. We need to leverage the ETW feature since it is the only
/// one that modifies bodies currently
/// </summary>
-#if NETCOREAPP
- [IgnoreTestCase ("--exclude-feature is not supported on .NET Core")]
-#endif
+ [TestCaseRequirements (TestRunCharacteristics.TargetingNetFramework, "--exclude-feature is not supported on .NET Core")]
[SetupLinkerArgument ("--exclude-feature", "etw")]
// Keep framework code that calls EventSource methods like OnEventCommand
[SetupLinkerTrimMode ("skip")]
diff --git a/test/Mono.Linker.Tests.Cases/Warnings/Individual/CustomStepWithWarnings.cs b/test/Mono.Linker.Tests.Cases/Warnings/Individual/CustomStepWithWarnings.cs
index 32037375b..0bb4f194e 100644
--- a/test/Mono.Linker.Tests.Cases/Warnings/Individual/CustomStepWithWarnings.cs
+++ b/test/Mono.Linker.Tests.Cases/Warnings/Individual/CustomStepWithWarnings.cs
@@ -12,11 +12,7 @@ using Mono.Linker.Tests.Cases.Expectations.Metadata;
namespace Mono.Linker.Tests.Cases.Warnings.Individual
{
-#if !NETCOREAPP
- [IgnoreTestCase ("Can be enabled once MonoBuild produces a dll from which we can grab the types in the Mono.Linker namespace.")]
-#else
[SetupCompileBefore ("CustomStep.dll", new[] { "../Dependencies/CustomStep.cs" }, new[] { "illink.dll" })]
-#endif
[SetupLinkerArgument ("--custom-step", "CustomStep.CustomStep,CustomStep.dll")]
[SetupLinkerArgument ("--custom-step", "CustomStep.CustomStepWithInvalidWarningCode,CustomStep.dll")]
[LogContains ("CustomStep.cs(1,1): warning IL6001: Warning")]
diff --git a/test/Mono.Linker.Tests.Cases/Warnings/WarningSuppression/SuppressWarningsUsingTargetViaXml.cs b/test/Mono.Linker.Tests.Cases/Warnings/WarningSuppression/SuppressWarningsUsingTargetViaXmlMono.cs
index 1b33f6a4c..30eae7ce1 100644
--- a/test/Mono.Linker.Tests.Cases/Warnings/WarningSuppression/SuppressWarningsUsingTargetViaXml.cs
+++ b/test/Mono.Linker.Tests.Cases/Warnings/WarningSuppression/SuppressWarningsUsingTargetViaXmlMono.cs
@@ -1,33 +1,27 @@
-using System;
-using System.Collections.Generic;
-using System.Diagnostics.CodeAnalysis;
-using System.Text;
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
using Mono.Linker.Tests.Cases.Expectations.Assertions;
using Mono.Linker.Tests.Cases.Expectations.Metadata;
using Mono.Linker.Tests.Cases.Warnings.Dependencies;
namespace Mono.Linker.Tests.Cases.Warnings.WarningSuppression
{
- // For netcoreapp we don't have to specify the assembly for the attribute, since the attribute comes from corelib
- // and will be found always.
+ [TestCaseRequirements (TestRunCharacteristics.TargetingNetFramework, "This test is specific to .NET Framework")]
// For mono though, we have to specify the assembly (Mono.Linker.Tests.Cases.Expectations) because at the time of processing
// that assembly is not yet loaded into the closure in the linker, so it won't find the attribute type.
-#if NETCOREAPP
- [SetupLinkAttributesFile ("SuppressWarningsUsingTargetViaXml.netcore.xml")]
- [SetupCompileBefore ("library.dll", new[] { typeof (TriggerWarnings_Lib) }, new[] { "System.Core.dll" })]
-#else
[SetupLinkAttributesFile ("SuppressWarningsUsingTargetViaXml.mono.xml")]
- [SetupCompileBefore ("library.dll", new[] { typeof (TriggerWarnings_Lib) })]
-#endif
+ [SetupCompileBefore ("library.dll", new[] { typeof (TriggerWarnings_Lib) }, new[] { "System.Core.dll" })]
[KeptAssembly ("library.dll")]
[SetupLinkerAction ("link", "library.dll")]
[LogDoesNotContain ("TriggerUnrecognizedPattern()")]
- public class SuppressWarningsUsingTargetViaXml
+ public class SuppressWarningsUsingTargetViaXmlMono
{
public static void Main ()
{
TriggerWarnings_Lib.Main ();
}
}
-}
+} \ No newline at end of file
diff --git a/test/Mono.Linker.Tests.Cases/Warnings/WarningSuppression/SuppressWarningsUsingTargetViaXmlNetCore.cs b/test/Mono.Linker.Tests.Cases/Warnings/WarningSuppression/SuppressWarningsUsingTargetViaXmlNetCore.cs
new file mode 100644
index 000000000..d908680af
--- /dev/null
+++ b/test/Mono.Linker.Tests.Cases/Warnings/WarningSuppression/SuppressWarningsUsingTargetViaXmlNetCore.cs
@@ -0,0 +1,27 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+using Mono.Linker.Tests.Cases.Expectations.Assertions;
+using Mono.Linker.Tests.Cases.Expectations.Metadata;
+using Mono.Linker.Tests.Cases.Warnings.Dependencies;
+
+namespace Mono.Linker.Tests.Cases.Warnings.WarningSuppression
+{
+ [TestCaseRequirements (TestRunCharacteristics.TargetingNetCore, "This test is specific to .NET Core")]
+ // For netcoreapp we don't have to specify the assembly for the attribute, since the attribute comes from corelib
+ // and will be found always.
+ [SetupLinkAttributesFile ("SuppressWarningsUsingTargetViaXml.netcore.xml")]
+ [SetupCompileBefore ("library.dll", new[] { typeof (TriggerWarnings_Lib) })]
+
+ [KeptAssembly ("library.dll")]
+ [SetupLinkerAction ("link", "library.dll")]
+ [LogDoesNotContain ("TriggerUnrecognizedPattern()")]
+ public class SuppressWarningsUsingTargetViaXmlNetCore
+ {
+ public static void Main ()
+ {
+ TriggerWarnings_Lib.Main ();
+ }
+ }
+}