summaryrefslogtreecommitdiffstats
path: root/tests/functions.sh
diff options
context:
space:
mode:
authorKarel Zak2011-11-03 13:20:24 +0100
committerKarel Zak2011-11-03 13:20:24 +0100
commit949cf64bbc4febc35a254a132dabaaeb9e0e0fbe (patch)
treea4beafb0a6322bf3c5c2aef0903d8a445b273fb2 /tests/functions.sh
parentbuild-sys: fix libuuid initialization (diff)
downloadkernel-qcow2-util-linux-949cf64bbc4febc35a254a132dabaaeb9e0e0fbe.tar.gz
kernel-qcow2-util-linux-949cf64bbc4febc35a254a132dabaaeb9e0e0fbe.tar.xz
kernel-qcow2-util-linux-949cf64bbc4febc35a254a132dabaaeb9e0e0fbe.zip
tests: fix options evaluation, add support for optional tests
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'tests/functions.sh')
-rw-r--r--tests/functions.sh2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/functions.sh b/tests/functions.sh
index 71ff7da0a..bc658ba9a 100644
--- a/tests/functions.sh
+++ b/tests/functions.sh
@@ -168,12 +168,14 @@ function ts_init_subtest {
function ts_init {
local is_fake=$( ts_has_option "fake" "$*")
+ local is_force=$( ts_has_option "force" "$*")
ts_init_env "$*"
printf "%13s: %-30s ..." "$TS_COMPONENT" "$TS_DESC"
[ "$is_fake" == "yes" ] && ts_skip "fake mode"
+ [ "$TS_OPTIONAL" == "yes" -a "$is_force" != "yes" ] && ts_skip "optional"
}
function ts_init_suid {