summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/functions.sh37
-rwxr-xr-xtests/ts/blkid/low-probe2
2 files changed, 21 insertions, 18 deletions
diff --git a/tests/functions.sh b/tests/functions.sh
index e639e7362..c367f011e 100644
--- a/tests/functions.sh
+++ b/tests/functions.sh
@@ -46,11 +46,22 @@ function ts_cd {
}
function ts_report {
- if [ "$TS_PARALLEL" == "yes" ]; then
- echo "$TS_TITLE $1"
+ local desc=
+
+ if [ "$TS_PARALLEL" != "yes" ]; then
+ if [ $TS_NSUBTESTS -ne 0 ] && [ -z "$TS_SUBNAME" ]; then
+ desc=$(printf "%11s...")
+ fi
+ echo "$desc$1"
+ return
+ fi
+
+ if [ -n "$TS_SUBNAME" ]; then
+ desc=$(printf "%s: [%02d] %s" "$TS_DESC" "$TS_NSUBTESTS" "$TS_SUBNAME")
else
- echo "$1"
+ desc=$TS_DESC
fi
+ printf "%13s: %-45s ...%s\n" "$TS_COMPONENT" "$desc" "$1"
}
function ts_check_test_command {
@@ -170,6 +181,7 @@ function ts_option_argument {
}
function ts_init_core_env {
+ TS_SUBNAME=""
TS_NS="$TS_COMPONENT/$TS_TESTNAME"
TS_OUTPUT="$TS_OUTDIR/$TS_TESTNAME"
TS_VGDUMP="$TS_OUTDIR/$TS_TESTNAME.vgdump"
@@ -294,17 +306,12 @@ function ts_init_env {
function ts_init_subtest {
TS_SUBNAME="$1"
-
ts_init_core_subtest_env
-
- [ $TS_NSUBTESTS -eq 0 ] && echo
TS_NSUBTESTS=$(( $TS_NSUBTESTS + 1 ))
- if [ "$TS_PARALLEL" == "yes" ]; then
- TS_TITLE=$(printf "%13s: %-30s ...\n%16s: %-27s ..." "$TS_COMPONENT" "$TS_DESC" "" "$TS_SUBNAME")
- else
- TS_TITLE=$(printf "%16s: %-27s ..." "" "$TS_SUBNAME")
- echo -n "$TS_TITLE"
+ if [ "$TS_PARALLEL" != "yes" ]; then
+ [ $TS_NSUBTESTS -eq 1 ] && echo
+ printf "%16s: %-27s ..." "" "$TS_SUBNAME"
fi
}
@@ -314,11 +321,8 @@ function ts_init {
local is_fake=$( ts_has_option "fake" "$*")
local is_force=$( ts_has_option "force" "$*")
- if [ "$TS_PARALLEL" == "yes" ]; then
- TS_TITLE=$(printf "%13s: %-30s ..." "$TS_COMPONENT" "$TS_DESC")
- else
- TS_TITLE=$(printf "%13s: %-30s ..." "$TS_COMPONENT" "$TS_DESC")
- echo -n "$TS_TITLE"
+ if [ "$TS_PARALLEL" != "yes" ]; then
+ printf "%13s: %-30s ..." "$TS_COMPONENT" "$TS_DESC"
fi
[ "$is_fake" == "yes" ] && ts_skip "fake mode"
@@ -420,7 +424,6 @@ function ts_finalize {
ts_cleanup_on_exit
if [ $TS_NSUBTESTS -ne 0 ]; then
- printf "%11s..."
if [ $TS_NSUBFAILED -ne 0 ]; then
ts_failed "$TS_NSUBFAILED from $TS_NSUBTESTS sub-tests"
else
diff --git a/tests/ts/blkid/low-probe b/tests/ts/blkid/low-probe
index 628b8a63f..38023b8a1 100755
--- a/tests/ts/blkid/low-probe
+++ b/tests/ts/blkid/low-probe
@@ -17,7 +17,7 @@
#
TS_TOPDIR="${0%/*}/../.."
-TS_DESC="low-level superblocks probing"
+TS_DESC="superblocks probing"
. $TS_TOPDIR/functions.sh