diff --git a/eng/pipelines/libraries/helix-queues-setup.yml b/eng/pipelines/libraries/helix-queues-setup.yml index 5575328d8c9d14..1598e6ecedcfcc 100644 --- a/eng/pipelines/libraries/helix-queues-setup.yml +++ b/eng/pipelines/libraries/helix-queues-setup.yml @@ -115,11 +115,15 @@ jobs: # iOS devices - ${{ if in(parameters.platform, 'iOS_arm64') }}: - - OSX.1015.Amd64.Iphone.Open + # split traffic for runtime-extra-platforms (which mostly runs on rolling builds) + - ${{ if ne(parameters.jobParameters.isExtraPlatforms, true) }}: + - OSX.1015.Amd64.Iphone.Open + - ${{ if eq(parameters.jobParameters.isExtraPlatforms, true) }}: + - OSX.1200.Amd64.Iphone.Open # tvOS devices - ${{ if in(parameters.platform, 'tvOS_arm64') }}: - # split traffic for PR's and rolling builds + # split traffic for runtime-extra-platforms (which mostly runs on rolling builds) - ${{ if ne(parameters.jobParameters.isExtraPlatforms, true) }}: - OSX.1015.Amd64.AppleTV.Open - ${{ if eq(parameters.jobParameters.isExtraPlatforms, true) }}: diff --git a/eng/pipelines/runtime-extra-platforms-other.yml b/eng/pipelines/runtime-extra-platforms-other.yml index a3b0116b30c8b2..ba4f7ceaad6be1 100644 --- a/eng/pipelines/runtime-extra-platforms-other.yml +++ b/eng/pipelines/runtime-extra-platforms-other.yml @@ -229,7 +229,7 @@ jobs: testGroup: innerloop nameSuffix: AllSubsets_Mono isExtraPlatforms: ${{ parameters.isExtraPlatformsBuild }} - buildArgs: -s mono+libs+libs.tests -c $(_BuildConfig) /p:ArchiveTests=true /p:DevTeamProvisioning=- /p:RunAOTCompilation=true $(_runSmokeTestsOnlyArg) /p:BuildTestsOnHelix=true /p:EnableAdditionalTimezoneChecks=true /p:UsePortableRuntimePack=true /p:BuildDarwinFrameworks=true + buildArgs: -s mono+libs+libs.tests -c $(_BuildConfig) /p:ArchiveTests=true /p:DevTeamProvisioning=- /p:RunAOTCompilation=true $(_runSmokeTestsOnlyArg) /p:BuildTestsOnHelix=true /p:EnableAdditionalTimezoneChecks=true /p:UsePortableRuntimePack=true /p:BuildDarwinFrameworks=true /p:IsManualOrRollingBuild=true timeoutInMinutes: 180 condition: >- or( diff --git a/eng/testing/tests.ioslike.targets b/eng/testing/tests.ioslike.targets index c41a0d28e03375..fd7e4a9293814b 100644 --- a/eng/testing/tests.ioslike.targets +++ b/eng/testing/tests.ioslike.targets @@ -25,11 +25,10 @@ <_AfterBuildCommands> mv $XHARNESS_OUT/AOTBuild.binlog "$HELIX_WORKITEM_UPLOAD_ROOT" sign "$app" - xharness apple test --app "$app" --output-directory "$output_directory" --target "$target" --timeout "$timeout" --xcode "$xcode_path" -v --launch-timeout "$launch_timeout" $(_ResetSimulatorSwitch) $(_SignalAppEndSwitch) -- - + xharness apple test --app "$app" --output-directory "$output_directory" --target "$target" --timeout "$timeout" --xcode "$xcode_path" -v --launch-timeout "$launch_timeout" $(_ResetSimulatorSwitch) $(_SignalAppEndSwitch) -- $(_AOTBuildCommand) $(_AfterBuildCommands) - + diff --git a/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.cs b/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.cs index ddb7dd22d00be6..f8bcd91ab018ba 100644 --- a/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.cs +++ b/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.cs @@ -153,6 +153,7 @@ private static bool GetLinqExpressionsBuiltWithIsInterpretingOnly() public static bool IsNotIntMaxValueArrayIndexSupported => s_largeArrayIsNotSupported.Value; public static bool IsAssemblyLoadingSupported => !IsNativeAot; + public static bool IsNonBundledAssemblyLoadingSupported => !IsAssemblyLoadingSupported && !IsMonoAOT; public static bool IsMethodBodySupported => !IsNativeAot; public static bool IsDebuggerTypeProxyAttributeSupported => !IsNativeAot; public static bool HasAssemblyFiles => !string.IsNullOrEmpty(typeof(PlatformDetection).Assembly.Location); diff --git a/src/libraries/System.Formats.Cbor/tests/PropertyTests/CborPropertyTests.cs b/src/libraries/System.Formats.Cbor/tests/PropertyTests/CborPropertyTests.cs index d265baec831d56..dd1bbeb9c27610 100644 --- a/src/libraries/System.Formats.Cbor/tests/PropertyTests/CborPropertyTests.cs +++ b/src/libraries/System.Formats.Cbor/tests/PropertyTests/CborPropertyTests.cs @@ -178,6 +178,7 @@ _ when (length < ushort.MaxValue) => 1 + sizeof(ushort), } [Property(Replay = ReplaySeed, MaxTest = MaxTests, Arbitrary = new[] { typeof(CborRandomGenerators) })] + [ActiveIssue("https://github.com/dotnet/runtime/issues/73150", TestPlatforms.iOS | TestPlatforms.tvOS)] public static void CborDocument_Roundtrip(CborPropertyTestContext input) { byte[] encoding = CborDocumentSerializer.encode(input); diff --git a/src/libraries/System.IO.Compression.ZipFile/tests/ZipFile.Extract.cs b/src/libraries/System.IO.Compression.ZipFile/tests/ZipFile.Extract.cs index a9266c1817578d..30b94b7d0b023c 100644 --- a/src/libraries/System.IO.Compression.ZipFile/tests/ZipFile.Extract.cs +++ b/src/libraries/System.IO.Compression.ZipFile/tests/ZipFile.Extract.cs @@ -34,6 +34,7 @@ public void ExtractToDirectoryNull() } [Fact] + [ActiveIssue("https://github.com/dotnet/runtime/issues/72951", TestPlatforms.iOS | TestPlatforms.tvOS)] public void ExtractToDirectoryUnicode() { string zipFileName = zfile("unicode.zip"); diff --git a/src/libraries/System.IO.Compression.ZipFile/tests/ZipFileExtensions.ZipArchive.Extract.cs b/src/libraries/System.IO.Compression.ZipFile/tests/ZipFileExtensions.ZipArchive.Extract.cs index e0dfc37788d936..167079b14edd19 100644 --- a/src/libraries/System.IO.Compression.ZipFile/tests/ZipFileExtensions.ZipArchive.Extract.cs +++ b/src/libraries/System.IO.Compression.ZipFile/tests/ZipFileExtensions.ZipArchive.Extract.cs @@ -22,6 +22,7 @@ public void ExtractToDirectoryExtension() } [Fact] + [ActiveIssue("https://github.com/dotnet/runtime/issues/72951", TestPlatforms.iOS | TestPlatforms.tvOS)] public void ExtractToDirectoryExtension_Unicode() { using (ZipArchive archive = ZipFile.OpenRead(zfile("unicode.zip"))) diff --git a/src/libraries/System.Runtime.Extensions/tests/System/AppDomainTests.cs b/src/libraries/System.Runtime.Extensions/tests/System/AppDomainTests.cs index c77be0d4be29a7..74beb64d782734 100644 --- a/src/libraries/System.Runtime.Extensions/tests/System/AppDomainTests.cs +++ b/src/libraries/System.Runtime.Extensions/tests/System/AppDomainTests.cs @@ -8,6 +8,7 @@ using System.Net.Http; using System.Reflection; using System.Resources; +using System.Runtime.CompilerServices; using System.Runtime.ExceptionServices; using System.Runtime.Remoting; using System.Security; @@ -258,7 +259,7 @@ public void ExecuteAssemblyByName() }).Dispose(); } - [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsAssemblyLoadingSupported))] + [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNonBundledAssemblyLoadingSupported))] public void ExecuteAssembly() { CopyTestAssemblies(); diff --git a/src/libraries/System.Runtime.Extensions/tests/System/EnvironmentTests.cs b/src/libraries/System.Runtime.Extensions/tests/System/EnvironmentTests.cs index 45833c0c023246..dbd2ad22512e64 100644 --- a/src/libraries/System.Runtime.Extensions/tests/System/EnvironmentTests.cs +++ b/src/libraries/System.Runtime.Extensions/tests/System/EnvironmentTests.cs @@ -558,6 +558,7 @@ public unsafe void GetFolderPath_Windows(Environment.SpecialFolder folder) } [Fact] + [ActiveIssue("https://github.com/dotnet/runtime/issues/60586", TestPlatforms.iOS | TestPlatforms.tvOS)] [PlatformSpecific(TestPlatforms.AnyUnix)] // Uses P/Invokes public void GetLogicalDrives_Unix_AtLeastOneIsRoot() { diff --git a/src/libraries/System.Runtime.InteropServices/tests/System.Runtime.InteropServices.UnitTests/System/Runtime/InteropServices/Marshal/GetDelegateForFunctionPointerTests.cs b/src/libraries/System.Runtime.InteropServices/tests/System.Runtime.InteropServices.UnitTests/System/Runtime/InteropServices/Marshal/GetDelegateForFunctionPointerTests.cs index c11c75545d10f9..c52dd8d9b96321 100644 --- a/src/libraries/System.Runtime.InteropServices/tests/System.Runtime.InteropServices.UnitTests/System/Runtime/InteropServices/Marshal/GetDelegateForFunctionPointerTests.cs +++ b/src/libraries/System.Runtime.InteropServices/tests/System.Runtime.InteropServices.UnitTests/System/Runtime/InteropServices/Marshal/GetDelegateForFunctionPointerTests.cs @@ -13,7 +13,7 @@ namespace System.Runtime.InteropServices.Tests [ActiveIssue("https://github.com/dotnet/runtime/issues/39187", TestPlatforms.Browser)] public class GetDelegateForFunctionPointerTests { - [Theory] + [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsNotMonoAOT))] [InlineData(typeof(NonGenericDelegate))] [InlineData(typeof(MulticastDelegate))] [InlineData(typeof(OtherNonGenericDelegate))] @@ -28,7 +28,7 @@ public void GetDelegateForFunctionPointer_NonGeneric_ReturnsExpected(Type t) VerifyDelegate(functionDelegate, targetMethod); } - [Fact] + [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotMonoAOT))] public void GetDelegateForFunctionPointer_CollectibleType_ReturnsExpected() { MethodInfo targetMethod = typeof(GetDelegateForFunctionPointerTests).GetMethod(nameof(Method), BindingFlags.NonPublic | BindingFlags.Static); @@ -51,7 +51,7 @@ public void GetDelegateForFunctionPointer_CollectibleType_ReturnsExpected() VerifyDelegate(functionDelegate, targetMethod); } - [Fact] + [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotMonoAOT))] public void GetDelegateForFunctionPointer_Generic_ReturnsExpected() { MethodInfo targetMethod = typeof(GetDelegateForFunctionPointerTests).GetMethod(nameof(Method), BindingFlags.NonPublic | BindingFlags.Static); @@ -63,7 +63,7 @@ public void GetDelegateForFunctionPointer_Generic_ReturnsExpected() VerifyDelegate(functionDelegate, targetMethod); } - [Fact] + [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotMonoAOT))] public void GetDelegateForFunctionPointer_GenericInvalidType_ReturnsExpected() { MethodInfo targetMethod = typeof(GetDelegateForFunctionPointerTests).GetMethod(nameof(Method), BindingFlags.NonPublic | BindingFlags.Static); @@ -139,7 +139,7 @@ public void GetDelegateForFunctionPointer_InvalidType_ThrowsArgumentException(Ty AssertExtensions.Throws("t", () => Marshal.GetDelegateForFunctionPointer((IntPtr)1, t)); } - [Fact] + [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotMonoAOT))] public void GetDelegateForFunctionPointer_CantCast_ThrowsInvalidCastException() { MethodInfo targetMethod = typeof(GetDelegateForFunctionPointerTests).GetMethod(nameof(Method), BindingFlags.NonPublic | BindingFlags.Static); diff --git a/src/libraries/System.Runtime.InteropServices/tests/System.Runtime.InteropServices.UnitTests/System/Runtime/InteropServices/Marshal/GetFunctionPointerForDelegateTests.cs b/src/libraries/System.Runtime.InteropServices/tests/System.Runtime.InteropServices.UnitTests/System/Runtime/InteropServices/Marshal/GetFunctionPointerForDelegateTests.cs index 9fd725f06b7ff9..f6ce9be0b8bf3c 100644 --- a/src/libraries/System.Runtime.InteropServices/tests/System.Runtime.InteropServices.UnitTests/System/Runtime/InteropServices/Marshal/GetFunctionPointerForDelegateTests.cs +++ b/src/libraries/System.Runtime.InteropServices/tests/System.Runtime.InteropServices.UnitTests/System/Runtime/InteropServices/Marshal/GetFunctionPointerForDelegateTests.cs @@ -10,7 +10,7 @@ namespace System.Runtime.InteropServices.Tests { public class GetFunctionPointerForDelegateTests { - [Fact] + [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotMonoAOT))] [ActiveIssue("https://github.com/dotnet/runtime/issues/39187", TestPlatforms.Browser)] public void GetFunctionPointerForDelegate_NormalDelegateNonGeneric_ReturnsExpected() { @@ -23,7 +23,7 @@ public void GetFunctionPointerForDelegate_NormalDelegateNonGeneric_ReturnsExpect Assert.Equal(pointer1, pointer2); } - [Fact] + [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotMonoAOT))] [ActiveIssue("https://github.com/dotnet/runtime/issues/39187", TestPlatforms.Browser)] public void GetFunctionPointerForDelegate_MarshalledDelegateNonGeneric_ReturnsExpected() { @@ -40,7 +40,7 @@ public void GetFunctionPointerForDelegate_MarshalledDelegateNonGeneric_ReturnsEx Assert.Equal(pointer1, pointer2); } - [Fact] + [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotMonoAOT))] [ActiveIssue("https://github.com/dotnet/runtime/issues/39187", TestPlatforms.Browser)] public void GetFunctionPointerForDelegate_NormalDelegateGeneric_ReturnsExpected() { @@ -53,7 +53,7 @@ public void GetFunctionPointerForDelegate_NormalDelegateGeneric_ReturnsExpected( Assert.Equal(pointer1, pointer2); } - [Fact] + [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotMonoAOT))] [ActiveIssue("https://github.com/dotnet/runtime/issues/39187", TestPlatforms.Browser)] public void GetFunctionPointerForDelegate_MarshalledDelegateGeneric_ReturnsExpected() { @@ -92,7 +92,7 @@ public void GetFunctionPointer_GenericDelegate_ThrowsArgumentException() AssertExtensions.Throws("delegate", () => Marshal.GetFunctionPointerForDelegate(d)); } - [Fact] + [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotMonoAOT))] [SkipOnPlatform(TestPlatforms.Browser, "Not supported on Browser.")] public void GetFunctionPointerForDelegate_MarshalledOpenStaticDelegate() { @@ -102,7 +102,7 @@ public void GetFunctionPointerForDelegate_MarshalledOpenStaticDelegate() Assert.NotEqual(IntPtr.Zero, ptr); } - [Fact] + [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotMonoAOT))] [SkipOnPlatform(TestPlatforms.Browser, "Not supported on Browser.")] public void GetFunctionPointerForDelegate_MarshalledClosedStaticDelegate() { diff --git a/src/libraries/System.Runtime.InteropServices/tests/System.Runtime.InteropServices.UnitTests/System/Runtime/InteropServices/Marshal/IsComObjectTests.cs b/src/libraries/System.Runtime.InteropServices/tests/System.Runtime.InteropServices.UnitTests/System/Runtime/InteropServices/Marshal/IsComObjectTests.cs index 456f68f7ad797d..9aa029e8ea86e1 100644 --- a/src/libraries/System.Runtime.InteropServices/tests/System.Runtime.InteropServices.UnitTests/System/Runtime/InteropServices/Marshal/IsComObjectTests.cs +++ b/src/libraries/System.Runtime.InteropServices/tests/System.Runtime.InteropServices.UnitTests/System/Runtime/InteropServices/Marshal/IsComObjectTests.cs @@ -53,7 +53,7 @@ public static IEnumerable IsComObject_TestData() yield return new object[] { collectibleComImportObject }; } - [Theory] + [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsNotMonoAOT))] [MemberData(nameof(IsComObject_TestData))] public void IsComObject_NonComObject_ReturnsFalse(object value) { diff --git a/src/libraries/System.Runtime.InteropServices/tests/System.Runtime.InteropServices.UnitTests/System/Runtime/InteropServices/Marshal/PtrToStructureTests.cs b/src/libraries/System.Runtime.InteropServices/tests/System.Runtime.InteropServices.UnitTests/System/Runtime/InteropServices/Marshal/PtrToStructureTests.cs index dbd31cfa4adf35..c9c50f15f8c362 100644 --- a/src/libraries/System.Runtime.InteropServices/tests/System.Runtime.InteropServices.UnitTests/System/Runtime/InteropServices/Marshal/PtrToStructureTests.cs +++ b/src/libraries/System.Runtime.InteropServices/tests/System.Runtime.InteropServices.UnitTests/System/Runtime/InteropServices/Marshal/PtrToStructureTests.cs @@ -13,6 +13,7 @@ namespace System.Runtime.InteropServices.Tests public class PtrToStructureTests { [Fact] + [ActiveIssue("https://github.com/dotnet/runtime/issues/73008", TestPlatforms.iOS | TestPlatforms.tvOS)] public void StructureToPtr_NonGenericType_ReturnsExpected() { var structure = new SequentialClass @@ -64,6 +65,7 @@ public void StructureToPtr_GenericType_ReturnsExpected() } [Fact] + [ActiveIssue("https://github.com/dotnet/runtime/issues/73008", TestPlatforms.iOS | TestPlatforms.tvOS)] public void StructureToPtr_NonGenericObject_ReturnsExpected() { var structure = new SomeTestStruct @@ -90,6 +92,7 @@ public void StructureToPtr_NonGenericObject_ReturnsExpected() } [Fact] + [ActiveIssue("https://github.com/dotnet/runtime/issues/73008", TestPlatforms.iOS | TestPlatforms.tvOS)] public void StructureToPtr_GenericObject_ReturnsExpected() { var structure = new SomeTestStruct @@ -146,6 +149,7 @@ public void PtrToStructure_AutoLayoutClass_ThrowsArgumentException() } [Fact] + [ActiveIssue("https://github.com/dotnet/runtime/issues/73008", TestPlatforms.iOS | TestPlatforms.tvOS)] public unsafe void PtrToStructure_GenericLayoutClass_Generic() { int i = 42; @@ -156,6 +160,7 @@ public unsafe void PtrToStructure_GenericLayoutClass_Generic() } [Fact] + [ActiveIssue("https://github.com/dotnet/runtime/issues/73008", TestPlatforms.iOS | TestPlatforms.tvOS)] public unsafe void PtrToStructure_GenericLayoutClass() { int i = 42; diff --git a/src/libraries/System.Runtime.InteropServices/tests/System.Runtime.InteropServices.UnitTests/System/Runtime/InteropServices/Marshal/StructureToPtrTests.cs b/src/libraries/System.Runtime.InteropServices/tests/System.Runtime.InteropServices.UnitTests/System/Runtime/InteropServices/Marshal/StructureToPtrTests.cs index ea55d5c177c54e..61acb05db5e85f 100644 --- a/src/libraries/System.Runtime.InteropServices/tests/System.Runtime.InteropServices.UnitTests/System/Runtime/InteropServices/Marshal/StructureToPtrTests.cs +++ b/src/libraries/System.Runtime.InteropServices/tests/System.Runtime.InteropServices.UnitTests/System/Runtime/InteropServices/Marshal/StructureToPtrTests.cs @@ -257,6 +257,7 @@ public unsafe void StructureToPtr_OpaqueStruct_In_NonBlittableStructure_Success( } [Fact] + [ActiveIssue("https://github.com/dotnet/runtime/issues/73008", TestPlatforms.iOS | TestPlatforms.tvOS)] public void StructureToPtr_Flat_And_Nested_NonBlittableStructure_Success() { MarshalAndDestroy(new NonBlittableStruct_Flat diff --git a/src/libraries/System.Runtime.Loader/tests/DefaultContext/DefaultLoadContextTest.cs b/src/libraries/System.Runtime.Loader/tests/DefaultContext/DefaultLoadContextTest.cs index 420f24fa625f70..227f4d9111a1ff 100644 --- a/src/libraries/System.Runtime.Loader/tests/DefaultContext/DefaultLoadContextTest.cs +++ b/src/libraries/System.Runtime.Loader/tests/DefaultContext/DefaultLoadContextTest.cs @@ -83,7 +83,9 @@ private Assembly ResolveNullAssembly(AssemblyLoadContext sender, AssemblyName as return null; } - [Fact] + // Does not apply to Mono AOT scenarios as it is expected the name of the .aotdata file matches + // the true name of the assembly and not the physical file name. + [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotMonoAOT))] public void LoadInDefaultContext() { // This will attempt to load an assembly, by path, in the Default Load context via the Resolving event diff --git a/src/libraries/tests.proj b/src/libraries/tests.proj index 80383f69431680..3a54a186ae86e0 100644 --- a/src/libraries/tests.proj +++ b/src/libraries/tests.proj @@ -254,7 +254,6 @@ - @@ -276,21 +275,29 @@ + + + + + + @@ -613,11 +620,19 @@ + + + + + + + +