Remove call_TEST_functions because it is too complex and rarely used.
Replace the two instances where it was used by a few lines doing the
same thing.
Signed-off-by: Loic Dachary <ldachary@redhat.com>
done
}
-function call_TEST_functions() {
- local dir=$1
- shift
- local id=$1
- shift
-
- setup $dir || return 1
- run_mon $dir $id "$@"
- SHARE_MON_FUNCTIONS=${SHARE_MON_FUNCTIONS:-$(set | sed -n -e 's/^\(SHARE_MON_TEST_[0-9a-z_]*\) .*/\1/p')}
- for TEST_function in $SHARE_MON_FUNCTIONS ; do
- if ! $TEST_function $dir $id ; then
- cat $dir/$id/log
- return 1
- fi
- done
- teardown $dir || return 1
-
- FUNCTIONS=${FUNCTIONS:-$(set | sed -n -e 's/^\(TEST_[0-9a-z_]*\) .*/\1/p')}
- for TEST_function in $FUNCTIONS ; do
- setup $dir || return 1
- $TEST_function $dir || return 1
- teardown $dir || return 1
- done
-}
-
function main() {
local dir=testdir/$1
CEPH_ARGS+="--mon-host=$CEPH_MON "
CEPH_ARGS+="--fsid=$(uuidgen) --auth-supported=none "
- local id=a
- call_TEST_functions $dir $id || return 1
+ FUNCTIONS=${FUNCTIONS:-$(set | sed -n -e 's/^\(TEST_[0-9a-z_]*\) .*/\1/p')}
+ for TEST_function in $FUNCTIONS ; do
+ setup $dir || return 1
+ $TEST_function $dir || return 1
+ teardown $dir || return 1
+ done
}
function TEST_config_init() {
CEPH_ARGS+="--fsid=$(uuidgen) --auth-supported=none "
CEPH_ARGS+="--mon-host=$CEPH_MON "
- local id=a
- call_TEST_functions $dir $id || return 1
+ FUNCTIONS=${FUNCTIONS:-$(set | sed -n -e 's/^\(TEST_[0-9a-z_]*\) .*/\1/p')}
+ for TEST_function in $FUNCTIONS ; do
+ setup $dir || return 1
+ $TEST_function $dir || return 1
+ teardown $dir || return 1
+ done
}
function TEST_copy_from() {