summaryrefslogtreecommitdiffstats
path: root/bin/g-i-installation.sh
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2014-11-27 16:14:51 +0100
committerHolger Levsen <holger@layer-acht.org>2014-11-27 16:25:26 +0100
commit9b51c10d098acb2c257ad73d243b8bb20a718414 (patch)
treea6447e06390f75515ca2471dd9b3e8aeb529ba90 /bin/g-i-installation.sh
parent49cf3852a9785b072512f7b7322e8e8db3366274 (diff)
downloadjenkins.debian.net-9b51c10d098acb2c257ad73d243b8bb20a718414.tar.xz
g-i: Use different pixel threshold for d-i and desktop
d-i doesn't have any clockish thing, and its text interface doesn't change much while progressing, thus needing a small threshold The LXDE desktop, on the other hand, has by default a CPU meter and clock, which needs a bigger threshold.
Diffstat (limited to 'bin/g-i-installation.sh')
-rw-r--r--bin/g-i-installation.sh17
1 files changed, 11 insertions, 6 deletions
diff --git a/bin/g-i-installation.sh b/bin/g-i-installation.sh
index 19843186..15cf2be7 100644
--- a/bin/g-i-installation.sh
+++ b/bin/g-i-installation.sh
@@ -1026,6 +1026,11 @@ monitor_system() {
else
TIMEOUT=$3
fi
+ if [ -z "$4" ] ; then
+ PIXELDIFF=100
+ else
+ PIXELDIFF=$4
+ fi
cd $RESULTS
sleep 4 # chosen by fair dice roll
hourlimit=16 # hours
@@ -1108,18 +1113,18 @@ monitor_system() {
let OLD=NR-$TIMEOUT
PRINTF_OLD=$(printf "%06d" $OLD)
# test if this screenshot is basically the same as the one $TIMEOUT screenshots ago
- # 400 pixels difference between to images is tolerated, to ignore updating clocks
+ # $PIXELDIFF pixels difference between to images is tolerated, to ignore updating clocks
PIXEL=$(compare -metric AE snapshot_${PRINTF_NR}.png snapshot_${PRINTF_OLD}.png /dev/null 2>&1 || true )
# usually this returns an integer, but not always....
if [[ "$PIXEL" =~ ^[0-9]+$ ]] ; then
echo "$PIXEL pixel difference between snapshot_${PRINTF_NR}.png and snapshot_${PRINTF_OLD}.png"
- if [ $PIXEL -lt 400 ] ; then
+ if [ $PIXEL -lt $PIXELDIFF ] ; then
SAME=Y
for INTER in $(seq $OLD 10 $NR); do
PRINTF_INTER=$(printf "%06d" $INTER)
PIXEL=$(compare -metric AE snapshot_${PRINTF_NR}.png snapshot_${PRINTF_INTER}.png /dev/null 2>&1 || true )
if [[ "$PIXEL" =~ ^[0-9]+$ ]] ; then
- if [ $PIXEL -ge 400 ] ; then
+ if [ $PIXEL -ge $PIXELDIFF ] ; then
echo "but $PIXEL difference between snapshot_${PRINTF_NR}.png and snapshot_${PRINTF_INTER}.png"
SAME=N
break
@@ -1320,9 +1325,9 @@ case $NAME in
;;
*_presentation) monitor_system presentation 10
;;
- debian-edu_*combi-server) monitor_system install wait4match 3000
+ debian-edu_*combi-server) monitor_system install wait4match 3000 100
;;
- debian-edu_*wheezy*standalone*) monitor_system install wait4match 1200
+ debian-edu_*wheezy*standalone*) monitor_system install wait4match 1200 100
;;
*) monitor_system install wait4match
;;
@@ -1354,7 +1359,7 @@ case $NAME in
*) let START_TRIGGER=NR+200
;;
esac
- monitor_system post_install $START_TRIGGER
+ monitor_system post_install $START_TRIGGER 600 1000
esac
cleanup_all