Skip to content

Commit 54acf89

Browse files
committed
Refactor how test case metadata is obtained. (dotnet#2268)
1 parent 4a3f4ad commit 54acf89

File tree

59 files changed

+818
-634
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+818
-634
lines changed

src/linker/Linker/Driver.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -883,7 +883,7 @@ protected bool AddCustomStep (Pipeline pipeline, string arg)
883883
return true;
884884
}
885885

886-
static IStep FindStep (Pipeline pipeline, string name)
886+
protected virtual IStep FindStep (Pipeline pipeline, string name)
887887
{
888888
foreach (IStep step in pipeline.GetSteps ()) {
889889
Type t = step.GetType ();
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
// Licensed to the .NET Foundation under one or more agreements.
2+
// The .NET Foundation licenses this file to you under the MIT license.
3+
// See the LICENSE file in the project root for more information.
4+
5+
using System;
6+
7+
namespace Mono.Linker.Tests.Cases.Expectations.Assertions
8+
{
9+
[AttributeUsage (AttributeTargets.Class)]
10+
public class TestCaseRequirementsAttribute : BaseExpectedLinkedBehaviorAttribute
11+
{
12+
public TestCaseRequirementsAttribute (TestRunCharacteristics targetFrameworkCharacteristics, string reason)
13+
{
14+
if (reason == null)
15+
throw new ArgumentNullException (nameof (reason));
16+
}
17+
}
18+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
// Licensed to the .NET Foundation under one or more agreements.
2+
// The .NET Foundation licenses this file to you under the MIT license.
3+
// See the LICENSE file in the project root for more information.
4+
5+
using System;
6+
7+
namespace Mono.Linker.Tests.Cases.Expectations.Assertions
8+
{
9+
[Flags]
10+
public enum TestRunCharacteristics
11+
{
12+
TargetingNetFramework = 1,
13+
TargetingNetCore = 2,
14+
SupportsDefaultInterfaceMethods = 8,
15+
SupportsStaticInterfaceMethods = 16,
16+
TestFrameworkSupportsMcs = 32
17+
}
18+
}

test/Mono.Linker.Tests.Cases/Attributes/NoSecurity/CoreLibrarySecurityAttributeTypesAreRemoved.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@
66

77
namespace Mono.Linker.Tests.Cases.Attributes.NoSecurity
88
{
9-
#if NETCOREAPP
10-
[IgnoreTestCase ("Not important for .NET Core build")]
11-
#endif
9+
[TestCaseRequirements (TestRunCharacteristics.TargetingNetFramework, "Not important for .NET Core build")]
1210
[SetupLinkerCoreAction ("link")]
1311
[SetupLinkerArgument ("--strip-security", "true")]
1412
[Reference ("System.dll")]

test/Mono.Linker.Tests.Cases/Attributes/OnlyKeepUsed/ComAttributesAreRemovedWhenFeatureExcluded.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@
44

55
namespace Mono.Linker.Tests.Cases.Attributes.OnlyKeepUsed
66
{
7-
#if NETCOREAPP
8-
[IgnoreTestCase ("--exclude-feature is not supported on .NET Core")]
9-
#endif
7+
[TestCaseRequirements (TestRunCharacteristics.TargetingNetFramework, "--exclude-feature is not supported on .NET Core")]
108
[SetupLinkerArgument ("--used-attrs-only", "true")]
119
[SetupLinkerArgument ("--exclude-feature", "com")]
1210
public class ComAttributesAreRemovedWhenFeatureExcluded

test/Mono.Linker.Tests.Cases/BCLFeatures/ETW/BaseRemovedEventSource.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,7 @@
55

66
namespace Mono.Linker.Tests.Cases.BCLFeatures.ETW
77
{
8-
#if NETCOREAPP
9-
[IgnoreTestCase ("--exclude-feature is not supported on .NET Core")]
10-
#endif
8+
[TestCaseRequirements (TestRunCharacteristics.TargetingNetFramework, "--exclude-feature is not supported on .NET Core")]
119
[SetupLinkerArgument ("--exclude-feature", "etw")]
1210
// Keep framework code that calls EventSource methods like OnEventCommand
1311
[SetupLinkerCoreAction ("skip")]

test/Mono.Linker.Tests.Cases/BCLFeatures/ETW/BaseRemovedEventSourceEmptyBody.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@
44

55
namespace Mono.Linker.Tests.Cases.BCLFeatures.ETW
66
{
7-
#if NETCOREAPP
8-
[IgnoreTestCase ("--exclude-feature is not supported on .NET Core")]
9-
#endif
7+
[TestCaseRequirements (TestRunCharacteristics.TargetingNetFramework, "--exclude-feature is not supported on .NET Core")]
108
[SetupLinkerArgument ("--exclude-feature", "etw")]
119
// Keep framework code that calls EventSource methods like OnEventCommand
1210
[SetupLinkerCoreAction ("skip")]

test/Mono.Linker.Tests.Cases/BCLFeatures/ETW/BaseRemovedEventSourceNonVoidReturn.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@
44

55
namespace Mono.Linker.Tests.Cases.BCLFeatures.ETW
66
{
7-
#if NETCOREAPP
8-
[IgnoreTestCase ("--exclude-feature is not supported on .NET Core")]
9-
#endif
7+
[TestCaseRequirements (TestRunCharacteristics.TargetingNetFramework, "--exclude-feature is not supported on .NET Core")]
108
[SetupLinkerArgument ("--exclude-feature", "etw")]
119
// Keep framework code that calls EventSource methods like OnEventCommand
1210
[SetupLinkerCoreAction ("skip")]

test/Mono.Linker.Tests.Cases/BCLFeatures/ETW/Excluded.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,7 @@
55

66
namespace Mono.Linker.Tests.Cases.BCLFeatures.ETW
77
{
8-
#if NETCOREAPP
9-
[IgnoreTestCase ("--exclude-feature is not supported on .NET Core")]
10-
#endif
8+
[TestCaseRequirements (TestRunCharacteristics.TargetingNetFramework, "--exclude-feature is not supported on .NET Core")]
119
[SetupLinkerArgument ("--exclude-feature", "etw")]
1210
// Keep framework code that calls EventSource methods like OnEventCommand
1311
[SetupLinkerCoreAction ("skip")]

test/Mono.Linker.Tests.Cases/BCLFeatures/ETW/LocalsOfModifiedMethodAreRemoved.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@
44

55
namespace Mono.Linker.Tests.Cases.BCLFeatures.ETW
66
{
7-
#if NETCOREAPP
8-
[IgnoreTestCase ("--exclude-feature is not supported on .NET Core")]
9-
#endif
7+
[TestCaseRequirements (TestRunCharacteristics.TargetingNetFramework, "--exclude-feature is not supported on .NET Core")]
108
[SetupLinkerArgument ("--exclude-feature", "etw")]
119
// Keep framework code that calls EventSource methods like OnEventCommand
1210
[SetupLinkerCoreAction ("skip")]

test/Mono.Linker.Tests.Cases/BCLFeatures/ETW/NonEventWithLog.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,7 @@
55

66
namespace Mono.Linker.Tests.Cases.BCLFeatures.ETW
77
{
8-
#if NETCOREAPP
9-
[IgnoreTestCase ("--exclude-feature is not supported on .NET Core")]
10-
#endif
8+
[TestCaseRequirements (TestRunCharacteristics.TargetingNetFramework, "--exclude-feature is not supported on .NET Core")]
119
[SetupLinkerArgument ("--exclude-feature", "etw")]
1210
// Used to avoid different compilers generating different IL which can mess up the instruction asserts
1311
[SetupCompileArgument ("/optimize+")]

test/Mono.Linker.Tests.Cases/BCLFeatures/ETW/StubbedMethodWithExceptionHandlers.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,7 @@
55

66
namespace Mono.Linker.Tests.Cases.BCLFeatures.ETW
77
{
8-
#if NETCOREAPP
9-
[IgnoreTestCase ("--exclude-feature is not supported on .NET Core")]
10-
#endif
8+
[TestCaseRequirements (TestRunCharacteristics.TargetingNetFramework, "--exclude-feature is not supported on .NET Core")]
119
[SetupLinkerArgument ("--exclude-feature", "etw")]
1210
// Keep framework code that calls EventSource methods like OnEventCommand
1311
[SetupLinkerCoreAction ("skip")]

test/Mono.Linker.Tests.Cases/CommandLine/AddCustomStep.cs

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,11 @@
33

44
namespace Mono.Linker.Tests.Cases.CommandLine
55
{
6-
7-
#if !NETCOREAPP
8-
[IgnoreTestCase ("Can be enabled once MonoBuild produces a dll from which we can grab the types in the Mono.Linker namespace.")]
9-
#else
10-
[SetupCompileBefore ("CustomStep.dll", new[] { "Dependencies/CustomStepDummy.cs" }, new[] { "illink.dll" })]
6+
[SetupCompileBefore ("CustomStepDummy.dll", new[] { "Dependencies/CustomStepDummy.cs" }, new[] { "illink.dll" })]
117
#endif
12-
[SetupLinkerArgument ("--custom-step", "CustomStep.CustomStepDummy,CustomStep.dll")]
13-
[SetupLinkerArgument ("--custom-step", "-CleanStep:CustomStep.CustomStepDummy,CustomStep.dll")]
14-
[SetupLinkerArgument ("--custom-step", "+CleanStep:CustomStep.CustomStepDummy,CustomStep.dll")]
8+
[SetupLinkerArgument ("--custom-step", "CustomStep.CustomStepDummy,CustomStepDummy.dll")]
9+
[SetupLinkerArgument ("--custom-step", "-CleanStep:CustomStep.CustomStepDummy,CustomStepDummy.dll")]
10+
[SetupLinkerArgument ("--custom-step", "+CleanStep:CustomStep.CustomStepDummy,CustomStepDummy.dll")]
1511
[SetupLinkerArgument ("--verbose")]
1612
[LogContains ("Custom step added")]
1713
public class AddCustomStep

test/Mono.Linker.Tests.Cases/CommandLine/CustomStepData.cs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,8 @@
33

44
namespace Mono.Linker.Tests.Cases.CommandLine
55
{
6-
7-
#if !NETCOREAPP
8-
[IgnoreTestCase ("Can be enabled once MonoBuild produces a dll from which we can grab the types in the Mono.Linker namespace.")]
9-
#else
10-
[SetupCompileBefore ("CustomStep.dll", new[] { "Dependencies/CustomStepUser.cs" }, new[] { "illink.dll" })]
11-
#endif
12-
[SetupLinkerArgument ("--custom-step", "CustomStep.CustomStepUser,CustomStep.dll")]
6+
[SetupCompileBefore ("CustomStepUser.dll", new[] { "Dependencies/CustomStepUser.cs" }, new[] { "illink.dll" })]
7+
[SetupLinkerArgument ("--custom-step", "CustomStep.CustomStepUser,CustomStepUser.dll")]
138
[SetupLinkerArgument ("--custom-data", "NewKey=UserValue")]
149
[SetupLinkerArgument ("--verbose")]
1510
[LogContains ("Custom step added with custom data of UserValue")]

test/Mono.Linker.Tests.Cases/CoreLink/DelegateAndMulticastDelegateKeepInstantiatedReqs.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@
66

77
namespace Mono.Linker.Tests.Cases.CoreLink
88
{
9-
#if !NETCOREAPP
10-
[IgnoreTestCase ("Only for .NET Core for some reason")]
11-
#endif
9+
[TestCaseRequirements (TestRunCharacteristics.TargetingNetCore, "Only for .NET Core")]
1210
/// <summary>
1311
/// Delegate and is created from
1412
/// </summary>

test/Mono.Linker.Tests.Cases/CoreLink/LinkingOfCoreLibrariesRemovesUnusedMethods.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@
66

77
namespace Mono.Linker.Tests.Cases.CoreLink
88
{
9-
#if NETCOREAPP
10-
[IgnoreTestCase("Not important for .NET Core build")]
11-
#endif
9+
[TestCaseRequirements (TestRunCharacteristics.TargetingNetFramework, "Not important for .NET Core build")]
1210
[SetupLinkerCoreAction ("link")]
1311

1412
[KeptAssembly (PlatformAssemblies.CoreLib)]

test/Mono.Linker.Tests.Cases/CoreLink/LinkingOfCoreLibrariesRemovesUnusedTypes.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,7 @@
55

66
namespace Mono.Linker.Tests.Cases.CoreLink
77
{
8-
#if NETCOREAPP
9-
[IgnoreTestCase("Not important for .NET Core build")]
10-
#endif
8+
[TestCaseRequirements (TestRunCharacteristics.TargetingNetFramework, "Not important for .NET Core build")]
119
[SetupLinkerCoreAction ("link")]
1210
[Reference ("System.dll")]
1311

test/Mono.Linker.Tests.Cases/CoreLink/NoSecurityPlusOnlyKeepUsedRemovesAllSecurityAttributesFromCoreLibraries.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@
66

77
namespace Mono.Linker.Tests.Cases.CoreLink
88
{
9-
#if NETCOREAPP
10-
[IgnoreTestCase("Not important for .NET Core build")]
11-
#endif
9+
[TestCaseRequirements (TestRunCharacteristics.TargetingNetFramework, "Not important for .NET Core build")]
1210
[SetupLinkerCoreAction ("link")]
1311
[SetupLinkerArgument ("--strip-security", "true")]
1412
[SetupLinkerArgument ("--used-attrs-only", "true")]

test/Mono.Linker.Tests.Cases/Extensibility/SubStepDispatcherUsage.cs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,8 @@
33

44
namespace Mono.Linker.Tests.Cases.Extensibility
55
{
6-
#if !NETCOREAPP
7-
[IgnoreTestCase ("Specific to the illink build")]
8-
#endif
9-
[SetupCompileBefore ("MyDispatcher.dll", new[] { "Dependencies/MyDispatcher.cs", "Dependencies/CustomSubStep.cs" }, new[] { "illink.dll", "Mono.Cecil.dll", "netstandard.dll" })]
10-
[SetupLinkerArgument ("--custom-step", "-MarkStep:MyDispatcher,MyDispatcher.dll")]
6+
[SetupCompileBefore ("MyDispatcherUsage.dll", new[] { "Dependencies/MyDispatcher.cs", "Dependencies/CustomSubStep.cs" }, new[] { "illink.dll", "Mono.Cecil.dll", "netstandard.dll" })]
7+
[SetupLinkerArgument ("--custom-step", "-MarkStep:MyDispatcher,MyDispatcherUsage.dll")]
118
public class SubStepDispatcherUsage
129
{
1310
public static void Main ()

test/Mono.Linker.Tests.Cases/FeatureSettings/FeatureDescriptors.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@
44

55
namespace Mono.Linker.Tests.Cases.FeatureSettings
66
{
7-
#if !NETCOREAPP
8-
[IgnoreTestCase ("Feature settings in descriptors are not supported on Mono.")]
9-
#endif
7+
[TestCaseRequirements (TestRunCharacteristics.TargetingNetCore, "Feature settings in descriptors are not supported on Mono.")]
108
[SetupLinkerDescriptorFile ("FeatureDescriptorsGlobalTrue.xml")]
119
[SetupLinkerDescriptorFile ("FeatureDescriptorsGlobalFalse.xml")]
1210
[SetupLinkerDescriptorFile ("FeatureDescriptors.xml")]

test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/DefaultInterfaceMethods/DefaultInterfaceMethodCallIntoClass.cs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,17 @@
66

77
namespace Mono.Linker.Tests.Cases.Inheritance.Interfaces.DefaultInterfaceMethods
88
{
9-
#if !NETCOREAPP
10-
[IgnoreTestCase ("Requires support for default interface methods")]
11-
#endif
9+
[TestCaseRequirements (TestRunCharacteristics.SupportsDefaultInterfaceMethods, "Requires support for default interface methods")]
1210
class DefaultInterfaceMethodCallIntoClass
1311
{
1412
public static void Main ()
1513
{
16-
#if NETCOREAPP
14+
#if SUPPORTS_DEFAULT_INTERFACE_METHODS
1715
((IBase) new Derived ()).Frob ();
1816
#endif
1917
}
2018

21-
#if NETCOREAPP
19+
#if SUPPORTS_DEFAULT_INTERFACE_METHODS
2220
[Kept]
2321
interface IBase
2422
{

test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/DefaultInterfaceMethods/GenericDefaultInterfaceMethods.cs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,18 @@
55

66
namespace Mono.Linker.Tests.Cases.Inheritance.Interfaces.DefaultInterfaceMethods
77
{
8-
#if !NETCOREAPP
9-
[IgnoreTestCase ("Requires support for default interface methods")]
10-
#endif
8+
[TestCaseRequirements (TestRunCharacteristics.SupportsDefaultInterfaceMethods, "Requires support for default interface methods")]
119
class GenericDefaultInterfaceMethods
1210
{
1311
public static void Main ()
1412
{
15-
#if NETCOREAPP
13+
#if SUPPORTS_DEFAULT_INTERFACE_METHODS
1614
((IFoo<int>) new Bar ()).Method (12);
1715
((IFoo<int>) new Baz ()).Method (12);
1816
#endif
1917
}
2018

21-
#if NETCOREAPP
19+
#if SUPPORTS_DEFAULT_INTERFACE_METHODS
2220
[Kept]
2321
interface IFoo<T>
2422
{

test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/DefaultInterfaceMethods/InterfaceWithAttributeOnImplementation.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,8 @@
66

77
namespace Mono.Linker.Tests.Cases.Inheritance.Interfaces.DefaultInterfaceMethods
88
{
9-
#if !NETCOREAPP
10-
[IgnoreTestCase ("Only for .NET Core for some reason")]
11-
#endif
9+
[SetupLinkerArgument ("--skip-unresolved", "true")]
10+
[TestCaseRequirements (TestRunCharacteristics.SupportsDefaultInterfaceMethods, "Requires support for default interface methods")]
1211
[Define ("IL_ASSEMBLY_AVAILABLE")]
1312
[SetupCompileBefore ("library.dll", new[] { "Dependencies/InterfaceWithAttributeOnImpl.il" })]
1413
class InterfaceWithAttributeOnImplementation

test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/DefaultInterfaceMethods/SimpleDefaultInterfaceMethod.cs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,17 @@
66

77
namespace Mono.Linker.Tests.Cases.Inheritance.Interfaces.DefaultInterfaceMethods
88
{
9-
#if !NETCOREAPP
10-
[IgnoreTestCase ("Requires support for default interface methods")]
11-
#endif
9+
[TestCaseRequirements (TestRunCharacteristics.SupportsDefaultInterfaceMethods, "Requires support for default interface methods")]
1210
class SimpleDefaultInterfaceMethod
1311
{
1412
public static void Main ()
1513
{
16-
#if NETCOREAPP
14+
#if SUPPORTS_DEFAULT_INTERFACE_METHODS
1715
((IBasic) new Basic ()).DoSomething ();
1816
#endif
1917
}
2018

21-
#if NETCOREAPP
19+
#if SUPPORTS_DEFAULT_INTERFACE_METHODS
2220
[Kept]
2321
interface IBasic
2422
{

test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/DefaultInterfaceMethods/UnusedDefaultInterfaceImplementation.cs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,17 @@
55

66
namespace Mono.Linker.Tests.Cases.Inheritance.Interfaces.DefaultInterfaceMethods
77
{
8-
#if !NETCOREAPP
9-
[IgnoreTestCase ("Requires support for default interface methods")]
10-
#endif
8+
[TestCaseRequirements (TestRunCharacteristics.SupportsDefaultInterfaceMethods, "Requires support for default interface methods")]
119
class UnusedDefaultInterfaceImplementation
1210
{
1311
public static void Main ()
1412
{
15-
#if NETCOREAPP
13+
#if SUPPORTS_DEFAULT_INTERFACE_METHODS
1614
((IFoo) new Foo ()).InterfaceMethod ();
1715
#endif
1816
}
1917

20-
#if NETCOREAPP
18+
#if SUPPORTS_DEFAULT_INTERFACE_METHODS
2119
[Kept]
2220
interface IFoo
2321
{

test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/OnReferenceType/UnusedComInterfaceIsRemovedWhenComFeatureExcluded.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@
44

55
namespace Mono.Linker.Tests.Cases.Inheritance.Interfaces.OnReferenceType
66
{
7-
#if NETCOREAPP
8-
[IgnoreTestCase ("--exclude-feature is not supported on .NET Core")]
9-
#endif
7+
[TestCaseRequirements (TestRunCharacteristics.TargetingNetFramework, "--exclude-feature is not supported on .NET Core")]
108
[SetupLinkerArgument ("--exclude-feature", "com")]
119
public class UnusedComInterfaceIsRemovedWhenComFeatureExcluded
1210
{

test/Mono.Linker.Tests.Cases/LinkXml/CanPreserveExcludedFeatureCom.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,7 @@
55

66
namespace Mono.Linker.Tests.Cases.LinkXml
77
{
8-
#if NETCOREAPP
9-
[IgnoreTestCase ("--exclude-feature is not supported on .NET Core")]
10-
#endif
8+
[TestCaseRequirements (TestRunCharacteristics.TargetingNetFramework, "--exclude-feature is not supported on .NET Core")]
119
[SetupLinkerArgument ("--exclude-feature", "com")]
1210
[SetupLinkerDescriptorFile ("CanPreserveExcludedFeatureCom.xml")]
1311
public class CanPreserveExcludedFeatureCom

test/Mono.Linker.Tests.Cases/LinkXml/FeatureExclude/OnAssembly.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@
44

55
namespace Mono.Linker.Tests.Cases.LinkXml.FeatureExclude
66
{
7-
#if NETCOREAPP
8-
[IgnoreTestCase ("--exclude-feature is not supported on .NET Core")]
9-
#endif
7+
[TestCaseRequirements (TestRunCharacteristics.TargetingNetFramework, "--exclude-feature is not supported on .NET Core")]
108
[SetupLinkerArgument ("--exclude-feature", "one")]
119
[SetupCompileBefore ("library1.dll", new[] { typeof (OnAssembly_Lib1) })]
1210
[SetupCompileBefore ("library2.dll", new[] { typeof (OnAssembly_Lib2) })]

0 commit comments

Comments
 (0)