Skip to content

Commit 82d4f93

Browse files
committed
Fixes from PR comments.
1 parent 68b0c14 commit 82d4f93

File tree

3 files changed

+8
-24
lines changed

3 files changed

+8
-24
lines changed

test/Microsoft.ML.TestFramework/Attributes/NotArm32FactAttribute.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
// The .NET Foundation licenses this file to you under the MIT license.
33
// See the LICENSE file in the project root for more information.
44

5+
using System;
56
using System.Runtime.InteropServices;
7+
using Microsoft.ML.TestFrameworkCommon.Attributes;
68

79
namespace Microsoft.ML.TestFramework.Attributes
810
{

test/Microsoft.ML.TestFramework/Attributes/NotArmFactAttribute.cs

Lines changed: 0 additions & 21 deletions
This file was deleted.

test/Microsoft.ML.Tests/ImagesTests.cs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77
using System.Drawing;
88
using System.IO;
99
using System.Linq;
10+
using System.Runtime.InteropServices;
1011
using Microsoft.ML.Data;
1112
using Microsoft.ML.Model;
1213
using Microsoft.ML.RunTests;
1314
using Microsoft.ML.Runtime;
14-
using Microsoft.ML.TestFramework.Attributes;
1515
using Microsoft.ML.Transforms.Image;
1616
using Xunit;
1717
using Xunit.Abstractions;
@@ -20,6 +20,9 @@ namespace Microsoft.ML.Tests
2020
{
2121
public class ImageTests : TestDataPipeBase
2222
{
23+
private static readonly Lazy<bool> _isNotArm = new(() => RuntimeInformation.ProcessArchitecture != Architecture.Arm && RuntimeInformation.ProcessArchitecture != Architecture.Arm64);
24+
protected static bool IsNotArm => _isNotArm.Value;
25+
2326
public ImageTests(ITestOutputHelper output) : base(output)
2427
{
2528
}
@@ -473,7 +476,7 @@ public void TestBackAndForthConversionWithDifferentOrder()
473476
Done();
474477
}
475478

476-
[NotArmFact("System.Drawing has some issues on ARM. Disabling this test for CI stability. Tracked in https://github.com/dotnet/machinelearning/issues/6043")]
479+
[ConditionalFact(nameof(IsNotArm))] //"System.Drawing has some issues on ARM. Disabling this test for CI stability. Tracked in https://github.com/dotnet/machinelearning/issues/6043"
477480
public void TestBackAndForthConversionWithAlphaNoInterleave()
478481
{
479482
IHostEnvironment env = new MLContext(1);
@@ -587,7 +590,7 @@ public void TestBackAndForthConversionWithoutAlphaNoInterleave()
587590
Done();
588591
}
589592

590-
[Fact]
593+
[ConditionalFact(nameof(IsNotArm))] //"System.Drawing has some issues on ARM. Disabling this test for CI stability. Tracked in https://github.com/dotnet/machinelearning/issues/6043"
591594
public void TestBackAndForthConversionWithAlphaInterleaveNoOffset()
592595
{
593596
IHostEnvironment env = new MLContext(1);

0 commit comments

Comments
 (0)