aboutsummaryrefslogtreecommitdiffstats
path: root/testing/start-testing
blob: e6784322b77d7444581702539df284c0a97ae836 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/bin/bash

. $PWD/scripts/function.sh

NETWORKS="vnet1 vnet2 vnet3"
CONFDIR=$PWD/config/kvm
KNLSRC=$BUILDDIR/$KERNEL/arch/x86/boot/bzImage
KNLTARGET=/var/run/kvm-swan-kernel

echo "Starting test environment"

[ `id -u` -eq 0 ] || die "You must be root to run $0"

log_action "Deploying kernel $KERNEL"
execute "ln -fs $KNLSRC $KNLTARGET"

for net in $NETWORKS
do
	log_action "Network $net"
	execute "virsh net-create $CONFDIR/$net.xml"
done

for host in $STRONGSWANHOSTS
do
	ln -fs $ROOTFSDIR/$host.img $VIRTIMGSTORE/$host.img
	log_action "Guest $host"
	execute "virsh create $CONFDIR/$host.xml"
done