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
This commit is contained in:
Uli Schlachter 2023-01-02 09:04:16 +00:00
commit 3cc15cb40e
25 changed files with 8 additions and 0 deletions

View file

@ -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:

View file

@ -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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 399 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 320 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 375 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 129 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 865 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 305 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 155 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 181 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 335 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 351 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 966 B