]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
test: set a default $CEPH_ROOT env variable 8645/head
authorKefu Chai <kchai@redhat.com>
Mon, 18 Apr 2016 13:48:45 +0000 (21:48 +0800)
committerKefu Chai <kchai@redhat.com>
Mon, 18 Apr 2016 16:19:07 +0000 (00:19 +0800)
in cf24535, we use $CEPH_ROOT to specify the $top_srcdir to unify
cmake and autotools, but this breaks ceph-qa-suite/tasks/workunit.py,
as it only clones the necessary qa/workunits directory, and does not
pass $CEPH_ROOT to the test scripts. so we need to set a default
$CEPH_ROOT if it is not set.

Signed-off-by: Kefu Chai <kchai@redhat.com>
qa/workunits/cephtool/test.sh
src/test/cephtool-test-mds.sh
src/test/cephtool-test-mon.sh
src/test/cephtool-test-osd.sh

index 0b60cee7f08cc32e04c8d9873892b87cfaeee25a..965cecd5f6a117538c9cd96498cf96ebc242471b 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/bash -x
 
-source $CEPH_ROOT/qa/workunits/ceph-helpers.sh
+source $(dirname $0)/../ceph-helpers.sh
 
 set -e
 set -o functrace
index 8c9c88b6c42104b475e7d3e2e96c01b83ba446ab..1c582ffabdad9818a8f9538676679d1a7fcbf0b6 100755 (executable)
@@ -15,6 +15,8 @@
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU Library Public License for more details.
 #
+CEPH_ROOT=${CEPH_ROOT:-..}
+
 CEPH_CLI_TEST_DUP_COMMAND=1 \
 MDS=1 MON=1 OSD=3 CEPH_START='mon osd mds' CEPH_PORT=7200 $CEPH_ROOT/src/test/vstart_wrapper.sh \
     $CEPH_ROOT/qa/workunits/cephtool/test.sh \
index 9c9b20147acafc70d9b7feed24e1ef951c9b9562..34d32678fdcb3c17b9e87227ff1df775a2490f87 100755 (executable)
@@ -15,6 +15,8 @@
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU Library Public License for more details.
 #
+CEPH_ROOT=${CEPH_ROOT:-..}
+
 CEPH_CLI_TEST_DUP_COMMAND=1 \
 # uses CEPH_PORT going from 7202 7203 and 7204 because
 # it starts at 7202 and runs 3 mons (see vstart.sh)
index 13b0774a70533a0f7a157fd7e8e6da589b635166..247ad112f1e7a3a496aeca33cc01c7d2ec71f8d3 100755 (executable)
@@ -15,6 +15,8 @@
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU Library Public License for more details.
 #
+CEPH_ROOT=${CEPH_ROOT:-..}
+
 CEPH_CLI_TEST_DUP_COMMAND=1 \
 MON=1 OSD=3 CEPH_START='mon osd' CEPH_PORT=7201 $CEPH_ROOT/src/test/vstart_wrapper.sh \
     $CEPH_ROOT/qa/workunits/cephtool/test.sh \