From cee01227806e0577b6afa8265f0e0a2e5a681120 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Thu, 2 Aug 2018 10:34:07 +0800 Subject: [PATCH 1/2] cmake,run-make-check: always enable WITH_GTEST_PARALLEL now that https://github.com/google/gtest-parallel/pull/63 has been merged, we can now use gtest-parallel with py2 and also py3. Signed-off-by: Kefu Chai --- cmake/modules/AddCephTest.cmake | 2 +- run-make-check.sh | 11 +++-------- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/cmake/modules/AddCephTest.cmake b/cmake/modules/AddCephTest.cmake index c48155b3bb7..a4ed7fbd88a 100644 --- a/cmake/modules/AddCephTest.cmake +++ b/cmake/modules/AddCephTest.cmake @@ -35,7 +35,7 @@ if(WITH_GTEST_PARALLEL) BUILD_COMMAND "" INSTALL_COMMAND "") add_dependencies(tests gtest-parallel_ext) - find_package(PythonInterp 2.7 REQUIRED) + find_package(PythonInterp REQUIRED) set(GTEST_PARALLEL_COMMAND ${PYTHON_EXECUTABLE} ${gtest_parallel_source_dir}/gtest-parallel) endif() diff --git a/run-make-check.sh b/run-make-check.sh index 6a6ea2e63e7..e7571f26010 100755 --- a/run-make-check.sh +++ b/run-make-check.sh @@ -99,15 +99,10 @@ 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" + if ! type python2 > /dev/null 2>&1 ; then + CMAKE_PYTHON_OPTS="-DWITH_PYTHON2=OFF -DWITH_PYTHON3=ON -DMGR_PYTHON_VERSION=3" fi - - CMAKE_BUILD_OPTS="-DWITH_FIO=ON -DWITH_SEASTAR=ON" + CMAKE_BUILD_OPTS="-DWITH_GTEST_PARALLEL=ON -DWITH_FIO=ON -DWITH_SEASTAR=ON" cat < Date: Thu, 2 Aug 2018 17:19:10 +0800 Subject: [PATCH 2/2] run-make-check: drop CMAKE_PYTHON_OPTS variable Signed-off-by: Kefu Chai --- run-make-check.sh | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/run-make-check.sh b/run-make-check.sh index e7571f26010..bca8d78c335 100755 --- a/run-make-check.sh +++ b/run-make-check.sh @@ -99,11 +99,10 @@ 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 - CMAKE_PYTHON_OPTS="-DWITH_PYTHON2=OFF -DWITH_PYTHON3=ON -DMGR_PYTHON_VERSION=3" - fi CMAKE_BUILD_OPTS="-DWITH_GTEST_PARALLEL=ON -DWITH_FIO=ON -DWITH_SEASTAR=ON" - + if ! type python2 > /dev/null 2>&1 ; then + CMAKE_BUILD_OPTS+=" -DWITH_PYTHON2=OFF -DWITH_PYTHON3=ON -DMGR_PYTHON_VERSION=3" + fi cat <