summaryrefslogtreecommitdiffstats
path: root/bin/g-i-installation.sh
diff options
context:
space:
mode:
authorGabriele Giacone <1o5g4r8o@gmail.com>2014-04-23 03:55:42 +0200
committerGabriele Giacone <1o5g4r8o@gmail.com>2014-04-23 03:55:42 +0200
commit20f3d88f7a5811307a12882cf701568fbc036485 (patch)
tree6adfe440fb926e647529e534b6d9854fdfcad1f8 /bin/g-i-installation.sh
parent67619a30dc16d2a457bfdd26f149ba00cd5dd85f (diff)
downloadjenkins.debian.net-20f3d88f7a5811307a12882cf701568fbc036485.tar.xz
Rare vncsnapshot failures don't make job fail.
Diffstat (limited to 'bin/g-i-installation.sh')
-rwxr-xr-xbin/g-i-installation.sh11
1 files changed, 7 insertions, 4 deletions
diff --git a/bin/g-i-installation.sh b/bin/g-i-installation.sh
index 108ae36a..1aed2c3e 100755
--- a/bin/g-i-installation.sh
+++ b/bin/g-i-installation.sh
@@ -794,14 +794,17 @@ monitor_system() {
#
# break if qemu-system has finished
#
+ if ! ps fax | grep [q]emu-system | grep vnc=$DISPLAY >/dev/null; then
+ touch $RESULTS/qemu_quit
+ break
+ fi
PRINTF_NR=$(printf "%06d" $NR)
- vncsnapshot -quiet -allowblank $DISPLAY snapshot_${PRINTF_NR}.jpg 2>/dev/null || touch $RESULTS/qemu_quit
- if [ ! -f "$RESULTS/qemu_quit" ] ; then
+ vncsnapshot -quiet -allowblank $DISPLAY snapshot_${PRINTF_NR}.jpg 2>/dev/null || true
+ if [ -f snapshot_${PRINTF_NR}.jpg ]; then
convert $CONVERTOPTS snapshot_${PRINTF_NR}.jpg snapshot_${PRINTF_NR}.ppm
rm snapshot_${PRINTF_NR}.jpg
else
- echo "could not take vncsnapshot, no qemu running on $DISPLAY"
- break
+ echo "could not take vncsnapshot from $DISPLAY"
fi
# give signal we are still running
if [ $(($NR % 14)) -eq 0 ] ; then