diff --git a/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.cs b/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.cs index 97dac4bbe7ea70..9ddda52552f2d4 100644 --- a/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.cs +++ b/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.cs @@ -267,7 +267,7 @@ private static bool GetLinqExpressionsBuiltWithIsInterpretingOnly() public static bool IsAssemblyLoadingSupported => !IsNativeAot; public static bool IsNonBundledAssemblyLoadingSupported => IsAssemblyLoadingSupported && !IsMonoAOT; - public static bool IsMethodBodySupported => !IsNativeAot; + public static bool IsMethodBodySupported => !IsBuiltWithAggressiveTrimming; public static bool IsDebuggerTypeProxyAttributeSupported => !IsNativeAot; public static bool HasAssemblyFiles => !string.IsNullOrEmpty(typeof(PlatformDetection).Assembly.Location); public static bool HasHostExecutable => HasAssemblyFiles; // single-file don't have a host diff --git a/src/libraries/System.Diagnostics.Process/tests/ProcessStartInfoTests.cs b/src/libraries/System.Diagnostics.Process/tests/ProcessStartInfoTests.cs index 11c6225e13687b..11b67168507562 100644 --- a/src/libraries/System.Diagnostics.Process/tests/ProcessStartInfoTests.cs +++ b/src/libraries/System.Diagnostics.Process/tests/ProcessStartInfoTests.cs @@ -1446,6 +1446,7 @@ public void StartInfo_LoadUserProfile_And_UseCredentialsForNetworkingOnly_AreInc } [ConditionalFact(typeof(RemoteExecutor), nameof(RemoteExecutor.IsSupported))] + [SkipOnPlatform(TestPlatforms.iOS | TestPlatforms.tvOS | TestPlatforms.MacCatalyst, "Process.Start is not supported on iOS, tvOS, and MacCatalyst.")] public void UserNameCantBeCombinedWithInheritedHandles() { using Process longRunning = CreateProcessLong(); diff --git a/src/libraries/System.Reflection.Context/tests/CustomConstructorInfoTests.cs b/src/libraries/System.Reflection.Context/tests/CustomConstructorInfoTests.cs index de6e57cbc4c3af..ceb4b7ace553f6 100644 --- a/src/libraries/System.Reflection.Context/tests/CustomConstructorInfoTests.cs +++ b/src/libraries/System.Reflection.Context/tests/CustomConstructorInfoTests.cs @@ -155,7 +155,7 @@ public void GetMethodBody_ReturnsBody() Assert.NotNull(body); } - [Fact] + [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotMonoRuntime))] public void GetMethodImplementationFlags_ReturnsIL() { MethodImplAttributes flags = _customConstructor.GetMethodImplementationFlags(); diff --git a/src/libraries/System.Reflection.Context/tests/CustomMethodInfoTests.cs b/src/libraries/System.Reflection.Context/tests/CustomMethodInfoTests.cs index 8fd1c1d63d7400..6f21db84123e91 100644 --- a/src/libraries/System.Reflection.Context/tests/CustomMethodInfoTests.cs +++ b/src/libraries/System.Reflection.Context/tests/CustomMethodInfoTests.cs @@ -187,7 +187,7 @@ public void GetMethodBody_ReturnsBodyWithLocals() Assert.NotNull(body.LocalVariables); } - [Fact] + [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotMonoRuntime))] public void GetMethodImplementationFlags_ReturnsIL() { MethodImplAttributes flags = _customMethod.GetMethodImplementationFlags(); diff --git a/src/libraries/tests.proj b/src/libraries/tests.proj index 3bbf424f11e50e..49757f74fb48fd 100644 --- a/src/libraries/tests.proj +++ b/src/libraries/tests.proj @@ -698,6 +698,9 @@ + + + diff --git a/src/tests/build.proj b/src/tests/build.proj index 6a80d792c1ae1b..e8455e5df74964 100644 --- a/src/tests/build.proj +++ b/src/tests/build.proj @@ -174,6 +174,7 @@ <_RestoreProperties>MSBuildRestoreSessionId=$([System.Guid]::NewGuid());TargetOS=$(TargetOS);TargetArchitecture=$(TargetArchitecture);Configuration=$(Configuration);CrossBuild=$(CrossBuild);SetTFMForRestore=true;RuntimeIdentifier=$(RuntimeIdentifier) <_RestoreProperties Condition="'$(UseLocalAppHostPack)' == 'true' or '$(TargetOS)' == 'browser'">$(_RestoreProperties);EnableAppHostPackDownload=false;EnableTargetingPackDownload=false;EnableRuntimePackDownload=false + <_RestoreProperties Condition="'$(TargetsAppleMobile)' == 'true'">$(_RestoreProperties);RestoreUseStaticGraphEvaluation=false