From 20f3d88f7a5811307a12882cf701568fbc036485 Mon Sep 17 00:00:00 2001 From: Gabriele Giacone <1o5g4r8o@gmail.com> Date: Wed, 23 Apr 2014 03:55:42 +0200 Subject: Rare vncsnapshot failures don't make job fail. --- bin/g-i-installation.sh | 11 +++++++---- 1 file 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 -- cgit v1.2.3-54-g00ecf