diff options
author | Karel Zak | 2009-01-20 13:19:43 +0100 |
---|---|---|
committer | Karel Zak | 2009-02-11 23:32:58 +0100 |
commit | 905d0b9b66d8a8f90bacfcd745865e7ec4038016 (patch) | |
tree | a50b87680570ca0bcea894717f4201f65b4c86b0 /tests/functions.sh | |
parent | tests: add "byte-order" to helpers/test_sysinfo (diff) | |
download | kernel-qcow2-util-linux-905d0b9b66d8a8f90bacfcd745865e7ec4038016.tar.gz kernel-qcow2-util-linux-905d0b9b66d8a8f90bacfcd745865e7ec4038016.tar.xz kernel-qcow2-util-linux-905d0b9b66d8a8f90bacfcd745865e7ec4038016.zip |
tests: move some generic stuff from ts_init() to a new ts_init_env()
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'tests/functions.sh')
-rw-r--r-- | tests/functions.sh | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/tests/functions.sh b/tests/functions.sh index f05944350..fcde2ad4b 100644 --- a/tests/functions.sh +++ b/tests/functions.sh @@ -63,8 +63,7 @@ function ts_has_option { echo -n $ALL | sed 's/ //g' | awk 'BEGIN { FS="="; RS="--" } /('$NAME'$|'$NAME'=)/ { print "yes" }' } -function ts_init { - local is_fake=$( ts_has_option "fake" "$*") +function ts_init_env { local mydir=$(ts_abspath $(dirname $0)) export LANG="en_US.UTF-8" @@ -109,8 +108,6 @@ function ts_init { rm -f $TS_OUTPUT touch $TS_OUTPUT - printf "%15s: %-30s ..." "$TS_COMPONENT" "$TS_DESC" - if [ "$TS_VERBOSE" == "yes" ]; then echo echo " script: $TS_SCRIPT" @@ -127,6 +124,14 @@ function ts_init { echo " mountpoint: $TS_MOUNTPOINT" echo fi +} + +function ts_init { + local is_fake=$( ts_has_option "fake" "$*") + + ts_init_env "$*" + + printf "%15s: %-30s ..." "$TS_COMPONENT" "$TS_DESC" [ "$is_fake" == "yes" ] && ts_skip "fake mode" } |