summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorHolger Levsen <holger@layer-acht.org>2012-12-08 18:34:55 +0100
committerHolger Levsen <holger@layer-acht.org>2012-12-08 18:34:55 +0100
commit45df870c3ebc998408163a6a1bcc4ec8f15dbbdc (patch)
tree2f11e4d431e1ffc03f7b2cf3045d504788dbd736 /bin
parent387af00aced5145e2dce1041954c62a625dada42 (diff)
downloadjenkins.debian.net-45df870c3ebc998408163a6a1bcc4ec8f15dbbdc.tar.xz
try harder to fix this timing issue
Diffstat (limited to 'bin')
-rwxr-xr-xbin/cd_tester.sh15
1 files changed, 10 insertions, 5 deletions
diff --git a/bin/cd_tester.sh b/bin/cd_tester.sh
index a3f6c6a6..808400cf 100755
--- a/bin/cd_tester.sh
+++ b/bin/cd_tester.sh
@@ -133,11 +133,11 @@ bootstrap() {
show_preseed $(hostname -f)/$PRESEED_PATH/${NAME}-preseed.cfg
echo
echo "Starting QEMU_ now:"
- sudo qemu-system-x86_64 \
+ (sudo qemu-system-x86_64 \
$QEMU_OPTS \
$QEMU_BOOT \
$QEMU_KERNEL \
- --append "$APPEND" &
+ --append "$APPEND" && touch $RESULTS/qemu_exit_0 ) &
}
monitor_installation() {
@@ -155,11 +155,11 @@ monitor_installation() {
if [ $(ps fax | grep -v grep | grep qemu-system | grep ${NAME}-preseed.cfg 2>/dev/null | wc -l) -eq 0 ] ; then
break
fi
- vncsnapshot -quiet -allowblank $DISPLAY snapshot_$(printf "%06d" $NR).jpg 2>/dev/null
+ vncsnapshot -quiet -allowblank $DISPLAY snapshot_$(printf "%06d" $NR).jpg 2>/dev/null || ( echo "could not take vncsnapshot." ; if [ -f $RESULTS/qemu_exit_0 ] ; then break ; fi )
convert snapshot_$(printf "%06d" $NR).jpg snapshot_$(printf "%06d" $NR).ppm
rm snapshot_$(printf "%06d" $NR).jpg
# give signal we are still running
- if [ $(($NR % 15)) -eq 0 ] ; then
+ if [ $(($NR % 14)) -eq 0 ] ; then
date
fi
# press ctrl-key to avoid screensaver kicking in
@@ -188,7 +188,12 @@ monitor_installation() {
if [ $NR -eq $MAX_RUNS ] ; then
echo Warning: running for 6h, forceing termination.
fi
- let NR=NR-1
+ if [ -f $RESULTS/qemu_exit_0 ] ; then
+ let NR=NR-2
+ rm $RESULTS/qemu_exit_0
+ else
+ let NR=NR-1
+ fi
cp snapshot_$(printf "%06d" $NR).ppm snapshot_$(printf "%06d" $NR).ppm.bak
}