[cairo-commit] 3 commits - .gitlab-ci.yml test/check-refs.sh test/reference

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Jan 2 09:04:18 UTC 2023


 .gitlab-ci.yml     |    2 ++
 dev/null           |binary
 test/check-refs.sh |    6 ++++++
 3 files changed, 8 insertions(+)

New commits:
commit 3cc15cb40eb2d7e064d310c59853f362511666fb
Merge: d9008ff8c 997870601
Author: Uli Schlachter <psychon at znc.in>
Date:   Mon Jan 2 09:04:16 2023 +0000

    Merge branch 'duplicate-ref-images' into 'master'
    
    Remove duplicate reference images & run check-refs.sh in CI to ensure that no new duplicate images are added
    
    See merge request cairo/cairo!384

commit 997870601bc2a1a8849f51c1055fc0c1f4d075ca
Author: Uli Schlachter <psychon at znc.in>
Date:   Sat Dec 31 16:05:27 2022 +0100

    Run check-refs.sh in CI
    
    The check-refs.sh script detects duplicate reference images. This commit
    adds it to be run by CI. For this, the script is extended with a proper
    exit code.
    
    Signed-off-by: Uli Schlachter <psychon at znc.in>

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 3374b1cc4..7ee5f5681 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -246,6 +246,8 @@ fedora meson build:
     - (cd doc/public && bash "check-doc-syntax.sh")
     # FIXME: The following line really needs gtk-doc to run first
     - (cd doc/public && DOC_MODULE=cairo bash "check-doc-coverage.sh")
+    # Check for duplicate reference images
+    - ./test/check-refs.sh "$(pwd)/builddir/test/pdiff/perceptualdiff"
 
     - ninja -C builddir install
   artifacts:
diff --git a/test/check-refs.sh b/test/check-refs.sh
index 81ef81b35..e2e8a1a2a 100755
--- a/test/check-refs.sh
+++ b/test/check-refs.sh
@@ -9,6 +9,8 @@ if [ ! -e "${pdiff}" ]; then
     exit 128
 fi
 
+exit_code=0
+
 for file in *.ref.png; do
     test=$(echo $file | cut -d'.' -f1)
     target=$(echo $file | cut -d'.' -f2)
@@ -48,6 +50,7 @@ for file in *.ref.png; do
     if [ -e $ref ]; then
 	if cmp --silent "$ref" "$file" ; then
 	    printf "redundant: %s and %s are byte-by-byte identical files\n" $file $ref
+	    exit_code=1
 	else
             # Run perceptualdiff with minimum threshold
             pdiff_output=$($pdiff $ref $file -threshold 1)
@@ -55,9 +58,12 @@ for file in *.ref.png; do
             notes=$(echo "${pdiff_output#*: }" | tail -n 1)
             if [ "$result" = "PASS" ] && [ "$notes" = "Images are binary identical" ]; then
 		printf "redundant: %s and %s are pixel equivalent images\n" $file $ref
+		exit_code=1
 		notes=""
             fi
 	fi
     fi
 
 done
+
+exit $exit_code
commit d546a78c6f12b02cf3e67c7e3c4e27c2825dd7ff
Author: Uli Schlachter <psychon at znc.in>
Date:   Sat Dec 31 15:56:33 2022 +0100

    Remove duplicate reference images
    
    Running test/check-refs.sh reports:
    
    redundant: arc-direction.pdf.ref.png and arc-direction.ref.png are byte-by-byte identical files
    redundant: big-little-triangle.traps.argb32.ref.png and big-little-triangle.argb32.ref.png are byte-by-byte identical files
    redundant: big-little-triangle.traps.rgb24.ref.png and big-little-triangle.rgb24.ref.png are byte-by-byte identical files
    redundant: clip-fill-rule.pdf.rgb24.ref.png and clip-fill-rule.rgb24.ref.png are byte-by-byte identical files
    redundant: dash-offset-negative.pdf.ref.png and dash-offset-negative.ref.png are byte-by-byte identical files
    redundant: font-matrix-translation.traps.ref.png and font-matrix-translation.ref.png are byte-by-byte identical files
    redundant: ft-show-glyphs-positioning.traps.ref.png and ft-show-glyphs-positioning.ref.png are byte-by-byte identical files
    redundant: ft-show-glyphs-table.traps.ref.png and ft-show-glyphs-table.ref.png are byte-by-byte identical files
    redundant: glyph-cache-pressure.traps.ref.png and glyph-cache-pressure.ref.png are byte-by-byte identical files
    redundant: inverse-text.traps.ref.png and inverse-text.ref.png are byte-by-byte identical files
    redundant: line-width-large-overlap-offset.ps.ref.png and line-width-large-overlap-offset.ref.png are byte-by-byte identical files
    redundant: partial-clip-text-right.traps.ref.png and partial-clip-text-right.ref.png are byte-by-byte identical files
    redundant: partial-clip-text-top.traps.ref.png and partial-clip-text-top.ref.png are byte-by-byte identical files
    redundant: record90-fill-alpha.pdf.ref.png and record90-fill-alpha.ref.png are byte-by-byte identical files
    redundant: record90-paint-alpha-clip.quartz.ref.png and record90-paint-alpha-clip.ref.png are byte-by-byte identical files
    redundant: record-fill-alpha.pdf.ref.png and record-fill-alpha.ref.png are byte-by-byte identical files
    redundant: recordflip-whole-fill-alpha.quartz.ref.png and recordflip-whole-fill-alpha.ref.png are byte-by-byte identical files
    redundant: recordflip-whole-paint-alpha-clip-mask.quartz.ref.png and recordflip-whole-paint-alpha-clip-mask.ref.png are byte-by-byte identical files
    redundant: record-mesh.ps.ref.png and record-mesh.ref.png are byte-by-byte identical files
    redundant: select-font-face.traps.ref.png and select-font-face.ref.png are byte-by-byte identical files
    redundant: show-glyphs-advance.traps.ref.png and show-glyphs-advance.ref.png are byte-by-byte identical files
    redundant: show-text-current-point.traps.ref.png and show-text-current-point.ref.png are byte-by-byte identical files
    redundant: text-antialias-gray.traps.ref.png and text-antialias-gray.ref.png are byte-by-byte identical files
    
    This commit removes these redundant files.
    
    Signed-off-by: Uli Schlachter <psychon at znc.in>

diff --git a/test/reference/arc-direction.pdf.ref.png b/test/reference/arc-direction.pdf.ref.png
deleted file mode 100644
index 7b14d71a2..000000000
Binary files a/test/reference/arc-direction.pdf.ref.png and /dev/null differ
diff --git a/test/reference/big-little-triangle.traps.argb32.ref.png b/test/reference/big-little-triangle.traps.argb32.ref.png
deleted file mode 100644
index 5308ccedb..000000000
Binary files a/test/reference/big-little-triangle.traps.argb32.ref.png and /dev/null differ
diff --git a/test/reference/big-little-triangle.traps.rgb24.ref.png b/test/reference/big-little-triangle.traps.rgb24.ref.png
deleted file mode 100644
index 9e4773b2d..000000000
Binary files a/test/reference/big-little-triangle.traps.rgb24.ref.png and /dev/null differ
diff --git a/test/reference/clip-fill-rule.pdf.rgb24.ref.png b/test/reference/clip-fill-rule.pdf.rgb24.ref.png
deleted file mode 100644
index a7acc4fa4..000000000
Binary files a/test/reference/clip-fill-rule.pdf.rgb24.ref.png and /dev/null differ
diff --git a/test/reference/dash-offset-negative.pdf.ref.png b/test/reference/dash-offset-negative.pdf.ref.png
deleted file mode 100644
index df22d08b2..000000000
Binary files a/test/reference/dash-offset-negative.pdf.ref.png and /dev/null differ
diff --git a/test/reference/font-matrix-translation.traps.ref.png b/test/reference/font-matrix-translation.traps.ref.png
deleted file mode 100644
index a4a108206..000000000
Binary files a/test/reference/font-matrix-translation.traps.ref.png and /dev/null differ
diff --git a/test/reference/ft-show-glyphs-positioning.traps.ref.png b/test/reference/ft-show-glyphs-positioning.traps.ref.png
deleted file mode 100644
index af6dcaf95..000000000
Binary files a/test/reference/ft-show-glyphs-positioning.traps.ref.png and /dev/null differ
diff --git a/test/reference/ft-show-glyphs-table.traps.ref.png b/test/reference/ft-show-glyphs-table.traps.ref.png
deleted file mode 100644
index ed6912489..000000000
Binary files a/test/reference/ft-show-glyphs-table.traps.ref.png and /dev/null differ
diff --git a/test/reference/glyph-cache-pressure.traps.ref.png b/test/reference/glyph-cache-pressure.traps.ref.png
deleted file mode 100644
index a6e1b061f..000000000
Binary files a/test/reference/glyph-cache-pressure.traps.ref.png and /dev/null differ
diff --git a/test/reference/inverse-text.traps.ref.png b/test/reference/inverse-text.traps.ref.png
deleted file mode 100644
index b7bbb972f..000000000
Binary files a/test/reference/inverse-text.traps.ref.png and /dev/null differ
diff --git a/test/reference/line-width-large-overlap-offset.ps.ref.png b/test/reference/line-width-large-overlap-offset.ps.ref.png
deleted file mode 100644
index 3c3464bed..000000000
Binary files a/test/reference/line-width-large-overlap-offset.ps.ref.png and /dev/null differ
diff --git a/test/reference/partial-clip-text-right.traps.ref.png b/test/reference/partial-clip-text-right.traps.ref.png
deleted file mode 100644
index 2fbdca038..000000000
Binary files a/test/reference/partial-clip-text-right.traps.ref.png and /dev/null differ
diff --git a/test/reference/partial-clip-text-top.traps.ref.png b/test/reference/partial-clip-text-top.traps.ref.png
deleted file mode 100644
index d18475be3..000000000
Binary files a/test/reference/partial-clip-text-top.traps.ref.png and /dev/null differ
diff --git a/test/reference/record-fill-alpha.pdf.ref.png b/test/reference/record-fill-alpha.pdf.ref.png
deleted file mode 100644
index 8f72f68f4..000000000
Binary files a/test/reference/record-fill-alpha.pdf.ref.png and /dev/null differ
diff --git a/test/reference/record-mesh.ps.ref.png b/test/reference/record-mesh.ps.ref.png
deleted file mode 100644
index 015553650..000000000
Binary files a/test/reference/record-mesh.ps.ref.png and /dev/null differ
diff --git a/test/reference/record90-fill-alpha.pdf.ref.png b/test/reference/record90-fill-alpha.pdf.ref.png
deleted file mode 100644
index 167d7be65..000000000
Binary files a/test/reference/record90-fill-alpha.pdf.ref.png and /dev/null differ
diff --git a/test/reference/record90-paint-alpha-clip.quartz.ref.png b/test/reference/record90-paint-alpha-clip.quartz.ref.png
deleted file mode 100644
index b7703d47d..000000000
Binary files a/test/reference/record90-paint-alpha-clip.quartz.ref.png and /dev/null differ
diff --git a/test/reference/recordflip-whole-fill-alpha.quartz.ref.png b/test/reference/recordflip-whole-fill-alpha.quartz.ref.png
deleted file mode 100644
index 69035ef5f..000000000
Binary files a/test/reference/recordflip-whole-fill-alpha.quartz.ref.png and /dev/null differ
diff --git a/test/reference/recordflip-whole-paint-alpha-clip-mask.quartz.ref.png b/test/reference/recordflip-whole-paint-alpha-clip-mask.quartz.ref.png
deleted file mode 100644
index 6f14ad3b4..000000000
Binary files a/test/reference/recordflip-whole-paint-alpha-clip-mask.quartz.ref.png and /dev/null differ
diff --git a/test/reference/select-font-face.traps.ref.png b/test/reference/select-font-face.traps.ref.png
deleted file mode 100644
index 1334a9a01..000000000
Binary files a/test/reference/select-font-face.traps.ref.png and /dev/null differ
diff --git a/test/reference/show-glyphs-advance.traps.ref.png b/test/reference/show-glyphs-advance.traps.ref.png
deleted file mode 100644
index e65ad05d5..000000000
Binary files a/test/reference/show-glyphs-advance.traps.ref.png and /dev/null differ
diff --git a/test/reference/show-text-current-point.traps.ref.png b/test/reference/show-text-current-point.traps.ref.png
deleted file mode 100644
index d60d4ac01..000000000
Binary files a/test/reference/show-text-current-point.traps.ref.png and /dev/null differ
diff --git a/test/reference/text-antialias-gray.traps.ref.png b/test/reference/text-antialias-gray.traps.ref.png
deleted file mode 100644
index 06b805eaa..000000000
Binary files a/test/reference/text-antialias-gray.traps.ref.png and /dev/null differ


More information about the cairo-commit mailing list