[iOS/tvOS/MacCatalyst] Disable some of the library tests due to failures (#56074)
authorMaxim Lipnin <v-maxlip@microsoft.com>
Thu, 22 Jul 2021 19:39:41 +0000 (22:39 +0300)
committerGitHub <noreply@github.com>
Thu, 22 Jul 2021 19:39:41 +0000 (15:39 -0400)
It's to clean up the respective CI staging lanes.

The related issues:

[iOS/tvOS/MacCatalyst] Test failures in System.Diagnostics.Tracing.Tests #56073

[libraries][iOSSimulator] ImageTests.FromFile_NullFileName_ThrowsArgumentNullException fails  #56048

JitInfoIsPopulated failed with after is not greater than before #55712

[MacCatalyst] Test failures in System.Tests.OperatingSystemTests #56084

[MacCatalyst] App crash in System.Text.Json.SourceGeneration.Tests #56085

src/libraries/System.Diagnostics.Tracing/tests/BasicEventSourceTest/ActivityTracking.cs
src/libraries/System.Drawing.Common/tests/BrushTests.cs
src/libraries/System.Drawing.Common/tests/Drawing2D/HatchBrushTests.cs
src/libraries/System.Drawing.Common/tests/ImageTests.cs
src/libraries/System.Runtime.Extensions/tests/System/OperatingSystemTests.cs
src/libraries/System.Runtime/tests/System/Runtime/JitInfoTests.cs
src/libraries/tests.proj

index 1330901..409efbe 100644 (file)
@@ -14,6 +14,7 @@ namespace BasicEventSourceTests
     public class ActivityTracking
     {
         [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotBrowser))]
+        [ActiveIssue("https://github.com/dotnet/runtime/issues/56073", TestPlatforms.iOS | TestPlatforms.tvOS | TestPlatforms.MacCatalyst)]
         public void StartStopCreatesActivity()
         {
             using ActivityEventListener l = new ActivityEventListener();
@@ -27,6 +28,7 @@ namespace BasicEventSourceTests
         }
 
         [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotBrowser))]
+        [ActiveIssue("https://github.com/dotnet/runtime/issues/56073", TestPlatforms.iOS | TestPlatforms.tvOS | TestPlatforms.MacCatalyst)]
         public async Task ActivityFlowsAsync()
         {
             using ActivityEventListener l = new ActivityEventListener();
@@ -75,6 +77,7 @@ namespace BasicEventSourceTests
         // the future we might decide it wasn't even desirable to begin with.
         // Compare with SetCurrentActivityIdAfterEventDoesNotFlowAsync below.
         [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotBrowser))]
+        [ActiveIssue("https://github.com/dotnet/runtime/issues/56073", TestPlatforms.iOS | TestPlatforms.tvOS | TestPlatforms.MacCatalyst)]
         public async Task SetCurrentActivityIdBeforeEventFlowsAsync()
         {
             using ActivityEventListener l = new ActivityEventListener();
@@ -100,6 +103,7 @@ namespace BasicEventSourceTests
         // the future we might decide it wasn't even desirable to begin with.
         // Compare with SetCurrentActivityIdBeforeEventFlowsAsync above.
         [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotBrowser))]
+        [ActiveIssue("https://github.com/dotnet/runtime/issues/56073", TestPlatforms.iOS | TestPlatforms.tvOS | TestPlatforms.MacCatalyst)]
         public async Task SetCurrentActivityIdAfterEventDoesNotFlowAsync()
         {
             using ActivityEventListener l = new ActivityEventListener();
index 3060b85..5cf621a 100644 (file)
@@ -7,7 +7,7 @@ namespace System.Drawing.Tests
 {
     public class BrushTests
     {
-        [Fact]
+        [ConditionalFact(Helpers.IsDrawingSupported)]
         public void SetNativeBrush_Brush_Success()
         {
             using (var brush = new SubBrush())
index 8ed7826..09aeae8 100644 (file)
@@ -51,7 +51,7 @@ namespace System.Drawing.Drawing2D.Tests
             }
         }
 
-        [Theory]
+        [ConditionalTheory(Helpers.IsDrawingSupported)]
         [InlineData(HatchStyle.Horizontal -1 )]
         [InlineData(HatchStyle.SolidDiamond + 1)]
         public void Ctor_InvalidHatchStyle_ThrowsArgumentException(HatchStyle hatchStyle)
index 08cce11..5357e9a 100644 (file)
@@ -1,6 +1,7 @@
 // Licensed to the .NET Foundation under one or more agreements.
 // The .NET Foundation licenses this file to you under the MIT license.
 
+using System;
 using System.Collections.Generic;
 using System.Drawing.Imaging;
 using System.IO;
@@ -13,6 +14,7 @@ using Encoder = System.Drawing.Imaging.Encoder;
 
 namespace System.Drawing.Tests
 {
+    [ConditionalClass(typeof(PlatformDetection),nameof(PlatformDetection.IsDrawingSupported))]
     public class ImageTests
     {
         private const int PropertyTagLuminanceTable = 0x5090;
@@ -22,7 +24,7 @@ namespace System.Drawing.Tests
         private const int PropertyTagTypeShort = 3;
 
         [ActiveIssue("https://github.com/dotnet/runtime/issues/22221", TestPlatforms.AnyUnix)]
-        [ConditionalFact(Helpers.IsDrawingSupported)]
+        [Fact]
         public void PropertyIdList_GetBitmapJpg_Success()
         {
             using var bitmap = new Bitmap(Helpers.GetTestBitmapPath("nature24bits.jpg"));
@@ -30,7 +32,7 @@ namespace System.Drawing.Tests
             Assert.NotSame(bitmap.PropertyIdList, bitmap.PropertyIdList);
         }
 
-        [ConditionalFact(Helpers.IsDrawingSupported)]
+        [Fact]
         [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Returns new int[0] in .NET Framework.")]
         public void PropertyIdList_GetEmptyMemoryBitmap_ReturnsExpected()
         {
@@ -40,7 +42,7 @@ namespace System.Drawing.Tests
         }
 
         [ActiveIssue("https://github.com/dotnet/runtime/issues/22221", TestPlatforms.AnyUnix)]
-        [ConditionalFact(Helpers.IsDrawingSupported)]
+        [Fact]
         public void PropertyItems_GetBitmapJpg_Success()
         {
             using var bitmap = new Bitmap(Helpers.GetTestBitmapPath("nature24bits.jpg"));
@@ -82,7 +84,7 @@ namespace System.Drawing.Tests
             Assert.NotSame(items, bitmap.PropertyItems);
         }
 
-        [ConditionalFact(Helpers.IsDrawingSupported)]
+        [Fact]
         [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Returns new PropertyItem[0] in .NET Framework.")]
         public void PropertyItems_GetEmptyBitmapBmp_Success()
         {
@@ -91,7 +93,7 @@ namespace System.Drawing.Tests
             Assert.Same(bitmap.PropertyItems, bitmap.PropertyItems);
         }
 
-        [ConditionalFact(Helpers.IsDrawingSupported)]
+        [Fact]
         [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Returns new PropertyItem[0] in .NET Framework.")]
         public void PropertyItems_GetEmptyMemoryBitmap_ReturnsExpected()
         {
@@ -101,7 +103,7 @@ namespace System.Drawing.Tests
         }
 
         [ActiveIssue("https://github.com/dotnet/runtime/issues/22221", TestPlatforms.AnyUnix)]
-        [ConditionalFact(Helpers.IsDrawingSupported)]
+        [Fact]
         public void GetPropertyItem_InvokeExistsBitmapBmp_Success()
         {
             using var bitmap = new Bitmap(Helpers.GetTestBitmapPath("nature24bits.jpg"));
@@ -112,7 +114,7 @@ namespace System.Drawing.Tests
             Assert.Equal("LEAD Technologies Inc. V1.01\0", Encoding.ASCII.GetString(item.Value));
         }
 
-        [ConditionalTheory(Helpers.IsDrawingSupported)]
+        [Theory]
         [InlineData(0)]
         [InlineData(1)]
         [InlineData(-1)]
@@ -122,7 +124,7 @@ namespace System.Drawing.Tests
             Assert.Throws<ArgumentException>(null, () => bitmap.GetPropertyItem(propid));
         }
 
-        [ConditionalTheory(Helpers.IsDrawingSupported)]
+        [Theory]
         [InlineData(0)]
         [InlineData(1)]
         [InlineData(-1)]
@@ -133,7 +135,7 @@ namespace System.Drawing.Tests
         }
 
         [ActiveIssue("https://github.com/dotnet/runtime/issues/22221", TestPlatforms.AnyUnix)]
-        [ConditionalFact(Helpers.IsDrawingSupported)]
+        [Fact]
         public void RemovePropertyItem_InvokeMemoryBitmap_Success()
         {
             using var source = new Bitmap(Helpers.GetTestBitmapPath("nature24bits.jpg"));
@@ -162,7 +164,7 @@ namespace System.Drawing.Tests
         }
 
         [ActiveIssue("https://github.com/dotnet/runtime/issues/22221", TestPlatforms.AnyUnix)]
-        [ConditionalFact(Helpers.IsDrawingSupported)]
+        [Fact]
         public void RemovePropertyItem_InvokeBitmapJpg_Success()
         {
             using var bitmap = new Bitmap(Helpers.GetTestBitmapPath("nature24bits.jpg"));
@@ -183,7 +185,7 @@ namespace System.Drawing.Tests
         }
 
         [ActiveIssue("https://github.com/dotnet/runtime/issues/22221", TestPlatforms.AnyUnix)]
-        [ConditionalTheory(Helpers.IsDrawingSupported)]
+        [Theory]
         [InlineData(0)]
         [InlineData(1)]
         [InlineData(-1)]
@@ -194,7 +196,7 @@ namespace System.Drawing.Tests
         }
 
         [ActiveIssue("https://github.com/dotnet/runtime/issues/22221", TestPlatforms.AnyUnix)]
-        [ConditionalTheory(Helpers.IsDrawingSupported)]
+        [Theory]
         [InlineData(0)]
         [InlineData(1)]
         [InlineData(-1)]
@@ -205,7 +207,7 @@ namespace System.Drawing.Tests
         }
   
         [ActiveIssue("https://github.com/dotnet/runtime/issues/22221", TestPlatforms.AnyUnix)]
-        [ConditionalTheory(Helpers.IsDrawingSupported)]
+        [Theory]
         [InlineData(0)]
         [InlineData(1)]
         [InlineData(-1)]
@@ -224,7 +226,7 @@ namespace System.Drawing.Tests
         }
   
         [ActiveIssue("https://github.com/dotnet/runtime/issues/22221", TestPlatforms.AnyUnix)]
-        [ConditionalTheory(Helpers.IsDrawingSupported)]
+        [Theory]
         [InlineData(0)]
         [InlineData(1)]
         [InlineData(-1)]
@@ -235,7 +237,7 @@ namespace System.Drawing.Tests
         }
 
         [ActiveIssue("https://github.com/dotnet/runtime/issues/22221", TestPlatforms.AnyUnix)]
-        [ConditionalTheory(Helpers.IsDrawingSupported)]
+        [Theory]
         [InlineData(0)]
         [InlineData(1)]
         [InlineData(-1)]
@@ -295,7 +297,7 @@ namespace System.Drawing.Tests
         }
 
         [ActiveIssue("https://github.com/dotnet/runtime/issues/22221", TestPlatforms.AnyUnix)]
-        [ConditionalTheory(Helpers.IsDrawingSupported)]
+        [Theory]
         [InlineData(0)]
         [InlineData(1)]
         [InlineData(-1)]
@@ -438,7 +440,7 @@ namespace System.Drawing.Tests
         }
 
         [ActiveIssue("https://github.com/dotnet/runtime/issues/22221", TestPlatforms.AnyUnix)]
-        [ConditionalTheory(Helpers.IsDrawingSupported)]
+        [Theory]
         [InlineData(0)]
         [InlineData(1)]
         [InlineData(-1)]
@@ -508,7 +510,7 @@ namespace System.Drawing.Tests
         }
 
         [ActiveIssue("https://github.com/dotnet/runtime/issues/22221", TestPlatforms.AnyUnix)]
-        [ConditionalTheory(Helpers.IsDrawingSupported)]
+        [Theory]
         [MemberData(nameof(InvalidBytes_TestData))]
         public void FromFile_InvalidBytes_ThrowsOutOfMemoryException(byte[] bytes)
         {
@@ -564,7 +566,7 @@ namespace System.Drawing.Tests
 
         [ActiveIssue("https://github.com/dotnet/runtime/issues/22221", TestPlatforms.AnyUnix)]
         [ActiveIssue("https://github.com/dotnet/runtime/issues/34591", TestPlatforms.Windows, TargetFrameworkMonikers.Netcoreapp, TestRuntimes.Mono)]
-        [ConditionalTheory(Helpers.IsDrawingSupported)]
+        [Theory]
         [MemberData(nameof(InvalidBytes_TestData))]
         public void FromStream_InvalidBytes_ThrowsArgumentException(byte[] bytes)
         {
@@ -686,7 +688,7 @@ namespace System.Drawing.Tests
         }
 
         [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, ".NET Framework throws ExternalException")]
-        [ConditionalFact(Helpers.IsDrawingSupported)]
+        [Fact]
         public void Save_InvalidDirectory_ThrowsDirectoryNotFoundException()
         {
             using (var bitmap = new Bitmap(1, 1))
index 405cf43..40fea32 100644 (file)
@@ -102,9 +102,11 @@ namespace System.Tests
         public static void TestIsOSVersionAtLeast_Android_21() => Assert.True(OperatingSystem.IsAndroidVersionAtLeast(21)); // 21 is our min supported version
 
         [Fact, PlatformSpecific(TestPlatforms.iOS)]
+        [ActiveIssue("https://github.com/dotnet/runtime/issues/56084", TestPlatforms.MacCatalyst)]
         public static void TestIsOSPlatform_IOS() => TestIsOSPlatform("iOS", OperatingSystem.IsIOS);
 
         [Fact, PlatformSpecific(TestPlatforms.iOS)]
+        [ActiveIssue("https://github.com/dotnet/runtime/issues/56084", TestPlatforms.MacCatalyst)]
         public static void TestIsOSVersionAtLeast_IOS() => TestIsOSVersionAtLeast("iOS");
 
         [Fact, PlatformSpecific(TestPlatforms.OSX)]
@@ -127,9 +129,11 @@ namespace System.Tests
         }
 
         [Fact, PlatformSpecific(TestPlatforms.MacCatalyst)]
+        [ActiveIssue("https://github.com/dotnet/runtime/issues/56084", TestPlatforms.MacCatalyst)]
         public static void TestIsOSPlatform_MacCatalyst() => TestIsOSPlatform("MacCatalyst", OperatingSystem.IsMacCatalyst);
 
         [Fact, PlatformSpecific(TestPlatforms.MacCatalyst)]
+        [ActiveIssue("https://github.com/dotnet/runtime/issues/56084", TestPlatforms.MacCatalyst)]
         public static void TestIsOSVersionAtLeast_MacCatalyst() => TestIsOSVersionAtLeast("MacCatalyst");
 
         [Fact, PlatformSpecific(TestPlatforms.MacCatalyst)]
@@ -143,6 +147,7 @@ namespace System.Tests
         }
 
         [Fact, PlatformSpecific(TestPlatforms.iOS)]
+        [ActiveIssue("https://github.com/dotnet/runtime/issues/56084", TestPlatforms.MacCatalyst)]
         public static void IOS_Is_Not_Also_MacCatalyst()
         {
             Assert.False(OperatingSystem.IsOSPlatform("MacCatalyst"));
index f0a7eca..f44266e 100644 (file)
@@ -38,6 +38,7 @@ namespace System.Runtime.Tests
         }
 
         [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotMonoAOT))] // JitInfo metrics will be 0 in AOT scenarios
+        [ActiveIssue("https://github.com/dotnet/runtime/issues/55712", TestPlatforms.iOS | TestPlatforms.tvOS | TestPlatforms.MacCatalyst)]
         public void JitInfoIsPopulated()
         {
             TimeSpan beforeCompilationTime = System.Runtime.JitInfo.GetCompilationTime();
index 5217eb5..6e39e1b 100644 (file)
     <!-- https://github.com/dotnet/runtime/issues/52120 -->
     <ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Net.Security/tests/FunctionalTests/System.Net.Security.Tests.csproj" />
 
+    <!-- Crash https://github.com/dotnet/runtime/issues/55823 -->
+    <ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Runtime.Experimental\tests\System.Runtime.Experimental.Tests.csproj" />
+
     <!-- Crashes on CI but passes locally https://github.com/dotnet/runtime/issues/52615 -->
     <ProjectExclusions Include="$(MSBuildThisFileDirectory)Microsoft.Extensions.Http/tests/Microsoft.Extensions.Http.Tests/Microsoft.Extensions.Http.Tests.csproj" />
     <ProjectExclusions Include="$(MSBuildThisFileDirectory)Microsoft.Extensions.Logging/tests/Common/Microsoft.Extensions.Logging.Tests.csproj" />
     <ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Threading.Tasks\tests\System.Threading.Tasks.Tests.csproj" />
     <ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Threading.Tasks.Dataflow\tests\System.Threading.Tasks.Dataflow.Tests.csproj" />
 
+    <!-- Crash https://github.com/dotnet/runtime/issues/56085 -->
+    <ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Text.Json\tests\System.Text.Json.SourceGeneration.Tests\System.Text.Json.SourceGeneration.Tests.csproj" />
+
     <!-- Crashes on CI but passes locally https://github.com/dotnet/runtime/issues/52615 -->
     <ProjectExclusions Include="$(RepoRoot)\src\tests\FunctionalTests\iOS\Simulator\Interpreter\iOS.Simulator.Interpreter.Test.csproj" />
     <ProjectExclusions Include="$(RepoRoot)\src\tests\FunctionalTests\iOS\Simulator\InvariantCultureOnlyMode\iOS.Simulator.InvariantCultureOnlyMode.Test.csproj" />