From 8362725e742e49e3a1c6319ff02cfad667f3341a Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Tue, 25 Dec 2012 23:54:19 +0100 Subject: use compare from imagemagick to count number of different pixels in two images, to test if the installation hangs --- bin/g-i-installation.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'bin') diff --git a/bin/g-i-installation.sh b/bin/g-i-installation.sh index 35e24a5e..388f4332 100755 --- a/bin/g-i-installation.sh +++ b/bin/g-i-installation.sh @@ -398,8 +398,10 @@ monitor_system() { # from help let: "Exit Status: If the last ARG evaluates to 0, let returns 1; let returns 0 otherwise." let OLD=NR-400 PRINTF_OLD=$(printf "%06d" $OLD) - # test if this screenshot is the same as the one 400 screenshots ago - if diff -q snapshot_${PRINTF_NR}.ppm snapshot_${PRINTF_OLD}.ppm ; then + # test if this screenshot is basically the same as the one 400 screenshots ago + # 200 pixels difference between to images is tolerated, to ignore updating clocks + PIXEL=$(compare -metric AE snapshot_${PRINTF_NR}.ppm snapshot_${PRINTF_OLD}.ppm /dev/null) + if [ $PIXEL -lt 200 ] ; then set -x # unless TRIGGER_MODE is empty, matching images means its over if [ ! -z "$TRIGGER_MODE" ] ; then -- cgit v1.2.3-70-g09d2