#!/bin/bash
-# There has to be a better way to do this than this script which just looks
-# for every Vagrantfile in scenarios and then just destroys whatever is left.
cd $WORKSPACE/tests
-scenarios=$(find . | grep Vagrantfile | xargs dirname)
-
-for scenario in $scenarios; do
- cd $scenario
- # collect all ceph logs from all test nodes
- collect_ceph_logs all
- vagrant destroy -f
- cd -
-done
-
-# Sometimes, networks may linger around, so we must ensure they are killed:
-networks=`sudo virsh net-list --all | grep active | egrep -v "(default|libvirt)" | cut -d ' ' -f 2`
-for network in $networks; do
- sudo virsh net-destroy $network || true
- sudo virsh net-undefine $network || true
-done
+# the method exists in scripts/build_utils.sh
+teardown_vagrant_tests
#!/bin/bash
-# There has to be a better way to do this than this script which just looks
-# for every Vagrantfile in scenarios and then just destroys whatever is left.
cd $WORKSPACE/tests
-scenarios=$(find . -name Vagrantfile | xargs dirname)
-
-for scenario in $scenarios; do
- pushd $scenario
- # collect all ceph logs from all test nodes
- collect_ceph_logs all
- vagrant destroy -f
- popd
-done
-
-# Sometimes, networks may linger around, so we must ensure they are killed:
-networks=`sudo virsh net-list --all | grep active | egrep -v "(default|libvirt)" | cut -d ' ' -f 2`
-for network in $networks; do
- sudo virsh net-destroy $network || true
- sudo virsh net-undefine $network || true
-done
+# the method exists in scripts/build_utils.sh
+teardown_vagrant_tests
#!/bin/bash
-# There has to be a better way to do this than this script which just looks
-# for every Vagrantfile in scenarios and then just destroys whatever is left.
cd $WORKSPACE/tests
-scenarios=$(find . | grep Vagrantfile | xargs dirname)
-
-for scenario in $scenarios; do
- cd $scenario
- # collect all ceph logs from all test nodes
- collect_ceph_logs all
- vagrant destroy -f
- cd -
-done
-
-# Sometimes, networks may linger around, so we must ensure they are killed:
-networks=`sudo virsh net-list --all | grep active | egrep -v "(default|libvirt)" | cut -d ' ' -f 2`
-for network in $networks; do
- sudo virsh net-destroy $network || true
- sudo virsh net-undefine $network || true
-done
+# the method exists in scripts/build_utils.sh
+teardown_vagrant_tests
cd $WORKSPACE/src/ceph-volume/tests/functional
-scenarios=$(find . | grep Vagrantfile | xargs dirname)
-
-for scenario in $scenarios; do
- cd $scenario
- # collect all ceph logs from all test nodes
- collect_ceph_logs all
- vagrant destroy -f
- cd -
-done
-
-# Sometimes, networks may linger around, so we must ensure they are killed:
-networks=`sudo virsh net-list --all | grep active | egrep -v "(default|libvirt)" | cut -d ' ' -f 2`
-for network in $networks; do
- sudo virsh net-destroy $network || true
- sudo virsh net-undefine $network || true
-done
-
+# the method exists in scripts/build_utils.sh
+teardown_vagrant_tests
scenarios=$(find . | grep vagrant_ssh_config | xargs dirname)
-for scenario in $scenarios; do
- cd $scenario
- # collect all ceph logs from all test nodes
- collect_ceph_logs all
- vagrant destroy -f
- cd -
-done
-
-# Sometimes, networks may linger around, so we must ensure they are killed:
-networks=`sudo virsh net-list --all | grep active | egrep -v "(default|libvirt)" | cut -d ' ' -f 2`
-for network in $networks; do
- sudo virsh net-destroy $network || true
- sudo virsh net-undefine $network || true
-done
-
+# the method exists in scripts/build_utils.sh
+teardown_vagrant_tests
#!/bin/bash
-# There has to be a better way to do this than this script which just looks
-# for every Vagrantfile in scenarios and then just destroys whatever is left.
-
cd $WORKSPACE/src/ceph-volume/ceph_volume/tests/functional
-scenarios=$(find . | grep Vagrantfile | xargs dirname)
-
-for scenario in $scenarios; do
- cd $scenario
- # collect all ceph logs from all test nodes
- collect_ceph_logs all
- vagrant destroy -f
- cd -
-done
-
-# Sometimes, networks may linger around, so we must ensure they are killed:
-networks=`sudo virsh net-list --all | grep active | egrep -v "(default|libvirt)" | cut -d ' ' -f 2`
-for network in $networks; do
- sudo virsh net-destroy $network || true
- sudo virsh net-undefine $network || true
-done
-
+# the method exists in scripts/build_utils.sh
+teardown_vagrant_tests