Skip to content

Commit 804a549

Browse files
Anandhan Rajagopalrmarinho
andauthored
[Testing, CI] Increased threshold value to make Resizetizer unit tests pass on arm64 machines (#27684)
* Increased threshold value to make some tests pass on arm64 machines * Update SkiaSharpScenarioTests.cs * [ci] Run build in arm64 or x64 machines --------- Co-authored-by: Rui Marinho <me@ruimarinho.net>
1 parent 4e7ff9d commit 804a549

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

eng/pipelines/handlers.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@ parameters:
8080
vmImage: $(macOSXVmImage)
8181
demands:
8282
- macOS.Name -equals Sonoma
83-
- macOS.Architecture -equals x64
8483
artifact: build-macos
8584

8685
- name: PackPlatforms

src/Graphics/tests/Graphics.Tests/SkiaSharpScenarioTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public void Scenario(string scenarioName)
4040
}
4141

4242
// file existed, compare
43-
ImageAssert.Equivalent(bmp.SKImage, expectedImagePath, GetErrorsImageDirectory(), 0);
43+
ImageAssert.Equivalent(bmp.SKImage, expectedImagePath, GetErrorsImageDirectory(), 0.07);
4444
}
4545

4646
private static string ProjectRoot =>

src/SingleProject/Resizetizer/test/UnitTests/BaseTest.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public class BaseTest : IDisposable
1414
{
1515
private const string TestFolderName = "Microsoft.Maui.Resizetizer.Tests";
1616
private const string TestImagesFolderName = "imageresults";
17-
private const double ImageErrorThreshold = 0.0027;
17+
private const double ImageErrorThreshold = 0.27;
1818

1919
private readonly string DeleteDirectory;
2020
protected readonly string DestinationDirectory;
@@ -143,7 +143,7 @@ void AssertFileMatchesReal(string actualFilename, object[] args = null, [CallerM
143143

144144
Output.WriteLine($"Validating image similarity with diff dir:{diffDir}");
145145

146-
ImageAssert.Equivalent(actualFilename, expectedFilename, diffDir);
146+
ImageAssert.Equivalent(actualFilename, expectedFilename, diffDir, ImageErrorThreshold);
147147
}
148148
}
149149

0 commit comments

Comments
 (0)