]> arthur.barton.de Git - bup.git/blobdiff - t/test-meta.sh
tmetadata.py: print saved_errors in from_path test
[bup.git] / t / test-meta.sh
index b7e26533c80354b3f63d296419b550871f478f21..cfd22e488b481b8c4aa20429d28779bd75afba5b 100755 (executable)
@@ -1,11 +1,13 @@
 #!/usr/bin/env bash
-. wvtest.sh
-. t/lib.sh
+. wvtest-bup.sh || exit $?
+. t/lib.sh || exit $?
 
 set -o pipefail
 
 TOP="$(WVPASS pwd)" || exit $?
-export BUP_DIR="$TOP/buptest.tmp"
+tmpdir="$(WVPASS wvmktempdir)" || exit $?
+
+export BUP_DIR="$tmpdir/bup"
 
 WVPASS force-delete "$TOP/bupmeta.tmp"
 timestamp_resolutions="$(t/ns-timestamp-resolutions "$TOP/bupmeta.tmp")" \
@@ -624,6 +626,11 @@ if [ "$root_status" = root ]; then
         # (patches welcome).
         [[ $(uname) =~ Linux ]] || exit 0
 
+        if ! modprobe loop; then
+            echo 'Unable to load loopback module; skipping dependent tests.' 1>&2
+            exit 0
+        fi
+
         WVSTART 'meta - general (as root)'
         WVPASS setup-test-tree
         WVPASS cd "$TOP/bupmeta.tmp"
@@ -751,3 +758,5 @@ if [ "$root_status" = root ]; then
         ) || exit $?
     ) || exit $?
 fi
+
+WVPASS rm -r "$tmpdir"