Use qemu/KVM virtualization instead of UML
[strongswan.git] / testing / stop-testing
1 #!/bin/bash
2
3 . $PWD/scripts/function.sh
4
5 echo "Stopping test environment"
6
7 NETWORKS="vnet1 vnet2 vnet3"
8 KNLTARGET=/var/run/kvm-swan-kernel
9
10 [ `id -u` -eq 0 ] || die "You must be root to run $0"
11
12 for net in $NETWORKS
13 do
14         log_action "Network $net"
15         execute "virsh net-destroy $net"
16 done
17
18 for host in $STRONGSWANHOSTS
19 do
20         log_action "Guest $host"
21         execute "virsh destroy $host"
22         rm -f $VIRTIMGSTORE/$host.img
23 done
24
25 log_action "Removing kernel $KERNEL"
26 execute "rm $KNLTARGET"