6 if ! fusermount -V; then
7 echo 'skipping FUSE tests: fusermount does not appear to work'
11 if ! groups | grep -q fuse && test "$(t/root-status)" != root; then
12 echo 'skipping FUSE tests: you are not root and not in the fuse group'
16 top="$(WVPASS pwd)" || exit $?
17 tmpdir="$(WVPASS wvmktempdir)" || exit $?
19 export BUP_DIR="$tmpdir/bup"
20 export GIT_DIR="$tmpdir/bup"
22 bup() { "$top/bup" "$@"; }
27 savestamp1=$(WVPASS python -c 'import time; print int(time.time())') || exit $?
28 savestamp2=$(($savestamp1 + 1))
29 savename1="$(printf '%(%Y-%m-%d-%H%M%S)T' "$savestamp1")" || exit $?
30 savename2="$(printf '%(%Y-%m-%d-%H%M%S)T' "$savestamp2")" || exit $?
35 WVPASS bup save -n src -d "$savestamp1" --strip src
41 result=$(WVPASS ls mnt) || exit $?
42 WVPASSEQ src "$result"
44 result=$(WVPASS ls mnt/src) || exit $?
45 WVPASSEQ "$result" "$savename1
48 result=$(WVPASS ls mnt/src/latest) || exit $?
49 WVPASSEQ "$result" "foo"
51 # Right now we don't detect new saves.
52 WVPASS bup save -n src -d "$savestamp2" --strip src
53 result=$(WVPASS ls mnt/src) || exit $?
54 savename="$(WVPASS printf '%(%Y-%m-%d-%H%M%S)T' "$savestamp1")" || exit $?
55 WVPASSEQ "$result" "$savename1
58 WVPASS fusermount -uz mnt
59 WVPASS rm -rf "$tmpdir"