Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Disable arm64-win10 tests preventing clean build
  • Loading branch information
Mateo Torres Ruiz committed Aug 2, 2021
commit e3e8f3654fb7948b31a0c7de00d187a63836924f
31 changes: 31 additions & 0 deletions src/libraries/System.Drawing.Common/tests/GraphicsTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
using System.Drawing.Drawing2D;
using System.Drawing.Imaging;
using System.Drawing.Text;
using Microsoft.DotNet.XUnitExtensions;
using Xunit;

namespace System.Drawing.Tests
Expand Down Expand Up @@ -102,6 +103,12 @@ public static IEnumerable<object[]> FromHdc_TestData()
[MemberData(nameof(FromHdc_TestData))]
public void FromHdc_ValidHdc_ReturnsExpected(IntPtr hdc)
{
if (PlatformDetection.IsArm64Process && OperatingSystem.IsWindows())
{
// ActiveIssue: 51097
Copy link
Member

@safern safern Aug 2, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we instead use the ActiveIssueAttribute that uses a conditional member?

https://github.com/dotnet/arcade/blob/a50c27610c6a060c677090b801636cd7149cd591/src/Microsoft.DotNet.XUnitExtensions/src/Attributes/ActiveIssueAttribute.cs#L23

If the condition is true, then it'll skip it. Here is an example:

[ActiveIssue("https://github.com/dotnet/runtime/issues/55117", typeof(PlatformDetection), nameof(PlatformDetection.IsLinqExpressionsBuiltWithIsInterpretingOnly))]

throw new SkipTestException("Visible clipping region is not empty.");
}

using (Graphics graphics = Graphics.FromHdc(hdc))
{
Rectangle expected = Helpers.GetWindowDCRect(hdc);
Expand All @@ -114,6 +121,12 @@ public void FromHdc_ValidHdc_ReturnsExpected(IntPtr hdc)
[MemberData(nameof(FromHdc_TestData))]
public void FromHdc_ValidHdcWithContext_ReturnsExpected(IntPtr hdc)
{
if (PlatformDetection.IsArm64Process && OperatingSystem.IsWindows())
{
// ActiveIssue: 51097
throw new SkipTestException("Visible clipping region is not empty.");
}

using (Graphics graphics = Graphics.FromHdc(hdc, IntPtr.Zero))
{
Rectangle expected = Helpers.GetWindowDCRect(hdc);
Expand All @@ -126,6 +139,12 @@ public void FromHdc_ValidHdcWithContext_ReturnsExpected(IntPtr hdc)
[MemberData(nameof(FromHdc_TestData))]
public void FromHdcInternal_GetDC_ReturnsExpected(IntPtr hdc)
{
if (PlatformDetection.IsArm64Process && OperatingSystem.IsWindows())
{
// ActiveIssue: 51097
throw new SkipTestException("Visible clipping region is not empty.");
}

using (Graphics graphics = Graphics.FromHdcInternal(hdc))
{
Rectangle expected = Helpers.GetWindowDCRect(hdc);
Expand Down Expand Up @@ -262,6 +281,12 @@ public static IEnumerable<object[]> Hwnd_TestData()
[MemberData(nameof(Hwnd_TestData))]
public void FromHwnd_ValidHwnd_ReturnsExpected(IntPtr hWnd)
{
if (PlatformDetection.IsArm64Process && OperatingSystem.IsWindows ())
{
// ActiveIssue: 51097
throw new SkipTestException("Visible clipping region is not empty.");
}

using (Graphics graphics = Graphics.FromHwnd(hWnd))
{
Rectangle expected = Helpers.GetHWndRect(hWnd);
Expand All @@ -274,6 +299,12 @@ public void FromHwnd_ValidHwnd_ReturnsExpected(IntPtr hWnd)
[MemberData(nameof(Hwnd_TestData))]
public void FromHwndInternal_ValidHwnd_ReturnsExpected(IntPtr hWnd)
{
if (PlatformDetection.IsArm64Process && OperatingSystem.IsWindows())
{
// ActiveIssue: 51097
throw new SkipTestException("Visible clipping region is not empty.");
}

using (Graphics graphics = Graphics.FromHwnd(hWnd))
{
Rectangle expected = Helpers.GetHWndRect(hWnd);
Expand Down