3 # Ceph distributed storage system
5 # Copyright (C) 2014 Red Hat <contact@redhat.com>
7 # Author: Loic Dachary <loic@dachary.org>
9 # This library is free software; you can redistribute it and/or
10 # modify it under the terms of the GNU Lesser General Public
11 # License as published by the Free Software Foundation; either
12 # version 2.1 of the License, or (at your option) any later version.
16 # To just look at what this script will do, run it like this:
18 # $ DRY_RUN=echo ./run-make-check.sh
21 source src/script/run-make.sh
24 # to prevent OSD EMFILE death on tests, make sure ulimit >= 1024
25 $DRY_RUN ulimit -n $(ulimit -Hn)
26 if [ $(ulimit -n) -lt 1024 ];then
27 echo "***ulimit -n too small, better bigger than 1024 for test***"
31 # increase the aio-max-nr, which is by default 65536. we could reach this
32 # limit while running seastar tests and bluestore tests.
33 $DRY_RUN sudo /sbin/sysctl -q -w fs.aio-max-nr=$((65536 * 16))
35 CHECK_MAKEOPTS=${CHECK_MAKEOPTS:-$DEFAULT_MAKEOPTS}
36 if ! $DRY_RUN ctest $CHECK_MAKEOPTS --output-on-failure; then
37 rm -fr ${TMPDIR:-/tmp}/ceph-asok.*
43 if [[ $EUID -eq 0 ]] ; then
44 echo "For best results, run this script as a normal user configured"
45 echo "with the ability to run commands as root via sudo."
47 echo -n "Checking hostname sanity... "
48 if $DRY_RUN hostname --fqdn >/dev/null 2>&1 ; then
52 echo "Please fix 'hostname --fqdn', otherwise 'make check' will fail"
55 FOR_MAKE_CHECK=1 prepare
56 # Init defaults after deps are installed.
57 local cmake_opts=" -DWITH_PYTHON3=3 -DWITH_GTEST_PARALLEL=ON -DWITH_FIO=ON -DWITH_CEPHFS_SHELL=ON -DWITH_SPDK=ON -DENABLE_GIT_VERSION=OFF"
58 if [ $WITH_SEASTAR ]; then
59 cmake_opts+=" -DWITH_SEASTAR=ON"
61 configure $cmake_opts $@
62 build tests && echo "make check: successful build on $(git rev-parse HEAD)"