Skip tests that run rofiles-fuse if /dev/fuse or /etc/mtab unavailable

Signed-off-by: Simon McVittie <smcv@debian.org>

Closes: #232
Approved by: cgwalters
This commit is contained in:
Simon McVittie 2016-03-31 13:44:27 +01:00 committed by Colin Walters (automation)
parent d458399615
commit e1ce859368
3 changed files with 19 additions and 10 deletions

View File

@ -332,3 +332,20 @@ skip_without_user_xattrs () {
exit 0
fi
}
skip_without_fuse () {
if ! fusermount --version >/dev/null 2>&1; then
echo "1..0 # SKIP no fusermount"
exit 0
fi
if ! [ -w /dev/fuse ]; then
echo "1..0 # SKIP no write access to /dev/fuse"
exit 0
fi
if ! [ -e /etc/mtab ]; then
echo "1..0 # SKIP no /etc/mtab"
exit 0
fi
}

View File

@ -19,13 +19,9 @@
set -euo pipefail
if ! fusermount --version >/dev/null 2>&1; then
echo "1..0 # SKIP no fusermount"
exit 0
fi
. $(dirname $0)/libtest.sh
skip_without_fuse
skip_without_user_xattrs
echo "1..1"

View File

@ -19,13 +19,9 @@
set -euo pipefail
if ! fusermount --version >/dev/null 2>&1; then
echo "1..0 # SKIP no fusermount"
exit 0
fi
. $(dirname $0)/libtest.sh
skip_without_fuse
skip_without_user_xattrs
setup_test_repository "bare-user"