Skip to content

Commit e24e80b

Browse files
Set golden image tolerance to 1 on Windows to reduce test flakiness caused by minor rendering discrepancies
1 parent 16fa75f commit e24e80b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Tests/ProcessGoldenImages.bat

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ set FONT_GREEN=%ESC%[92m
1313
set FONT_YELLOW=%ESC%[93m
1414
set FONT_DEFAULT=%ESC%[0m
1515

16+
set GOLDEN_IMAGE_TOLERANCE=1
17+
1618
set num_args=0
1719
for %%x in (%*) do Set /A num_args+=1
1820

@@ -218,7 +220,7 @@ rem For some reason, colored font does not work after the line that starts the s
218220
rem !!! ERRORLEVEL doesn't get updated inside control blocks like IF statements unless !!!
219221
rem !!! !ERRORLEVEL! is used instead of %ERRORLEVEL% and delayed expansion is enabled as below: !!!
220222
rem !!! setlocal ENABLEDELAYEDEXPANSION !!!
221-
set cmd_args=!test_mode! --width %GOLDEN_IMAGE_WIDTH% --height %GOLDEN_IMAGE_HEIGHT% --golden_image_mode %golden_img_mode% --capture_path %golden_img_dir% --capture_name !capture_name! --capture_format png --adapters_dialog 0 --break_on_error 0 %extra_args%
223+
set cmd_args=!test_mode! --width %GOLDEN_IMAGE_WIDTH% --height %GOLDEN_IMAGE_HEIGHT% --golden_image_mode %golden_img_mode% --capture_path %golden_img_dir% --capture_name !capture_name! --capture_format png --adapters_dialog 0 --break_on_error 0 --golden_image_tolerance %GOLDEN_IMAGE_TOLERANCE% %extra_args%
222224
echo !app_path! !cmd_args!
223225
!app_path! !cmd_args!
224226
rem It is important to save the value of !ERRORLEVEL! so that it is not overridden by further commands

0 commit comments

Comments
 (0)