From: Kefu Chai Date: Mon, 18 Apr 2016 13:48:45 +0000 (+0800) Subject: test: set a default $CEPH_ROOT env variable X-Git-Tag: v10.2.0~4^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=558863ad6d6065de95f7e21faaeef71d5d52310e;p=ceph.git test: set a default $CEPH_ROOT env variable 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 --- diff --git a/qa/workunits/cephtool/test.sh b/qa/workunits/cephtool/test.sh index 0b60cee7f08c..965cecd5f6a1 100755 --- a/qa/workunits/cephtool/test.sh +++ b/qa/workunits/cephtool/test.sh @@ -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 diff --git a/src/test/cephtool-test-mds.sh b/src/test/cephtool-test-mds.sh index 8c9c88b6c421..1c582ffabdad 100755 --- a/src/test/cephtool-test-mds.sh +++ b/src/test/cephtool-test-mds.sh @@ -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 \ diff --git a/src/test/cephtool-test-mon.sh b/src/test/cephtool-test-mon.sh index 9c9b20147aca..34d32678fdcb 100755 --- a/src/test/cephtool-test-mon.sh +++ b/src/test/cephtool-test-mon.sh @@ -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) diff --git a/src/test/cephtool-test-osd.sh b/src/test/cephtool-test-osd.sh index 13b0774a7053..247ad112f1e7 100755 --- a/src/test/cephtool-test-osd.sh +++ b/src/test/cephtool-test-osd.sh @@ -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 \