From: Ali Maredia Date: Fri, 22 Apr 2016 00:34:38 +0000 (-0400) Subject: test: added env var setting to make check scripts X-Git-Tag: v11.0.0~766^2~7 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=4321bb64eda59d9d6ef695173fceab0ccda55df0;p=ceph.git test: added env var setting to make check scripts Signed-off-by: Ali Maredia --- diff --git a/qa/workunits/erasure-code/encode-decode-non-regression.sh b/qa/workunits/erasure-code/encode-decode-non-regression.sh index bd3289c6aaf7..3e03787206ec 100755 --- a/qa/workunits/erasure-code/encode-decode-non-regression.sh +++ b/qa/workunits/erasure-code/encode-decode-non-regression.sh @@ -14,6 +14,8 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Library Public License for more details. # +source $(dirname $0)/../../../src/test/detect-build-env-vars.sh + : ${CORPUS:=https://github.com/ceph/ceph-erasure-code-corpus.git} : ${DIRECTORY:=$CEPH_ROOT/ceph-erasure-code-corpus} diff --git a/src/test/cephtool-test-mds.sh b/src/test/cephtool-test-mds.sh index 1c582ffabdad..463f2d4557d4 100755 --- a/src/test/cephtool-test-mds.sh +++ b/src/test/cephtool-test-mds.sh @@ -15,7 +15,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Library Public License for more details. # -CEPH_ROOT=${CEPH_ROOT:-..} +source $(dirname $0)/detect-build-env-vars.sh 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 \ diff --git a/src/test/cephtool-test-mon.sh b/src/test/cephtool-test-mon.sh index 34d32678fdcb..a3b1619ee130 100755 --- a/src/test/cephtool-test-mon.sh +++ b/src/test/cephtool-test-mon.sh @@ -15,7 +15,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Library Public License for more details. # -CEPH_ROOT=${CEPH_ROOT:-..} +source $(dirname $0)/detect-build-env-vars.sh CEPH_CLI_TEST_DUP_COMMAND=1 \ # uses CEPH_PORT going from 7202 7203 and 7204 because diff --git a/src/test/cephtool-test-osd.sh b/src/test/cephtool-test-osd.sh index 247ad112f1e7..f5091a75f846 100755 --- a/src/test/cephtool-test-osd.sh +++ b/src/test/cephtool-test-osd.sh @@ -15,7 +15,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Library Public License for more details. # -CEPH_ROOT=${CEPH_ROOT:-..} +source $(dirname $0)/detect-build-env-vars.sh CEPH_CLI_TEST_DUP_COMMAND=1 \ MON=1 OSD=3 CEPH_START='mon osd' CEPH_PORT=7201 $CEPH_ROOT/src/test/vstart_wrapper.sh \ diff --git a/src/test/cephtool-test-rados.sh b/src/test/cephtool-test-rados.sh index 402c1c5ff945..f7766c2a792d 100755 --- a/src/test/cephtool-test-rados.sh +++ b/src/test/cephtool-test-rados.sh @@ -14,6 +14,8 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Library Public License for more details. # +source $(dirname $0)/detect-build-env-vars.sh + CEPH_CLI_TEST_DUP_COMMAND=1 \ MON=1 OSD=3 CEPH_START='mon osd' CEPH_PORT=7205 $CEPH_ROOT/src/test/vstart_wrapper.sh \ $CEPH_ROOT/src/test/test_rados_tool.sh diff --git a/src/test/encoding/check-generated.sh b/src/test/encoding/check-generated.sh index 20d0c4fc1db7..1783cdbafcfd 100755 --- a/src/test/encoding/check-generated.sh +++ b/src/test/encoding/check-generated.sh @@ -1,5 +1,6 @@ #!/bin/bash -e +source $(dirname $0)/../detect-build-env-vars.sh source $CEPH_ROOT/qa/workunits/ceph-helpers.sh dir=$1 diff --git a/src/test/encoding/readable.sh b/src/test/encoding/readable.sh index f55d309f2d5d..f713c8d73ccc 100755 --- a/src/test/encoding/readable.sh +++ b/src/test/encoding/readable.sh @@ -1,5 +1,7 @@ #!/bin/sh -e +source $(dirname $0)/../detect-build-env-vars.sh + [ -z "$CEPH_ROOT" ] && CEPH_ROOT=.. dir=$CEPH_ROOT/ceph-object-corpus diff --git a/src/test/erasure-code/test-erasure-code.sh b/src/test/erasure-code/test-erasure-code.sh index 49f501f1b1ff..cec40eca8152 100755 --- a/src/test/erasure-code/test-erasure-code.sh +++ b/src/test/erasure-code/test-erasure-code.sh @@ -16,6 +16,7 @@ # GNU Library Public License for more details. # +source $(dirname $0)/../detect-build-env-vars.sh source $CEPH_ROOT/qa/workunits/ceph-helpers.sh function run() { diff --git a/src/test/erasure-code/test-erasure-eio.sh b/src/test/erasure-code/test-erasure-eio.sh index 7db60cd1f42d..d7c3a1692252 100755 --- a/src/test/erasure-code/test-erasure-eio.sh +++ b/src/test/erasure-code/test-erasure-eio.sh @@ -16,6 +16,7 @@ # GNU Library Public License for more details. # +source $(dirname $0)/../detect-build-env-vars.sh source $CEPH_ROOT/qa/workunits/ceph-helpers.sh function run() { diff --git a/src/test/libradosstriper/rados-striper.sh b/src/test/libradosstriper/rados-striper.sh index a2de948b07fd..a919c3d770b5 100755 --- a/src/test/libradosstriper/rados-striper.sh +++ b/src/test/libradosstriper/rados-striper.sh @@ -14,6 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Library Public License for more details. # +source $(dirname $0)/../detect-build-env-vars.sh source $CEPH_ROOT/qa/workunits/ceph-helpers.sh function run() { diff --git a/src/test/mon/misc.sh b/src/test/mon/misc.sh index 53f7bff24091..1b8a88b3e62c 100755 --- a/src/test/mon/misc.sh +++ b/src/test/mon/misc.sh @@ -15,6 +15,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Library Public License for more details. # +source $(dirname $0)/../detect-build-env-vars.sh source $CEPH_ROOT/qa/workunits/ceph-helpers.sh function run() { diff --git a/src/test/mon/mkfs.sh b/src/test/mon/mkfs.sh index 270736cd36bb..324457a34f9c 100755 --- a/src/test/mon/mkfs.sh +++ b/src/test/mon/mkfs.sh @@ -18,6 +18,8 @@ set -xe PS4='${BASH_SOURCE[0]}:$LINENO: ${FUNCNAME[0]}: ' +source $(dirname $0)/../detect-build-env-vars.sh + DIR=mkfs export CEPH_CONF=/dev/null unset CEPH_ARGS diff --git a/src/test/mon/mon-created-time.sh b/src/test/mon/mon-created-time.sh index 0022a23f9f2d..60277155f7a0 100755 --- a/src/test/mon/mon-created-time.sh +++ b/src/test/mon/mon-created-time.sh @@ -12,6 +12,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Library Public License for more details. # +source $(dirname $0)/../detect-build-env-vars.sh source $CEPH_ROOT/qa/workunits/ceph-helpers.sh function run() { diff --git a/src/test/mon/mon-handle-forward.sh b/src/test/mon/mon-handle-forward.sh index f10e6e54be13..64e2f1e72196 100755 --- a/src/test/mon/mon-handle-forward.sh +++ b/src/test/mon/mon-handle-forward.sh @@ -15,6 +15,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Library Public License for more details. # +source $(dirname $0)/../detect-build-env-vars.sh source $CEPH_ROOT/qa/workunits/ceph-helpers.sh function run() { diff --git a/src/test/mon/mon-ping.sh b/src/test/mon/mon-ping.sh index d3adf5c55d31..9fb8848896fc 100755 --- a/src/test/mon/mon-ping.sh +++ b/src/test/mon/mon-ping.sh @@ -12,6 +12,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Library Public License for more details. # +source $(dirname $0)/../detect-build-env-vars.sh source $CEPH_ROOT/qa/workunits/ceph-helpers.sh function run() { diff --git a/src/test/mon/mon-scrub.sh b/src/test/mon/mon-scrub.sh index b4205392d66a..b140912ec17e 100755 --- a/src/test/mon/mon-scrub.sh +++ b/src/test/mon/mon-scrub.sh @@ -15,6 +15,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Library Public License for more details. # +source $(dirname $0)/../detect-build-env-vars.sh source $CEPH_ROOT/qa/workunits/ceph-helpers.sh function run() { diff --git a/src/test/mon/osd-crush.sh b/src/test/mon/osd-crush.sh index 7323e352ac6f..4fecd4a4d516 100755 --- a/src/test/mon/osd-crush.sh +++ b/src/test/mon/osd-crush.sh @@ -15,6 +15,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Library Public License for more details. # +source $(dirname $0)/../detect-build-env-vars.sh source $CEPH_ROOT/qa/workunits/ceph-helpers.sh function run() { diff --git a/src/test/mon/osd-erasure-code-profile.sh b/src/test/mon/osd-erasure-code-profile.sh index 65c410ad7181..f7a9cc3800e2 100755 --- a/src/test/mon/osd-erasure-code-profile.sh +++ b/src/test/mon/osd-erasure-code-profile.sh @@ -15,6 +15,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Library Public License for more details. # +source $(dirname $0)/../detect-build-env-vars.sh source $CEPH_ROOT/qa/workunits/ceph-helpers.sh function run() { diff --git a/src/test/mon/osd-pool-create.sh b/src/test/mon/osd-pool-create.sh index 4a19d13410b8..3deef6fc10d0 100755 --- a/src/test/mon/osd-pool-create.sh +++ b/src/test/mon/osd-pool-create.sh @@ -15,6 +15,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Library Public License for more details. # +source $(dirname $0)/../detect-build-env-vars.sh source $CEPH_ROOT/qa/workunits/ceph-helpers.sh function run() { diff --git a/src/test/osd/osd-bench.sh b/src/test/osd/osd-bench.sh index fd1f4a624c5e..ac40cb0d8cd3 100755 --- a/src/test/osd/osd-bench.sh +++ b/src/test/osd/osd-bench.sh @@ -16,6 +16,7 @@ # GNU Library Public License for more details. # +source $(dirname $0)/../detect-build-env-vars.sh source $CEPH_ROOT/qa/workunits/ceph-helpers.sh function run() { diff --git a/src/test/osd/osd-config.sh b/src/test/osd/osd-config.sh index 8f2f0db9c5d8..a27862c2235c 100755 --- a/src/test/osd/osd-config.sh +++ b/src/test/osd/osd-config.sh @@ -16,6 +16,7 @@ # GNU Library Public License for more details. # +source $(dirname $0)/../detect-build-env-vars.sh source $CEPH_ROOT/qa/workunits/ceph-helpers.sh function run() { diff --git a/src/test/osd/osd-copy-from.sh b/src/test/osd/osd-copy-from.sh index 2fcf2a8fb9ed..12d2fb48d194 100755 --- a/src/test/osd/osd-copy-from.sh +++ b/src/test/osd/osd-copy-from.sh @@ -17,6 +17,7 @@ # GNU Library Public License for more details. # +source $(dirname $0)/../detect-build-env-vars.sh source $CEPH_ROOT/qa/workunits/ceph-helpers.sh function run() { diff --git a/src/test/osd/osd-markdown.sh b/src/test/osd/osd-markdown.sh index 5cd5c6b0d31a..095fe5f95169 100755 --- a/src/test/osd/osd-markdown.sh +++ b/src/test/osd/osd-markdown.sh @@ -16,6 +16,7 @@ # GNU Library Public License for more details. # +source $(dirname $0)/../detect-build-env-vars.sh source $CEPH_ROOT/qa/workunits/ceph-helpers.sh function run() { diff --git a/src/test/osd/osd-reactivate.sh b/src/test/osd/osd-reactivate.sh index e0aff3f48efd..311bda457bca 100755 --- a/src/test/osd/osd-reactivate.sh +++ b/src/test/osd/osd-reactivate.sh @@ -13,6 +13,7 @@ # GNU Library Public License for more details. # +source $(dirname $0)/../detect-build-env-vars.sh source $CEPH_ROOT/qa/workunits/ceph-helpers.sh function run() { diff --git a/src/test/osd/osd-reuse-id.sh b/src/test/osd/osd-reuse-id.sh index 59145972a2ae..74f3fe38699c 100755 --- a/src/test/osd/osd-reuse-id.sh +++ b/src/test/osd/osd-reuse-id.sh @@ -14,6 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Library Public License for more details. # +source $(dirname $0)/../detect-build-env-vars.sh source $CEPH_ROOT/qa/workunits/ceph-helpers.sh function run() { diff --git a/src/test/osd/osd-scrub-repair.sh b/src/test/osd/osd-scrub-repair.sh index 03580c3f833a..3815ea3c2da9 100755 --- a/src/test/osd/osd-scrub-repair.sh +++ b/src/test/osd/osd-scrub-repair.sh @@ -14,6 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Library Public License for more details. # +source $(dirname $0)/../detect-build-env-vars.sh source $CEPH_ROOT/qa/workunits/ceph-helpers.sh function run() { diff --git a/src/test/osd/osd-scrub-snaps.sh b/src/test/osd/osd-scrub-snaps.sh index d4224489fa4f..982cc7afdf45 100755 --- a/src/test/osd/osd-scrub-snaps.sh +++ b/src/test/osd/osd-scrub-snaps.sh @@ -14,6 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Library Public License for more details. # +source $(dirname $0)/../detect-build-env-vars.sh source $CEPH_ROOT/qa/workunits/ceph-helpers.sh function run() { diff --git a/src/test/pybind/test_ceph_argparse.py b/src/test/pybind/test_ceph_argparse.py index 4c325f278e52..f8983222be87 100755 --- a/src/test/pybind/test_ceph_argparse.py +++ b/src/test/pybind/test_ceph_argparse.py @@ -26,6 +26,8 @@ import json def get_command_descriptions(what): CEPH_BIN = os.environ['CEPH_BIN'] + if CEPH_BIN == "": + CEPH_BIN = "." return os.popen(CEPH_BIN + "/get_command_descriptions " + "--" + what).read() def test_parse_json_funcsigs(): diff --git a/src/test/run-rbd-unit-tests.sh b/src/test/run-rbd-unit-tests.sh index 00b4d5190d23..b14343630387 100755 --- a/src/test/run-rbd-unit-tests.sh +++ b/src/test/run-rbd-unit-tests.sh @@ -2,9 +2,8 @@ # this should be run from the src directory in the ceph.git -CEPH_SRC=$(pwd) -export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$CEPH_SRC/.libs" -PATH="$CEPH_SRC:$PATH" +source $(dirname $0)/detect-build-env-vars.sh +PATH="$CEPH_BIN:$PATH" unittest_librbd for i in 0 1 61 109 diff --git a/src/test/test-ceph-helpers.sh b/src/test/test-ceph-helpers.sh index ec6be5fe74e8..488bed02318a 100755 --- a/src/test/test-ceph-helpers.sh +++ b/src/test/test-ceph-helpers.sh @@ -17,4 +17,6 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Library Public License for more details. # +source $(dirname $0)/detect-build-env-vars.sh + $CEPH_ROOT/qa/workunits/ceph-helpers.sh TESTS diff --git a/src/test/test_pidfile.sh b/src/test/test_pidfile.sh index 5a9044421cf2..7bc2696a49a1 100755 --- a/src/test/test_pidfile.sh +++ b/src/test/test_pidfile.sh @@ -5,6 +5,7 @@ # # Includes +source $(dirname $0)/detect-build-env-vars.sh source $CEPH_ROOT/qa/workunits/ceph-helpers.sh function run() {