From 672986954633caa47475866ef69b5dd358bad875 Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Wed, 19 Dec 2012 03:20:44 +0100 Subject: detect stack-traces on power-down and let those turn the build unstable --- bin/g-i-installation.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'bin') diff --git a/bin/g-i-installation.sh b/bin/g-i-installation.sh index 9e542482..0660faf4 100755 --- a/bin/g-i-installation.sh +++ b/bin/g-i-installation.sh @@ -279,11 +279,19 @@ monitor_system() { PRINTF_OLD=$(printf "%06d" $OLD) set -x if diff -q snapshot_${PRINTF_NR}.ppm snapshot_${PRINTF_OLD}.ppm ; then - LAST_LINE=$(gocr snapshot_${PRINTF_NR}.ppm|tail -1|cut -d "]" -f2- || true) + GOCR=$(mktemp) + gocr snapshot_${PRINTF_NR}.ppm > $GOCR + LAST_LINE=$(tail -1 $GOCR |cut -d "]" -f2- || true) + STACK_LINE=$(egrep "(Call Trace|end trace)" $GOCR || true) + rm $GOCR if [ "$LAST_LINE" = " Power down." ] ; then echo "QEMU was powered down, continuing." backup_screenshot break + elif [ ! -z $STACK_LINE ] ; then + echo "WARNING: got a stack-trace, probably on power-down." + backup_screenshot + break elif [ ! -z $TRIGGERED ] ; then echo ERROR snapshot_${PRINTF_NR}.ppm snapshot_${PRINTF_OLD}.ppm match, ending installation. ls -la snapshot_${PRINTF_NR}.ppm snapshot_${PRINTF_OLD}.ppm -- cgit v1.2.3-70-g09d2