]> git.proxmox.com Git - ceph.git/blobdiff - ceph/run-make-check.sh
update sources to ceph Nautilus 14.2.1
[ceph.git] / ceph / run-make-check.sh
index 2244e5ea5b0aac5b8c0c0e253e5e83182d0b5297..eb9232c87f5091551df905443bf42042d5ada46a 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 #
 # Ceph distributed storage system
 #
@@ -50,6 +50,17 @@ function get_processors() {
     fi
 }
 
+function detect_ceph_dev_pkgs() {
+    local cmake_opts
+    local boost_root=/opt/ceph
+    if test -f $boost_root/include/boost/config.hpp; then
+        cmake_opts+=" -DWITH_SYSTEM_BOOST=ON -DBOOST_ROOT=$boost_root"
+    else
+        cmake_opts+=" -DBOOST_J=$(get_processors)"
+    fi
+    echo "$cmake_opts"
+}
+
 function run() {
     local install_cmd
     local which_pkg="which"
@@ -89,7 +100,9 @@ function run() {
     fi
 
     if test -f ./install-deps.sh ; then
-       $DRY_RUN ./install-deps.sh || return 1
+           export WITH_SEASTAR=1
+           export FOR_MAKE_CHECK=1
+           $DRY_RUN source ./install-deps.sh || return 1
         trap clean_up_after_myself EXIT
     fi
 
@@ -98,16 +111,8 @@ function run() {
     BUILD_MAKEOPTS=${BUILD_MAKEOPTS:-$DEFAULT_MAKEOPTS}
     test "$BUILD_MAKEOPTS" && echo "make will run with option(s) $BUILD_MAKEOPTS"
     CHECK_MAKEOPTS=${CHECK_MAKEOPTS:-$DEFAULT_MAKEOPTS}
-
-    if type python2 > /dev/null 2>&1 ; then
-        # gtest-parallel requires Python 2
-        CMAKE_PYTHON_OPTS="-DWITH_GTEST_PARALLEL=ON"
-    else
-        CMAKE_PYTHON_OPTS="-DWITH_PYTHON2=OFF -DWITH_PYTHON3=ON -DMGR_PYTHON_VERSION=3 -DWITH_GTEST_PARALLEL=OFF"
-    fi
-
-    CMAKE_BUILD_OPTS=""
-
+    CMAKE_BUILD_OPTS="-DWITH_GTEST_PARALLEL=ON -DWITH_FIO=ON -DWITH_SEASTAR=ON"
+    CMAKE_BUILD_OPTS+=$(detect_ceph_dev_pkgs)
     cat <<EOM
 Note that the binaries produced by this script do not contain correct time
 and git version information, which may make them unsuitable for debugging
@@ -115,7 +120,7 @@ and production use.
 EOM
     save_ccache_conf
     # remove the entropy generated by the date/time embedded in the build
-    CMAKE_BUILD_OPTS="$CMAKE_BUILD_OPTS -DENABLE_GIT_VERSION=OFF"
+    CMAKE_BUILD_OPTS+=" -DENABLE_GIT_VERSION=OFF"
     $DRY_RUN export SOURCE_DATE_EPOCH="946684800"
     $DRY_RUN ccache -o sloppiness=time_macros
     $DRY_RUN ccache -o run_second_cpp=true
@@ -128,9 +133,9 @@ EOM
         echo "Current ccache max_size setting:"
         ccache -p | grep max_size
     fi
-    $DRY_RUN ccache -z # Reset the ccache statistics
+    $DRY_RUN ccache -sz # Reset the ccache statistics and show the current configuration
 
-    $DRY_RUN ./do_cmake.sh $CMAKE_BUILD_OPTS $CMAKE_PYTHON_OPTS $@ || return 1
+    $DRY_RUN ./do_cmake.sh $CMAKE_BUILD_OPTS $@ || return 1
     $DRY_RUN cd build
     $DRY_RUN make $BUILD_MAKEOPTS tests || return 1
 
@@ -143,8 +148,12 @@ EOM
         return 1
     fi
 
+    # increase the aio-max-nr, which is by default 65536. we could reach this
+    # limit while running seastar tests and bluestore tests.
+    $DRY_RUN sudo sysctl -q -w fs.aio-max-nr=$((65536 * 16))
+
     if ! $DRY_RUN ctest $CHECK_MAKEOPTS --output-on-failure; then
-        rm -f ${TMPDIR:-/tmp}/ceph-asok.*
+        rm -fr ${TMPDIR:-/tmp}/ceph-asok.*
         return 1
     fi
 }