From: Ali Maredia Date: Mon, 11 Jan 2016 22:28:47 +0000 (-0500) Subject: cmake: test-ceph-helpers working X-Git-Tag: v10.2.0~27^2~57 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=e0f400fdefe1f08a8d179483e6714d0a1af35f6c;p=ceph.git cmake: test-ceph-helpers working Moved all the libraries in CMAKE_BINARY_DIR/lib and all the binaries in CMAKE_BINARY_DIR/bin. Set various environment variables for test-ceph-helpers. Put those variables throughout qa/workunits/ceph-helpers.sh. NOTE: This is a very rough draft of these fixes. Signed-off-by: Ali Maredia --- diff --git a/CMakeLists.txt b/CMakeLists.txt index b36b682734a1f..b02aeabdd00b2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -46,6 +46,11 @@ link_directories( ${LEVELDB_PREFIX}/lib ) +#put all the libs and binaries in one place +set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) +set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) +set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) + #Check Includes include(CheckIncludeFiles) include(CheckIncludeFileCXX) diff --git a/qa/workunits/ceph-helpers.sh b/qa/workunits/ceph-helpers.sh index 0f9309147ab5f..0eeb2406876dc 100755 --- a/qa/workunits/ceph-helpers.sh +++ b/qa/workunits/ceph-helpers.sh @@ -360,8 +360,8 @@ function run_mon() { --mon-data-avail-crit=1 \ --paxos-propose-interval=0.1 \ --osd-crush-chooseleaf-type=0 \ - --erasure-code-dir=.libs \ - --plugin-dir=.libs \ + --erasure-code-dir=$CEPH_LIB \ + --plugin-dir=$CEPH_LIB \ --debug-mon 20 \ --debug-ms 20 \ --debug-paxos 20 \ @@ -594,9 +594,9 @@ function activate_osd() { ceph_args+=" --osd-scrub-load-threshold=2000" ceph_args+=" --osd-data=$osd_data" ceph_args+=" --chdir=" - ceph_args+=" --erasure-code-dir=.libs" - ceph_args+=" --plugin-dir=.libs" - ceph_args+=" --osd-class-dir=.libs" + ceph_args+=" --erasure-code-dir=$CEPH_LIB" + ceph_args+=" --plugin-dir=$CEPH_LIB" + ceph_args+=" --osd-class-dir=$CEPH_LIB" ceph_args+=" --run-dir=$dir" ceph_args+=" --debug-osd=20" ceph_args+=" --log-file=$dir/\$name.log" @@ -654,6 +654,7 @@ function wait_for_osd() { status=1 for ((i=0; i < $TIMEOUT; i++)); do + echo $i if ! ceph osd dump | grep "osd.$id $state"; then sleep 1 else @@ -1446,6 +1447,7 @@ function main() { PS4='${BASH_SOURCE[0]}:$LINENO: ${FUNCNAME[0]}: ' export PATH=${CEPH_BUILD_VIRTUALENV}/ceph-disk-virtualenv/bin:${CEPH_BUILD_VIRTUALENV}/ceph-detect-init-virtualenv/bin:.:$PATH # make sure program from sources are prefered + #export PATH=$CEPH_ROOT/src/ceph-disk/virtualenv/bin:$CEPH_ROOT/src/ceph-detect-init/virtualenv/bin:.:$PATH # make sure program from sources are prefered export CEPH_CONF=/dev/null unset CEPH_ARGS @@ -1468,6 +1470,7 @@ function run_tests() { PS4='${BASH_SOURCE[0]}:$LINENO: ${FUNCNAME[0]}: ' export PATH=${CEPH_BUILD_VIRTUALENV}/ceph-disk-virtualenv/bin:${CEPH_BUILD_VIRTUALENV}/ceph-detect-init-virtualenv/bin:.:$PATH # make sure program from sources are prefered + #export PATH=$CEPH_ROOT/src/ceph-disk/virtualenv/bin:$CEPH_ROOT/src/ceph-detect-init/virtualenv/bin:.:$PATH # make sure program from sources are prefered export CEPH_MON="127.0.0.1:7109" # git grep '\<7109\>' : there must be only one export CEPH_ARGS diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index d94b9bc44adc6..a8cda83992043 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -885,19 +885,19 @@ target_link_libraries(ceph-authtool global ${EXTRALIBS} ${CRYPTO_LIBS}) install(TARGETS ceph-authtool DESTINATION bin) configure_file(${CMAKE_SOURCE_DIR}/src/ceph-coverage.in - ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/ceph-coverage @ONLY) + ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/ceph-coverage @ONLY) configure_file(${CMAKE_SOURCE_DIR}/src/ceph-debugpack.in - ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/ceph-debugpack @ONLY) + ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/ceph-debugpack @ONLY) configure_file(${CMAKE_SOURCE_DIR}/src/ceph.in - ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/ceph @ONLY) + ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/ceph @ONLY) configure_file(${CMAKE_SOURCE_DIR}/src/ceph-crush-location.in - ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/ceph-crush-location @ONLY) + ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/ceph-crush-location @ONLY) configure_file(${CMAKE_SOURCE_DIR}/src/init-ceph.in - ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/init-ceph @ONLY) + ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/init-ceph @ONLY) install(PROGRAMS ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/ceph diff --git a/src/test/test-ceph-helpers.sh b/src/test/test-ceph-helpers.sh index 20c44ff60d280..ec6be5fe74e86 100755 --- a/src/test/test-ceph-helpers.sh +++ b/src/test/test-ceph-helpers.sh @@ -17,4 +17,4 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Library Public License for more details. # -../qa/workunits/ceph-helpers.sh TESTS +$CEPH_ROOT/qa/workunits/ceph-helpers.sh TESTS