mirror of
https://github.com/ceph/ceph
synced 2024-12-28 06:23:08 +00:00
5fc657b40d
* drop WITH_PYTHON2 option * print warning message if WITH_PYTHON3 is disabled * drop MGR_PYTHON_VERSION option, as we don't support use different python version for python binding and ceph-mgr embedded python interpreter anymore. as before switching to python3-only build, we can build python3 and python2 python bindings, and ceph-mgr can use either of them. but after switching to python3-only build, ceph-mgr has to use whatever python version used to build python binding. * move WITH_PYTHON3 option to $top_srcdir/CMakeLists.txt, as ceph-mgr and python binding will share this option. * hardware ${PYTHON_VERSION} to 3 * hardware ${Python${PYTHON_VERSION}_VERSION_MAJOR} to 3 * only build boost library with python3 * s/Python_EXECUTABLE/Python3_EXECUTABLE/ * update the build scripts and packagings accordingly * rename all cython${PYTHON_VERSION}_* targets to cython_* * update distutils_install_module() so it does not take python_version parameter anymore. Signed-off-by: Kefu Chai <kchai@redhat.com>
63 lines
1.9 KiB
Bash
Executable File
63 lines
1.9 KiB
Bash
Executable File
#!/usr/bin/env 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.
|
|
#
|
|
|
|
#
|
|
# To just look at what this script will do, run it like this:
|
|
#
|
|
# $ DRY_RUN=echo ./run-make-check.sh
|
|
#
|
|
|
|
source src/script/run-make.sh
|
|
|
|
function run() {
|
|
# to prevent OSD EMFILE death on tests, make sure ulimit >= 1024
|
|
$DRY_RUN ulimit -n $(ulimit -Hn)
|
|
if [ $(ulimit -n) -lt 1024 ];then
|
|
echo "***ulimit -n too small, better bigger than 1024 for test***"
|
|
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 /sbin/sysctl -q -w fs.aio-max-nr=$((65536 * 16))
|
|
|
|
CHECK_MAKEOPTS=${CHECK_MAKEOPTS:-$DEFAULT_MAKEOPTS}
|
|
if ! $DRY_RUN ctest $CHECK_MAKEOPTS --output-on-failure; then
|
|
rm -fr ${TMPDIR:-/tmp}/ceph-asok.*
|
|
return 1
|
|
fi
|
|
}
|
|
|
|
function main() {
|
|
if [[ $EUID -eq 0 ]] ; then
|
|
echo "For best results, run this script as a normal user configured"
|
|
echo "with the ability to run commands as root via sudo."
|
|
fi
|
|
echo -n "Checking hostname sanity... "
|
|
if $DRY_RUN hostname --fqdn >/dev/null 2>&1 ; then
|
|
echo "OK"
|
|
else
|
|
echo "NOT OK"
|
|
echo "Please fix 'hostname --fqdn', otherwise 'make check' will fail"
|
|
return 1
|
|
fi
|
|
FOR_MAKE_CHECK=1 prepare
|
|
# Init defaults after deps are installed.
|
|
configure " -DWITH_PYTHON3=3 -DWITH_GTEST_PARALLEL=ON -DWITH_FIO=ON -DWITH_SEASTAR=ON -DWITH_CEPHFS_SHELL=ON -DWITH_SPDK=ON -DENABLE_GIT_VERSION=OFF $@"
|
|
build tests && echo "make check: successful run on $(git rev-parse HEAD)"
|
|
run
|
|
}
|
|
|
|
main "$@"
|