]> arthur.barton.de Git - bup.git/blobdiff - t/test-index-check-device.sh
Get TZ offset from C localtime, given tm_gmtoff
[bup.git] / t / test-index-check-device.sh
index 23dbb772bd371d55f760603b59ee25b6f6a70410..9c50534a8d92157ad34f1f94e5a2f45340515ff3 100755 (executable)
@@ -1,6 +1,6 @@
 #!/usr/bin/env bash
-. ./wvtest-bup.sh
-. ./t/lib.sh
+. ./wvtest-bup.sh || exit $?
+. ./t/lib.sh || exit $?
 
 set -o pipefail
 
@@ -9,13 +9,18 @@ if [ $(t/root-status) != root ]; then
     exit 0 # FIXME: add WVSKIP.
 fi
 
+if test -n "$(type -p modprobe)" && ! modprobe loop; then
+    echo 'Unable to load loopback module; skipping --check-device test.' 1>&2
+    exit 0
+fi
+
 if test -z "$(type -p losetup)"; then
-    echo 'Unable to find losetup: skipping --check-device tests.'
+    echo 'Unable to find losetup: skipping --check-device tests.' 1>&2
     exit 0 # FIXME: add WVSKIP.
 fi
 
 if test -z "$(type -p mke2fs)"; then
-    echo 'Unable to find mke2fs: skipping --check-device tests.'
+    echo 'Unable to find mke2fs: skipping --check-device tests.' 1>&2
     exit 0 # FIXME: add WVSKIP.
 fi