]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
cmake: test-ceph-helpers working
authorAli Maredia <amaredia@redhat.com>
Mon, 11 Jan 2016 22:28:47 +0000 (17:28 -0500)
committerAli Maredia <amaredia@redhat.com>
Fri, 15 Apr 2016 00:48:19 +0000 (20:48 -0400)
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 <amaredia@redhat.com>
CMakeLists.txt
qa/workunits/ceph-helpers.sh
src/CMakeLists.txt
src/test/test-ceph-helpers.sh

index b36b682734a1fedd4da237f86a33e1b95c01a5d4..b02aeabdd00b2f31f3ce567f46becc5203bdac20 100644 (file)
@@ -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)
index 0f9309147ab5fd13fafce5d95f77992432608c7f..0eeb2406876dc7f8314dac0913dd680fc7290571 100755 (executable)
@@ -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
index d94b9bc44adc68886f7e4a3dc6a3877a8c2409e5..a8cda8399204347dbe0d91a0c81f4c3793781d99 100644 (file)
@@ -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
index 20c44ff60d2807996b83d46b2c696b7d4385bd61..ec6be5fe74e865dc89c7b14d1fbd4c2e978206e4 100755 (executable)
@@ -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