summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorHolger Levsen <holger@layer-acht.org>2012-12-19 03:20:44 +0100
committerHolger Levsen <holger@layer-acht.org>2012-12-19 03:20:44 +0100
commit672986954633caa47475866ef69b5dd358bad875 (patch)
tree8d91cc5f71dd27b489a82c73f552dd566a0393f8 /bin
parentfb10dea0fb2320c97aeeb8701a1c7c8398e2af67 (diff)
downloadjenkins.debian.net-672986954633caa47475866ef69b5dd358bad875.tar.xz
detect stack-traces on power-down and let those turn the build unstable
Diffstat (limited to 'bin')
-rwxr-xr-xbin/g-i-installation.sh10
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