summaryrefslogtreecommitdiffstats
path: root/tests/functions.sh
diff options
context:
space:
mode:
authorRuediger Meier2015-03-16 12:22:53 +0100
committerRuediger Meier2015-03-16 14:32:34 +0100
commit5f708381a1ef5350196cb7c82f8e67edd37a87bd (patch)
tree030e23d59ca298be1370424671052eb19397250e /tests/functions.sh
parenttravis: whitelist travis* branches (diff)
downloadkernel-qcow2-util-linux-5f708381a1ef5350196cb7c82f8e67edd37a87bd.tar.gz
kernel-qcow2-util-linux-5f708381a1ef5350196cb7c82f8e67edd37a87bd.tar.xz
kernel-qcow2-util-linux-5f708381a1ef5350196cb7c82f8e67edd37a87bd.zip
tests: optionally skip tests where loop support is needed
It can be hard to check for loop support (e.g. on LXC containers). Let the user skip it manually by env: TS_OPT_FEAT_SKIP_LOOP="yes" Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
Diffstat (limited to 'tests/functions.sh')
-rw-r--r--tests/functions.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/functions.sh b/tests/functions.sh
index 02f81dd5e..bfc3fa28d 100644
--- a/tests/functions.sh
+++ b/tests/functions.sh
@@ -68,6 +68,10 @@ function ts_check_losetup {
local tmp
ts_check_test_command "$TS_CMD_LOSETUP"
+ if [ "$TS_OPT_FEAT_SKIP_LOOP" = "yes" ]; then
+ ts_skip "loop-device tests disabled"
+ fi
+
# assuming that losetup -f works ... to be checked somewhere else
tmp=$($TS_CMD_LOSETUP -f 2>/dev/null)
if test -b "$tmp"; then