summaryrefslogtreecommitdiffstats
path: root/tests/functions.sh
diff options
context:
space:
mode:
authorKarel Zak2016-07-11 11:01:14 +0200
committerKarel Zak2016-07-11 11:01:14 +0200
commit94fa9b4637b3555fac8646c93602d2c29d80b074 (patch)
tree965162ea32861932627636447bb890edce3271e4 /tests/functions.sh
parenttests: add chrt test (diff)
downloadkernel-qcow2-util-linux-94fa9b4637b3555fac8646c93602d2c29d80b074.tar.gz
kernel-qcow2-util-linux-94fa9b4637b3555fac8646c93602d2c29d80b074.tar.xz
kernel-qcow2-util-linux-94fa9b4637b3555fac8646c93602d2c29d80b074.zip
tests: implement ts_skip_subtest
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'tests/functions.sh')
-rw-r--r--tests/functions.sh17
1 files changed, 12 insertions, 5 deletions
diff --git a/tests/functions.sh b/tests/functions.sh
index db5f536c6..b9a852365 100644
--- a/tests/functions.sh
+++ b/tests/functions.sh
@@ -91,12 +91,12 @@ function ts_check_losetup {
ts_skip "no loop-device support"
}
-function ts_skip_subtest {
+function ts_report_skip {
ts_report " SKIPPED ($1)"
}
function ts_skip {
- ts_skip_subtest "$1"
+ ts_report_skip "$1"
ts_cleanup_on_exit
exit 0
@@ -130,7 +130,7 @@ function ts_failed {
exit $?
}
-function ts_ok_subtest {
+function ts_report_ok {
if [ x"$1" == x"" ]; then
ts_report " OK"
else
@@ -139,7 +139,7 @@ function ts_ok_subtest {
}
function ts_ok {
- ts_ok_subtest "$1"
+ ts_report_ok "$1"
exit 0
}
@@ -413,7 +413,7 @@ function ts_finalize_subtest {
ts_failed_subtest "$1"
res=1
else
- ts_ok_subtest "$(tt_gen_mem_report "$1")"
+ ts_report_ok "$(tt_gen_mem_report "$1")"
fi
[ $res -ne 0 ] && TS_NSUBFAILED=$(( $TS_NSUBFAILED + 1 ))
@@ -424,6 +424,13 @@ function ts_finalize_subtest {
return $res
}
+function ts_skip_subtest {
+ ts_report_skip "$1"
+ # reset environment back to parental test
+ ts_init_core_env
+
+}
+
function ts_finalize {
ts_cleanup_on_exit