resize: Add tests for some Utils functions.
[libguestfs.git] / fuse / test-fuse.sh
index 0a429f7..27e6296 100755 (executable)
@@ -20,6 +20,16 @@ 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 ! setfacl --help >/dev/null 2>&1; then
+    echo "SKIPPING guestmount test, because setfacl is not installed."
+    exit 0
+fi
+
 if [ -z "$top_builddir" ]; then
     echo "$0: error: environment variable \$top_builddir must be set"
     exit 1
@@ -31,6 +41,10 @@ nr_stages=$(grep "^stage " $0 | wc -l)
 # and move to that directory for the initial phase of the script.
 top_builddir=$(cd "$top_builddir" > /dev/null; pwd)
 
+# Set TMPDIR so the appliance doesn't conflict with globally
+# installed libguestfs.
+export TMPDIR=$top_builddir
+
 # Set libguestfs up for running locally.
 export LIBGUESTFS_PATH="$top_builddir/appliance"