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
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 6 KiB |
|
Before Width: | Height: | Size: 399 B |
|
Before Width: | Height: | Size: 320 B |
|
Before Width: | Height: | Size: 375 B |
|
Before Width: | Height: | Size: 129 B |
|
Before Width: | Height: | Size: 865 B |
|
Before Width: | Height: | Size: 3.2 KiB |
|
Before Width: | Height: | Size: 9.7 KiB |
|
Before Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 305 B |
|
Before Width: | Height: | Size: 155 B |
|
Before Width: | Height: | Size: 181 B |
|
Before Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 335 B |
|
Before Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 351 B |
|
Before Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 966 B |