diff --git a/.github/workflows/debug.yml b/.github/workflows/debug.yml index 6be0f20..8982a88 100644 --- a/.github/workflows/debug.yml +++ b/.github/workflows/debug.yml @@ -23,8 +23,8 @@ jobs: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it uses: actions/checkout@v2 - - name: "update runner" - run: sudo apt-get update -y && sudo apt-get upgrade -y imagemagick + - name: "change ImageMagick policy to allow pdf->png conversion" + run: sudo sed -i 's/^.*policy.*coder.*none.*PDF.*//' /etc/ImageMagick-6/policy.xml # ## # - name: "setup TeX Live (via apt-get)" diff --git a/test/testing.sh b/test/testing.sh index 7f2059a..0eeb1e0 100755 --- a/test/testing.sh +++ b/test/testing.sh @@ -93,6 +93,21 @@ else fi ## -- doing the tests +# +# compare metrics +# +# AE: absolute error count, number of different pixels (-fuzz affected) +# DSSIM: structural dissimilarity index +# FUZZ: mean color distance +# MAE: mean absolute error (normalized), average channel error distance +# MEPP: mean error per pixel (normalized mean error, normalized peak error) +# MSE: mean error squared, average of the channel error squared +# NCC: normalized cross correlation +# PAE: peak absolute (normalized peak absolute) +# PHASH: perceptual hash for the sRGB and HCLp colorspaces. +# PSNR: peak signal to noise ratio +# RMSE: root mean squared (normalized root mean squared) +# SSIM: structural similarity index mkdir -p .testing @@ -109,7 +124,10 @@ for TEST in `ls $TESTDIR/*.tex`; do echo $n "'$NAME' test: $c" fi pdflatex -output-directory=.testing -interaction=batchmode -halt-on-error $FILE 2>&1 > /dev/null - compare -metric DSSIM -colorspace RGB .testing/${NAME}.pdf ${NAME}_expected.pdf NULL: + if [ $verbose = 1 ]; then + echo $n "build complete, $c" # it is actually not in percent! But it helps them humans... + fi + compare -metric RMSE -colorspace RGB .testing/${NAME}.pdf ${NAME}_expected.pdf NULL: if [ $verbose = 1 ]; then echo "% difference." # it is actually not in percent! But it helps them humans... fi