uml: virt-make-fs: Modify test so it doesn't use qcow2 under UML.

Modify the test so it doesn't try to test qcow2 format when the
backend is User-Mode Linux which doesn't support qcow2.
This commit is contained in:
Richard W.M. Jones
2013-08-13 13:50:36 +01:00
parent 003e854b98
commit b922f6521e

View File

@@ -37,6 +37,11 @@ if [ -n "$SKIP_TEST_VIRT_MAKE_FS_BTRFS" ]; then
btrfs_available=
fi
# UML backend doesn't support qcow2.
if [ "$(../fish/guestfish get-backend)" != "uml" ]; then
qcow2_supported=yes
fi
declare -a choices
# Return a random element from the array 'choices'.
@@ -58,8 +63,12 @@ if [ "$btrfs_available" = "yes" ]; then
fi
type=`random_choice`
choices=(--format=raw --format=qcow2)
format=`random_choice`
if [ "$qcow2_supported" = "yes" ]; then
choices=(--format=raw --format=qcow2)
format=`random_choice`
else
format="--format=raw"
fi
choices=(--partition --partition=gpt)
partition=`random_choice`