testing: Ensure no guest is running when modifying images

Sometimes guests are not stopped properly. If images are then modified
they will be corrupted.
This commit is contained in:
Tobias Brunner
2014-10-10 19:03:50 +02:00
parent b7b2f9379d
commit 83efded313
5 changed files with 16 additions and 0 deletions
+1
View File
@@ -22,6 +22,7 @@ DIR=$(dirname `readlink -f $0`)
[ `id -u` -eq 0 ] || die "You must be root to run $0"
[ -f "$BASEIMG" ] || die "Base image $BASEIMG not found"
running_any $STRONGSWANHOSTS && die "Please stop test environment before running $0"
check_commands partprobe qemu-img qemu-nbd