From b45003b748a166babdf5a3e567d7633ba31100f4 Mon Sep 17 00:00:00 2001 From: Rodrigo Arias Mallo Date: Sat, 21 Jun 2025 13:41:12 +0200 Subject: Fix compare output in HTML test driver Newer versions output two numbers instead of just one, so we pick the first number: ++ compare -metric AE b-div.html_wdir/{html.png,ref.png,diff.png} + diffcount='0 (0)' + '[' '0 (0)' = 0 ']' + echo FAIL FAIL --- test/html/driver.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/html/driver.sh b/test/html/driver.sh index 07a78b84..e4fbc739 100755 --- a/test/html/driver.sh +++ b/test/html/driver.sh @@ -93,7 +93,7 @@ function test_file() { render_page "$ref_file" "$wdir/ref.png" # AE = Absolute Error count of the number of different pixels - diffcount=$(compare -metric AE "$wdir/html.png" "$wdir/ref.png" "$wdir/diff.png" 2>&1 || true) + diffcount=$(compare -metric AE "$wdir/html.png" "$wdir/ref.png" "$wdir/diff.png" 2>&1 | cut -d ' ' -f 1 || true) # The test passes only if both images are identical if [ "$diffcount" = "0" ]; then -- cgit v1.2.3