clean vbox procs before start test

pull/5135/head
Medya Gh 2019-08-19 19:18:52 -07:00
parent 165a811d0c
commit 6a2883ca98
1 changed files with 9 additions and 0 deletions

View File

@ -177,6 +177,7 @@ if type -P vboxmanage; then
vboxmanage list vms || true
fi
if type -P hdiutil; then
hdiutil info | grep -E "/dev/disk[1-9][^s]" || true
hdiutil info \
@ -210,6 +211,14 @@ if [[ "${VM_DRIVER}" == "hyperkit" ]]; then
fi
fi
vboxprocs=$(pgrep VBox || true)
if [[ "${vboxprocs}" != "" ]]; then
echo "error: killing left over virtualbox processes ..."
ps -f -p ${vboxprocs} || true
sudo -E kill ${vboxprocs} || true
fi
kprocs=$(pgrep kubectl || true)
if [[ "${kprocs}" != "" ]]; then
echo "error: killing hung kubectl processes ..."