From 75bca9173e1fdc15b6fc5d0f9c64663288db7a41 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Thu, 31 Mar 2016 13:44:58 +0100 Subject: [PATCH] Skip tests involving rofiles-fuse if unavailable --- ...ofiles-fuse-if-dev-fuse-or-etc-mtab-.patch | 53 +++++++++++++++++++ debian/patches/series | 1 + 2 files changed, 54 insertions(+) create mode 100644 debian/patches/Skip-tests-that-run-rofiles-fuse-if-dev-fuse-or-etc-mtab-.patch diff --git a/debian/patches/Skip-tests-that-run-rofiles-fuse-if-dev-fuse-or-etc-mtab-.patch b/debian/patches/Skip-tests-that-run-rofiles-fuse-if-dev-fuse-or-etc-mtab-.patch new file mode 100644 index 00000000..a7302b6b --- /dev/null +++ b/debian/patches/Skip-tests-that-run-rofiles-fuse-if-dev-fuse-or-etc-mtab-.patch @@ -0,0 +1,53 @@ +From: Simon McVittie +Date: Thu, 31 Mar 2016 13:44:27 +0100 +Subject: Skip tests that run rofiles-fuse if /dev/fuse or /etc/mtab + unavailable + +Signed-off-by: Simon McVittie +--- + tests/test-demo-buildsystem.sh | 10 ++++++++++ + tests/test-rofiles-fuse.sh | 10 ++++++++++ + 2 files changed, 20 insertions(+) + +diff --git a/tests/test-demo-buildsystem.sh b/tests/test-demo-buildsystem.sh +index e5b1f87..a4377bd 100755 +--- a/tests/test-demo-buildsystem.sh ++++ b/tests/test-demo-buildsystem.sh +@@ -24,6 +24,16 @@ if ! fusermount --version >/dev/null 2>&1; then + 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 ++ + . $(dirname $0)/libtest.sh + + touch test-xattrs +diff --git a/tests/test-rofiles-fuse.sh b/tests/test-rofiles-fuse.sh +index 346c8fe..145d7e8 100755 +--- a/tests/test-rofiles-fuse.sh ++++ b/tests/test-rofiles-fuse.sh +@@ -24,6 +24,16 @@ if ! fusermount --version >/dev/null 2>&1; then + 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 ++ + . $(dirname $0)/libtest.sh + + touch test-xattrs diff --git a/debian/patches/series b/debian/patches/series index f02db68a..b7e5ad4a 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -5,3 +5,4 @@ tap-test-clean-up-temporary-test-directories-as-intended.patch In-tests-that-use-gpg-terminate-the-gpg-agent-after-testi.patch Load-g-i-bindings-from-builddir-during-build-time-testing.patch tests-admin-test.sh-this-is-a-bash-script-not-a-POSIX-sh-.patch +Skip-tests-that-run-rofiles-fuse-if-dev-fuse-or-etc-mtab-.patch