]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
tests: test/osd/osd-copy-from.sh uses ceph-helpers.sh
authorLoic Dachary <ldachary@redhat.com>
Sat, 16 May 2015 13:39:30 +0000 (15:39 +0200)
committerLoic Dachary <ldachary@redhat.com>
Sun, 17 May 2015 11:31:25 +0000 (13:31 +0200)
The ceph-helpers.sh was already included, along with
mon/mon-test-helpers.sh and osd/osd-test-helpers.sh which creates
confusion.

Signed-off-by: Loic Dachary <ldachary@redhat.com>
src/test/osd/osd-copy-from.sh

index 64e15c46f54090a92008dc24ddfab953a5531c8d..93d1393098388d7148c3e2ee230dbe9d9705e437 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/bash
 #
 # Copyright (C) 2014 Cloudwatt <libre.licensing@cloudwatt.com>
-# Copyright (C) 2014 Red Hat <contact@redhat.com>
+# Copyright (C) 2014, 2015 Red Hat <contact@redhat.com>
 #
 # Author: Loic Dachary <loic@dachary.org>
 # Author: Sage Weil <sage@redhat.com>
 # GNU Library Public License for more details.
 #
 
-source test/mon/mon-test-helpers.sh
-source test/osd/osd-test-helpers.sh
+source test/ceph-helpers.sh
 
 function run() {
     local dir=$1
+    shift
 
     export CEPH_MON="127.0.0.1:7111"
     export CEPH_ARGS
     CEPH_ARGS+="--fsid=$(uuidgen) --auth-supported=none "
     CEPH_ARGS+="--mon-host=$CEPH_MON "
 
-    FUNCTIONS=${FUNCTIONS:-$(set | sed -n -e 's/^\(TEST_[0-9a-z_]*\) .*/\1/p')}
-    for TEST_function in $FUNCTIONS ; do
+    local funcs=${@:-$(set | sed -n -e 's/^\(TEST_[0-9a-z_]*\) .*/\1/p')}
+    for func in $funcs ; do
         setup $dir || return 1
-        $TEST_function $dir || return 1
+        $func $dir || return 1
         teardown $dir || return 1
     done
 }
@@ -39,8 +39,7 @@ function run() {
 function TEST_copy_from() {
     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
     run_osd $dir 1 || return 1
 
@@ -60,7 +59,7 @@ function TEST_copy_from() {
     ./rados -p rbd stat foo3
 }
 
-main osd-copy-from
+main osd-copy-from "$@"
 
 # Local Variables:
 # compile-command: "cd ../.. ; make -j4 && test/osd/osd-bench.sh"