aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorReto Buerki <reet@codelabs.ch>2012-12-14 15:38:10 +0100
committerTobias Brunner <tobias@strongswan.org>2013-01-17 16:54:58 +0100
commit48ea1d8b0b9d6c6fb1eab5f4ea4ed00cde91c4c0 (patch)
tree7866611ed8ccf897c508850be3b95693930e068a
parent482d3ec9ffa8ed6bcb4d7a3ac963b7e705c85c02 (diff)
downloadstrongswan-48ea1d8b0b9d6c6fb1eab5f4ea4ed00cde91c4c0.tar.bz2
strongswan-48ea1d8b0b9d6c6fb1eab5f4ea4ed00cde91c4c0.tar.xz
Create all images in $BUILDDIR/images
-rwxr-xr-xtesting/scripts/build-baseimage2
-rwxr-xr-xtesting/scripts/build-guestimages7
-rwxr-xr-xtesting/scripts/build-rootimage1
-rwxr-xr-xtesting/start-testing2
-rw-r--r--testing/testing.conf14
5 files changed, 12 insertions, 14 deletions
diff --git a/testing/scripts/build-baseimage b/testing/scripts/build-baseimage
index 85b3d3175..81460d91c 100755
--- a/testing/scripts/build-baseimage
+++ b/testing/scripts/build-baseimage
@@ -21,8 +21,8 @@ CACHEDIR=$BUILDDIR/cache
APTCACHE=$LOOPDIR/var/cache/apt/archives
mkdir -p $LOOPDIR
-mkdir -p $BUILDDIR
mkdir -p $CACHEDIR
+mkdir -p $IMGDIR
rm -f $BASEIMG
echo "`date`, building $BASEIMG" >>$LOGFILE
diff --git a/testing/scripts/build-guestimages b/testing/scripts/build-guestimages
index cf64bd86d..d07981a17 100755
--- a/testing/scripts/build-guestimages
+++ b/testing/scripts/build-guestimages
@@ -28,9 +28,8 @@ check_commands partprobe qemu-img qemu-nbd
load_qemu_nbd
-mkdir -p $BUILDDIR
+mkdir -p $IMGDIR
mkdir -p $LOOPDIR
-mkdir -p $GUESTIMGDIR
# just to be sure
do_on_exit qemu-nbd -d $NBDEV
@@ -39,8 +38,8 @@ do_on_exit umount $LOOPDIR
for host in $STRONGSWANHOSTS
do
log_action "Creating guest image for $host"
- execute "qemu-img create -b $ROOTIMG -f $IMGEXT $GUESTIMGDIR/$host.$IMGEXT" 0
- execute "qemu-nbd -c $NBDEV $GUESTIMGDIR/$host.$IMGEXT" 0
+ execute "qemu-img create -b $ROOTIMG -f $IMGEXT $IMGDIR/$host.$IMGEXT" 0
+ execute "qemu-nbd -c $NBDEV $IMGDIR/$host.$IMGEXT" 0
partprobe $NBDEV
execute "mount $NBDPARTITION $LOOPDIR" 0
execute "cp -rf $HOSTSDIR/${host}/etc $LOOPDIR" 0
diff --git a/testing/scripts/build-rootimage b/testing/scripts/build-rootimage
index 8d3f32bbc..b575ebb50 100755
--- a/testing/scripts/build-rootimage
+++ b/testing/scripts/build-rootimage
@@ -27,6 +27,7 @@ load_qemu_nbd
mkdir -p $LOOPDIR
mkdir -p $ROOTIMGCOMPILEDIR
+mkdir -p $IMGDIR
log_action "Creating root image $ROOTIMG"
execute "qemu-img create -b $BASEIMG -f $IMGEXT $ROOTIMG"
diff --git a/testing/start-testing b/testing/start-testing
index 997b26c18..dce089ad2 100755
--- a/testing/start-testing
+++ b/testing/start-testing
@@ -24,7 +24,7 @@ done
for host in $STRONGSWANHOSTS
do
- ln -fs $GUESTIMGDIR/$host.$IMGEXT $VIRTIMGSTORE/$host.$IMGEXT
+ ln -fs $IMGDIR/$host.$IMGEXT $VIRTIMGSTORE/$host.$IMGEXT
log_action "Guest $host"
execute "virsh create $CONFDIR/$host.xml"
done
diff --git a/testing/testing.conf b/testing/testing.conf
index 7fb82032e..0d8eff3d2 100644
--- a/testing/testing.conf
+++ b/testing/testing.conf
@@ -36,26 +36,24 @@ LOGFILE=$BUILDDIR/testing.log
# Directory used for loop-mounts
LOOPDIR=$BUILDDIR/loop
-# Image extension
+# Common image settings
IMGEXT=qcow2
+IMGDIR=$BUILDDIR/images
# Base image settings
# The base image is a pristine OS installation created using debootstrap.
BASEIMGSIZE=1024
BASEIMGSUITE=wheezy
BASEIMGARCH=amd64
-BASEIMG=$BUILDDIR/debian-$BASEIMGSUITE-$BASEIMGARCH.$IMGEXT
+BASEIMG=$IMGDIR/debian-$BASEIMGSUITE-$BASEIMGARCH.$IMGEXT
BASEIMGMIRROR=http://cdn.debian.net/debian
# Root image settings
-# The root image is the origin of all guest images. It contains additional
-# test-specific software and patches.
-ROOTIMG=$BUILDDIR/root.$IMGEXT
+# The root image is the origin of all guest images. It is a clone of the base
+# image and contains additional test-specific software and patches.
+ROOTIMG=$IMGDIR/root.$IMGEXT
ROOTIMGCOMPILEDIR=$BUILDDIR/compile
-# Guest images settings
-GUESTIMGDIR=$BUILDDIR/guest-images
-
# libvirt config
NBDEV=/dev/nbd0
NBDPARTITION=${NBDEV}p1