diff --git a/src/libraries/System.Runtime.Loader/tests/LoaderLinkTest.cs b/src/libraries/System.Runtime.Loader/tests/LoaderLinkTest.cs index ff0f1b694c0bc6..069cc8c481a8c6 100644 --- a/src/libraries/System.Runtime.Loader/tests/LoaderLinkTest.cs +++ b/src/libraries/System.Runtime.Loader/tests/LoaderLinkTest.cs @@ -13,7 +13,7 @@ namespace LoaderLinkTest { public class LoaderLinkTest { - [Fact] + [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.HasAssemblyFiles))] public static void EnsureTypesLinked() // https://github.com/dotnet/runtime/issues/42207 { string parentDir = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); diff --git a/src/libraries/System.Runtime.Loader/tests/SatelliteAssemblies.cs b/src/libraries/System.Runtime.Loader/tests/SatelliteAssemblies.cs index 4f5e6265135795..e00166fa0be8de 100644 --- a/src/libraries/System.Runtime.Loader/tests/SatelliteAssemblies.cs +++ b/src/libraries/System.Runtime.Loader/tests/SatelliteAssemblies.cs @@ -74,7 +74,7 @@ public static IEnumerable MainResources_TestData() } } - [Theory] + [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.HasAssemblyFiles))] [MemberData(nameof(MainResources_TestData))] public static void mainResources(string lang, string expected) { @@ -131,7 +131,7 @@ public static IEnumerable DescribeLib_TestData() yield return new object[] { "ReferencedClassLibNeutralIsSatellite", "ReferencedClassLibNeutralIsSatellite.Program, ReferencedClassLibNeutralIsSatellite", "es", "Neutral (es) language ReferencedClassLibNeutralIsSatellite description 1.0.0" }; } - [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsNotInvariantGlobalization))] + [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsNotInvariantGlobalization), nameof(PlatformDetection.HasAssemblyFiles))] [MemberData(nameof(DescribeLib_TestData))] public void describeLib(string alc, string type, string culture, string expected) { @@ -187,7 +187,7 @@ public static IEnumerable SatelliteLoadsCorrectly_TestData() yield return new object[] { "ReferencedClassLibNeutralIsSatellite", "ReferencedClassLibNeutralIsSatellite", "es" }; } - [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsNotInvariantGlobalization))] + [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsNotInvariantGlobalization), nameof(PlatformDetection.HasAssemblyFiles))] [MemberData(nameof(SatelliteLoadsCorrectly_TestData))] public void SatelliteLoadsCorrectly_FromName(string alc, string assemblyName, string culture) { @@ -207,8 +207,8 @@ public void SatelliteLoadsCorrectly_FromName(string alc, string assemblyName, st Assert.Equal(culture, satelliteAssembly.GetName().CultureName); } - - [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsNotInvariantGlobalization))] + + [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsNotInvariantGlobalization), nameof(PlatformDetection.HasAssemblyFiles))] [MemberData(nameof(SatelliteLoadsCorrectly_TestData))] public void SatelliteLoadsCorrectly_FromPath(string alc, string assemblyName, string culture) { diff --git a/src/libraries/tests.proj b/src/libraries/tests.proj index 70d328b46d033a..b88f2074cca52a 100644 --- a/src/libraries/tests.proj +++ b/src/libraries/tests.proj @@ -229,13 +229,13 @@ - - + +