]>
git.ipfire.org Git - people/ms/strongswan.git/blob - testing/start-testing
3 DIR
=$
(dirname `readlink -f $0`)
5 .
$DIR/scripts
/function.sh
7 NETWORKS
="vnet1 vnet2 vnet3"
8 CONFDIR
=$DIR/config
/kvm
9 KNLSRC
=$BUILDDIR/$KERNEL/arch
/x86
/boot
/bzImage
10 KNLTARGET
=/var
/run
/kvm-swan-kernel
11 HOSTFSTARGET
=/var
/run
/kvm-swan-hostfs
12 MCASTBRS
="test-br0 test-br1"
14 echo "Starting test environment"
16 [ `id -u` -eq 0 ] || die
"You must be root to run $0"
18 check_commands kvm virsh
20 [ -f $KNLSRC ] || die
"Kernel $KNLSRC not found"
21 log_action
"Deploying kernel $KERNEL"
22 execute
"ln -fs $KNLSRC $KNLTARGET"
24 log_action
"Deploying $SHAREDDIR as hostfs"
25 execute
"chown -R $KVMUSER:$KVMGROUP $SHAREDDIR" 0
26 execute
"ln -Tfs $SHAREDDIR $HOSTFSTARGET"
30 log_action
"Network $net"
31 execute
"virsh net-create $CONFDIR/$net.xml"
34 for host in $STRONGSWANHOSTS
36 ln -fs $IMGDIR/$host.
$IMGEXT $VIRTIMGSTORE/$host.
$IMGEXT
37 log_action
"Guest $host"
38 execute
"virsh create $CONFDIR/$host.xml"
41 # Enforce reception of multicast traffic on bridges
44 cd /sys
/devices
/virtual
/net
/$br/brif
45 for vnet
in `find . -name "*eth?"`
47 echo 2 > $vnet/multicast_router
51 echo 0x08 > /sys
/devices
/virtual
/net
/test-br
0/bridge
/group_fwd_mask