]> arthur.barton.de Git - bup.git/blobdiff - t/test-fuse.sh
vfs: limit root_items branches to refs/heads
[bup.git] / t / test-fuse.sh
index 5949907b86c8c25c0969d06034a27ff62ac94b49..5a7365ad547b63924114de340f2d4cf5527a89a4 100755 (executable)
@@ -6,6 +6,13 @@ set -o pipefail
 
 unset BLOCKSIZE BLOCK_SIZE DF_BLOCK_SIZE
 
+root_status="$(t/root-status)" || exit $?
+
+if ! bup-python -c 'import fuse' 2> /dev/null; then
+    WVSTART 'unable to import fuse; skipping test'
+    exit 0
+fi
+
 if test -n "$(type -p modprobe)" && ! modprobe fuse; then
     echo 'Unable to load fuse module; skipping dependent tests.' 1>&2
     exit 0
@@ -16,7 +23,7 @@ if ! fusermount -V; then
     exit 0
 fi
 
-if ! groups | grep -q fuse && test "$(t/root-status)" != root; then
+if ! groups | grep -q fuse && test "$root_status" != root; then
     echo 'skipping FUSE tests: you are not root and not in the fuse group'
     exit 0
 fi
@@ -76,10 +83,10 @@ pre-epoch"
 result=$(WVPASS cat mnt/src/latest/foo) || exit $?
 WVPASSEQ "$result" "content"
 
-# Right now we don't detect new saves.
 WVPASS bup save -n src -d "$savestamp2" --strip src
 result=$(WVPASS ls mnt/src) || exit $?
 WVPASSEQ "$result" "$savename1
+$savename2
 latest"
 
 WVPASS fusermount -uz mnt