summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorHolger Levsen <holger@layer-acht.org>2012-12-25 23:54:19 +0100
committerHolger Levsen <holger@layer-acht.org>2012-12-25 23:54:19 +0100
commit8362725e742e49e3a1c6319ff02cfad667f3341a (patch)
tree46cfb081b6a7bf86443f11296fc936b047eeaeb8 /bin
parent20caff728bce8687076ee94d23d483825a50988b (diff)
downloadjenkins.debian.net-8362725e742e49e3a1c6319ff02cfad667f3341a.tar.xz
use compare from imagemagick to count number of different pixels in two images, to test if the installation hangs
Diffstat (limited to 'bin')
-rwxr-xr-xbin/g-i-installation.sh6
1 files changed, 4 insertions, 2 deletions
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