tests: convert osd-bench.sh to ceph-helpers.sh

Signed-off-by: Loic Dachary <ldachary@redhat.com>
This commit is contained in:
Loic Dachary 2015-04-21 16:12:56 +02:00
parent 5871781b10
commit 14cb7b8f59

View File

@ -16,26 +16,28 @@
# GNU Library Public License for more details.
#
source test/mon/mon-test-helpers.sh
source test/ceph-helpers.sh
source test/osd/osd-test-helpers.sh
function run() {
local dir=$1
shift
export CEPH_MON="127.0.0.1:7106"
export CEPH_ARGS
CEPH_ARGS+="--fsid=$(uuidgen) --auth-supported=none "
CEPH_ARGS+="--mon-host=$CEPH_MON "
local id=a
call_TEST_functions $dir $id || return 1
local funcs=${@:-$(set | sed -n -e 's/^\(TEST_[0-9a-z_]*\) .*/\1/p')}
for func in $funcs ; do
$func $dir || return 1
done
}
function TEST_bench() {
local dir=$1
run_mon $dir a --public-addr $CEPH_MON \
|| return 1
run_mon $dir a || return 1
run_osd $dir 0 || return 1
local osd_bench_small_size_max_iops=$(CEPH_ARGS='' ./ceph-conf \
@ -75,7 +77,7 @@ function TEST_bench() {
./ceph tell osd.0 bench || return 1
}
main osd-bench
main osd-bench "$@"
# Local Variables:
# compile-command: "cd ../.. ; make -j4 && test/osd/osd-bench.sh"