diff options
author | Holger Levsen <holger@layer-acht.org> | 2012-12-19 03:20:44 +0100 |
---|---|---|
committer | Holger Levsen <holger@layer-acht.org> | 2012-12-19 03:20:44 +0100 |
commit | 672986954633caa47475866ef69b5dd358bad875 (patch) | |
tree | 8d91cc5f71dd27b489a82c73f552dd566a0393f8 | |
parent | fb10dea0fb2320c97aeeb8701a1c7c8398e2af67 (diff) | |
download | jenkins.debian.net-672986954633caa47475866ef69b5dd358bad875.tar.xz |
detect stack-traces on power-down and let those turn the build unstable
-rwxr-xr-x | bin/g-i-installation.sh | 10 |
1 files changed, 9 insertions, 1 deletions
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 |