]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
tests: optionally skip tests where loop support is needed
authorRuediger Meier <ruediger.meier@ga-group.nl>
Mon, 16 Mar 2015 11:22:53 +0000 (12:22 +0100)
committerRuediger Meier <ruediger.meier@ga-group.nl>
Mon, 16 Mar 2015 13:32:34 +0000 (14:32 +0100)
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>
tests/functions.sh

index 02f81dd5eb69e8e6e7b4534ad9a30c650ef40e06..bfc3fa28d1bca7b4e276fd58cb5497689f22745c 100644 (file)
@@ -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