From: Ruediger Meier Date: Mon, 16 Mar 2015 11:22:53 +0000 (+0100) Subject: tests: optionally skip tests where loop support is needed X-Git-Tag: v2.26.2~92 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2a6644bf5aa0e1d8abce8b6d413f562cd247a392;p=thirdparty%2Futil-linux.git 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 --- diff --git a/tests/functions.sh b/tests/functions.sh index 02f81dd5eb..bfc3fa28d1 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