diff options
author | Holger Levsen <holger@layer-acht.org> | 2012-12-02 12:56:41 +0100 |
---|---|---|
committer | Holger Levsen <holger@layer-acht.org> | 2012-12-02 12:56:41 +0100 |
commit | 642477f4478f86576a7fae6693551009aaa048a0 (patch) | |
tree | 5db505f15d3a85ab80da7f7e3acf3391146d996d | |
parent | e018faad00242f2db06cbd0009c5224d6ad1af1c (diff) | |
download | jenkins.debian.net-642477f4478f86576a7fae6693551009aaa048a0.tar.xz |
improve output
-rwxr-xr-x | bin/cd_tester.sh | 12 | ||||
-rwxr-xr-x | etc/sudoers.d/jenkins | 2 |
2 files changed, 10 insertions, 4 deletions
diff --git a/bin/cd_tester.sh b/bin/cd_tester.sh index dcfd6652..6e2c72fb 100755 --- a/bin/cd_tester.sh +++ b/bin/cd_tester.sh @@ -42,16 +42,19 @@ cleanup_all() { # create video # ffmpeg2theora --videobitrate 700 --no-upscaling snapshot_%06d.ppm --framerate 12 --max_size 800x600 -o cd-test-$NAME.ogv + set +x rm snapshot_??????.ppm + set -x # - # kill qemu + # kill qemu and image # sudo kill -9 $(ps fax | grep -v grep | grep -v sudo | grep qemu-system | grep $IMAGE 2>/dev/null | cut -d " " -f1) + sleep 0.3s + rm $NAME.qcow # # cleanup # sudo umount $IMAGE_MNT - rm $NAME.qcow } bootstrap() { @@ -94,6 +97,9 @@ monitor_installation() { fi done set -x + if [ $NR -eq 9000 ] ; then + echo Warning: running for 5h, forceing termination. + fi } trap cleanup_all INT TERM EXIT @@ -104,7 +110,7 @@ if test $(find $IMAGE -mmin +10080) || ! test -f $IMAGE ; then curl $IMAGE_URL > $IMAGE fi sudo mkdir -p $IMAGE_MNT -sudo mount -o loop $IMAGE $IMAGE_MNT +sudo mount -o loop,ro $IMAGE $IMAGE_MNT bootstrap monitor_installation diff --git a/etc/sudoers.d/jenkins b/etc/sudoers.d/jenkins index 37145e71..4f30f6be 100755 --- a/etc/sudoers.d/jenkins +++ b/etc/sudoers.d/jenkins @@ -1,4 +1,4 @@ -jenkins ALL= NOPASSWD: /usr/sbin/debootstrap *, NOPASSWD: /usr/sbin/chroot /chroots/*, NOPASSWD: /bin/rm -rf --one-file-system /chroots/*, NOPASSWD: /bin/umount -l /chroots/*, NOPASSWD: /bin/umount /media/*, /bin/mount -o loop *, NOPASSWD: /usr/bin/du *, NOPASSWD: /bin/kill -9 *, NOPASSWD: /usr/bin/qemu-system-x86_64 *, NOPASSWD: /bin/mkdir -p /media/*, SETENV: NOPASSWD: /usr/sbin/pbuilder * +jenkins ALL= NOPASSWD: /usr/sbin/debootstrap *, NOPASSWD: /usr/sbin/chroot /chroots/*, NOPASSWD: /bin/rm -rf --one-file-system /chroots/*, NOPASSWD: /bin/umount -l /chroots/*, NOPASSWD: /bin/umount /media/*, /bin/mount -o loop,ro *, NOPASSWD: /usr/bin/du *, NOPASSWD: /bin/kill -9 *, NOPASSWD: /usr/bin/qemu-system-x86_64 *, NOPASSWD: /bin/mkdir -p /media/*, SETENV: NOPASSWD: /usr/sbin/pbuilder * # keep these environment variables Defaults env_keep += "http_proxy", env_reset |