mirror of
https://github.com/ceph/ceph
synced 2025-03-30 07:19:14 +00:00
test/venv: Fix the python version of the test environment
Otherwise it will result in: [ 59%] preparing venv for mgr-dashboard New python executable in /home/jenkins/workspace/ceph-master/build/mgr-dashboard-virtualenv/bin/python2.7 Also creating executable in /home/jenkins/workspace/ceph-master/build/mgr-dashboard-virtualenv/bin/python Installing setuptools, pip, wheel...done. Running virtualenv with interpreter /usr/local/bin/python2.7 Even though the Cmake options contained: '-DWITH_PYTHON2=OFF' '-DWITH_PYTHON3=3' '-DMGR_PYTHON_VERSION=3' Mostly due to the fact that src/tools/setup-virtualenv.sh default to: PYTHON_BINARY="python2.7" Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
This commit is contained in:
parent
d373178c43
commit
c70e7af4a6
@ -72,9 +72,10 @@ function(add_tox_test name)
|
||||
list(APPEND tox_envs ${TOXTEST_TOX_ENVS})
|
||||
endif()
|
||||
string(REPLACE ";" "," tox_envs "${tox_envs}")
|
||||
find_package(Python REQUIRED)
|
||||
add_custom_command(
|
||||
OUTPUT ${venv_path}/bin/activate
|
||||
COMMAND ${CMAKE_SOURCE_DIR}/src/tools/setup-virtualenv.sh ${venv_path}
|
||||
COMMAND ${CMAKE_SOURCE_DIR}/src/tools/setup-virtualenv.sh --python="${Python_EXECUTABLE}" ${venv_path}
|
||||
WORKING_DIRECTORY ${tox_path}
|
||||
COMMENT "preparing venv for ${name}")
|
||||
add_custom_target(${name}-venv
|
||||
|
Loading…
Reference in New Issue
Block a user