Skip guestmount tests if no /dev/fuse.
authorRichard W.M. Jones <rjones@redhat.com>
Mon, 17 Oct 2011 08:59:43 +0000 (09:59 +0100)
committerRichard W.M. Jones <rjones@redhat.com>
Wed, 19 Oct 2011 17:33:35 +0000 (18:33 +0100)
Cherry picked from commit cf4cc1143393d607a7fb4cdbee1434544237d5d4 and
modified for libguestfs-1.12 branch which only has guestmount.

fuse/test-fuse.sh

index cfa277a..7de5211 100755 (executable)
@@ -20,6 +20,11 @@ unset CDPATH
 set -e
 #set -v
 
+if [ ! -w /dev/fuse ]; then
+    echo "SKIPPING guestmount test, because there is no /dev/fuse."
+    exit 0
+fi
+
 if [ -z "$top_builddir" ]; then
     echo "$0: error: environment variable \$top_builddir must be set"
     exit 1