]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
run-make-check.sh: use cmake exclusively 11019/head
authorSage Weil <sage@redhat.com>
Thu, 29 Sep 2016 16:33:16 +0000 (12:33 -0400)
committerSage Weil <sage@redhat.com>
Mon, 3 Oct 2016 13:46:50 +0000 (09:46 -0400)
..and drop the separate cmake script

Signed-off-by: Sage Weil <sage@redhat.com>
run-cmake-check.sh [deleted file]
run-make-check.sh

diff --git a/run-cmake-check.sh b/run-cmake-check.sh
deleted file mode 100755 (executable)
index 7772608..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-#!/bin/bash
-#
-# Ceph distributed storage system
-#
-# Copyright (C) 2014 Red Hat <contact@redhat.com>
-#
-# Author: Loic Dachary <loic@dachary.org>
-#
-#  This library is free software; you can redistribute it and/or
-#  modify it under the terms of the GNU Lesser General Public
-#  License as published by the Free Software Foundation; either
-#  version 2.1 of the License, or (at your option) any later version.
-#
-
-#
-# Return MAX(1, (number of processors / 2)) by default or NPROC
-#
-function get_processors() {
-    if test -n "$NPROC" ; then
-        echo $NPROC
-    else
-        if test $(nproc) -ge 2 ; then
-            expr $(nproc) / 2
-        else
-            echo 1
-        fi
-    fi
-}
-
-DEFAULT_MAKEOPTS=${DEFAULT_MAKEOPTS:--j$(get_processors)}
-BUILD_MAKEOPTS=${BUILD_MAKEOPTS:-$DEFAULT_MAKEOPTS}
-CHECK_MAKEOPTS=${CHECK_MAKEOPTS:-$DEFAULT_MAKEOPTS}
-
-function run() {
-    local install_cmd
-    if test -f /etc/redhat-release ; then
-        source /etc/os-release
-        if test "$(echo "$VERSION_ID >= 22" | bc)" -ne 0; then
-            install_cmd="dnf -y install"
-        else
-            install_cmd="yum install -y"
-        fi
-    fi
-
-    type apt-get > /dev/null 2>&1 && install_cmd="apt-get install -y"
-    type zypper > /dev/null 2>&1 && install_cmd="zypper --gpg-auto-import-keys --non-interactive install"
-    if [ -n "$install_cmd" ]; then
-        $DRY_RUN sudo $install_cmd ccache jq
-    else
-        echo "WARNING: Don't know how to install packages" >&2
-    fi
-
-    if test -f ./install-deps.sh ; then
-       $DRY_RUN ./install-deps.sh || return 1
-    fi
-    $DRY_RUN ./do_cmake.sh $@ || return 1
-    $DRY_RUN cd build
-    $DRY_RUN make $BUILD_MAKEOPTS tests || return 1
-    $DRY_RUN ctest $CHECK_MAKEOPTS --output-on-failure || return 1
-}
-
-function main() {
-    if run "$@" ; then
-        echo "cmake check: successful run on $(git rev-parse HEAD)"
-        return 0
-    else
-        return 1
-    fi
-}
-
-main "$@"
index f269f90741e47bdd22da3763441b854a74eac461..5bf634cdf8b9f6f1567a62476913be3c8675450b 100755 (executable)
 #  version 2.1 of the License, or (at your option) any later version.
 #
 
-#
-# Return true if the working tree is after the release that made
-# make -j8 check possible
-#
-function can_parallel_make_check() {
-    local commit=$(git rev-parse tags/v0.88^{})
-    git rev-list HEAD | grep --quiet $commit
-}
-
-function maybe_parallel_make_check() {
-    if can_parallel_make_check ; then
-        echo -j$(get_processors)
-    fi
-}
 #
 # Return MAX(1, (number of processors / 2)) by default or NPROC
 #
@@ -43,11 +29,7 @@ function get_processors() {
 
 DEFAULT_MAKEOPTS=${DEFAULT_MAKEOPTS:--j$(get_processors)}
 BUILD_MAKEOPTS=${BUILD_MAKEOPTS:-$DEFAULT_MAKEOPTS}
-if can_parallel_make_check ; then
-       CHECK_MAKEOPTS=${CHECK_MAKEOPTS:-$DEFAULT_MAKEOPTS}
-else
-       CHECK_MAKEOPTS=""
-fi
+CHECK_MAKEOPTS=${CHECK_MAKEOPTS:-$DEFAULT_MAKEOPTS}
 
 function run() {
     local install_cmd
@@ -71,27 +53,16 @@ function run() {
     if test -f ./install-deps.sh ; then
        $DRY_RUN ./install-deps.sh || return 1
     fi
-    export TMPDIR=$(mktemp -d --tmpdir ceph.XXX)
-    if test -x ./do_cmake.sh ; then
-        $DRY_RUN ./do_cmake.sh $@ || return 1
-        $DRY_RUN cd build
-        $DRY_RUN make $BUILD_MAKEOPTS tests || return 1
-        $DRY_RUN ctest $CHECK_MAKEOPTS --output-on-failure || return 1
-    else
-        $DRY_RUN ./autogen.sh || return 1
-        $DRY_RUN ./configure "$@"  --with-librocksdb-static --disable-static --with-radosgw --with-debug --without-lttng \
-            CC="ccache gcc" CXX="ccache g++" CFLAGS="-Wall -g" CXXFLAGS="-Wall -g" || return 1
-        $DRY_RUN make $BUILD_MAKEOPTS || return 1
-        $DRY_RUN make $CHECK_MAKEOPTS check || return 1
-        $DRY_RUN make dist || return 1
-    fi
-    rm -rf $TMPDIR
+    $DRY_RUN ./do_cmake.sh $@ || return 1
+    $DRY_RUN cd build
+    $DRY_RUN make $BUILD_MAKEOPTS tests || return 1
+    $DRY_RUN ctest $CHECK_MAKEOPTS --output-on-failure || return 1
 }
 
 function main() {
     if run "$@" ; then
-        echo "make check: successful run on $(git rev-parse HEAD)"
         rm -fr ${CEPH_BUILD_VIRTUALENV:-/tmp}/*virtualenv*
+        echo "cmake check: successful run on $(git rev-parse HEAD)"
         return 0
     else
         rm -fr ${CEPH_BUILD_VIRTUALENV:-/tmp}/*virtualenv*