Skip to content

Commit

Permalink
cmake,run-make-check: always enable WITH_GTEST_PARALLEL
Browse files Browse the repository at this point in the history
now that google/gtest-parallel#63 has been
merged, we can now use gtest-parallel with py2 and also py3.

Signed-off-by: Kefu Chai <[email protected]>
  • Loading branch information
tchaikov committed Aug 2, 2018
1 parent 0912cae commit cee0122
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
2 changes: 1 addition & 1 deletion cmake/modules/AddCephTest.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
11 changes: 3 additions & 8 deletions run-make-check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 <<EOM
Note that the binaries produced by this script do not contain correct time
Expand Down

0 comments on commit cee0122

Please sign in to comment.