summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorRichard W.M. Jones <rjones@redhat.com>2012-06-09 14:47:11 +0100
committerRichard W.M. Jones <rjones@redhat.com>2012-06-09 14:52:39 +0100
commitac2f9a42fbdacbea4840f9334ed50575f1006089 (patch)
tree3fb897221387bc4f4ca5704b710f85400ff3657f /tests
parent011666ae77b765b1a2b6b8e804d1cc1552f23e41 (diff)
downloadlibguestfs-ac2f9a42fbdacbea4840f9334ed50575f1006089.tar.gz
libguestfs-ac2f9a42fbdacbea4840f9334ed50575f1006089.tar.xz
libguestfs-ac2f9a42fbdacbea4840f9334ed50575f1006089.zip
btrfs: Modify test to correctly detect btrfs availability.
Diffstat (limited to 'tests')
-rwxr-xr-xtests/btrfs/test-btrfs-devices.sh10
1 files changed, 6 insertions, 4 deletions
diff --git a/tests/btrfs/test-btrfs-devices.sh b/tests/btrfs/test-btrfs-devices.sh
index fb6beeba..8e014323 100755
--- a/tests/btrfs/test-btrfs-devices.sh
+++ b/tests/btrfs/test-btrfs-devices.sh
@@ -24,15 +24,17 @@
set -e
-# XXX Not a very good test.
-if ! btrfs --help >/dev/null 2>&1; then
- echo "$0: test skipped because no 'btrfs' utility"
+guestfish=../../fish/guestfish
+
+# If btrfs is not available, bail.
+if ! $guestfish -a /dev/null run : available btrfs; then
+ echo "$0: skipping test because btrfs is not available"
exit 0
fi
rm -f test[1234].img
-../../fish/guestfish <<EOF
+$guestfish <<EOF
# Add four empty disks
sparse test1.img 1G
sparse test2.img 1G