From a2e4c1bbdabb4b43ab2f727144c3d42473ab8301 Mon Sep 17 00:00:00 2001 From: Simon Schneegans Date: Sun, 28 Aug 2022 21:57:31 +0200 Subject: [PATCH] :wrench: Add debug print to test script --- tests/run-test.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/run-test.sh b/tests/run-test.sh index 5212c14..d29f824 100755 --- a/tests/run-test.sh +++ b/tests/run-test.sh @@ -105,11 +105,12 @@ fail() { compare_with_target() { echo "Looking for ${1} on the screen." - do_in_pod import -window root -crop $CROP out.png - podman cp "${POD}":/home/gnomeshell/out.png "${WORK_DIR}/out.png" + podman cp "${POD}:/opt/Xvfb_screen0" - | tar xf - --to-command "convert xwd:- -crop ${CROP} ${WORK_DIR}/out.png" DIFF=$(compare "${WORK_DIR}/out.png" "${1}" -metric NCC "${WORK_DIR}/diff.png" 2>&1) || true + echo $DIFF + if (( $(echo "$DIFF < 0.9" |bc -l) )); then fail "${2}" fi