summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorHolger Levsen <holger@layer-acht.org>2012-12-02 03:15:55 +0100
committerHolger Levsen <holger@layer-acht.org>2012-12-02 03:15:55 +0100
commit687c2bdb601633419f12f3a7382fa631d5d2233d (patch)
tree40348b2a4009cf207537310f114d931afd3d2cc7 /bin
parenta89a10b0444f1e5e07200193d3930ae780370fe5 (diff)
downloadjenkins.debian.net-687c2bdb601633419f12f3a7382fa631d5d2233d.tar.xz
fixup: implement basics for cd tests
Diffstat (limited to 'bin')
-rwxr-xr-xbin/cd_tester.sh10
1 files changed, 7 insertions, 3 deletions
diff --git a/bin/cd_tester.sh b/bin/cd_tester.sh
index 89c89ddc..4860683a 100755
--- a/bin/cd_tester.sh
+++ b/bin/cd_tester.sh
@@ -45,7 +45,7 @@ cleanup_all() {
# cleanup
#
umount $IMAGE_MNT
- sudo rm $IMAGE $NAME.qcow
+ sudo rm $NAME.qcow
#
# create video
#
@@ -90,8 +90,12 @@ monitor_installation() {
trap cleanup_all INT TERM EXIT
-wget $IMAGE_URL
-mkdir -p $IMAGE_MNT
+# only wget if $IMAGE is older than a week (60*24*7=10080)
+if test $(find $IMAGE -mmin +10080) ; then
+ rm $IMAGE
+ wget $IMAGE_URL
+fi
+sudo mkdir -p $IMAGE_MNT
mount -o loop $IMAGE $IMAGE_MNT
bootstrap
monitor_installation