From: Loic Dachary Date: Sat, 16 May 2015 09:15:56 +0000 (+0200) Subject: tests: kill mon-test-helpers.sh call_TEST_functions X-Git-Tag: v9.0.2~146^2~12 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=66dcda9a58aa4085b05af54411761eb61845ce5f;p=ceph.git tests: kill mon-test-helpers.sh call_TEST_functions 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 --- diff --git a/src/test/mon/mon-test-helpers.sh b/src/test/mon/mon-test-helpers.sh index 02ab03a22224..ef52c31ccdaf 100644 --- a/src/test/mon/mon-test-helpers.sh +++ b/src/test/mon/mon-test-helpers.sh @@ -77,31 +77,6 @@ function kill_daemons() { 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 diff --git a/src/test/osd/osd-config.sh b/src/test/osd/osd-config.sh index aceda0cf121b..3606f6381741 100755 --- a/src/test/osd/osd-config.sh +++ b/src/test/osd/osd-config.sh @@ -27,8 +27,12 @@ function run() { 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() { diff --git a/src/test/osd/osd-copy-from.sh b/src/test/osd/osd-copy-from.sh index b4120c5ad450..64e15c46f540 100755 --- a/src/test/osd/osd-copy-from.sh +++ b/src/test/osd/osd-copy-from.sh @@ -28,8 +28,12 @@ function run() { 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() {