Skip to content

Commit

Permalink
fixup! Fix not found issue caused by abuse of Python3_EXECUTABLE vari…
Browse files Browse the repository at this point in the history
…able
  • Loading branch information
xis19 committed Apr 29, 2024
1 parent 6159dc9 commit 2091f8d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion cmake/AddFdbTest.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -569,7 +569,8 @@ string(APPEND test_venv_cmd "${Python3_EXECUTABLE} -m venv ${test_venv_dir} ")
string(APPEND test_venv_cmd "&& ${test_venv_activate} ")
string(APPEND test_venv_cmd "&& pip install --upgrade pip ")
string(APPEND test_venv_cmd "&& pip install -r ${CMAKE_SOURCE_DIR}/tests/TestRunner/requirements.txt")
string(APPEND test_venv_cmd "&& (cd ${CMAKE_BINARY_DIR}/bindings/python && ${Python3_EXECUTABLE} -m pip install .) ")
# NOTE: At this stage we are in the virtual environment and Python3_EXECUTABLE is not available anymore
string(APPEND test_venv_cmd "&& (cd ${CMAKE_BINARY_DIR}/bindings/python && python3 -m pip install .) ")
add_test(
NAME test_venv_setup
COMMAND bash -c ${test_venv_cmd}
Expand Down
3 changes: 2 additions & 1 deletion tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -562,7 +562,8 @@ if(WITH_PYTHON)
string(APPEND authz_venv_cmd "&& ${authz_venv_activate} ")
string(APPEND authz_venv_cmd "&& pip install --upgrade pip ")
string(APPEND authz_venv_cmd "&& pip install -r ${CMAKE_SOURCE_DIR}/tests/authorization/requirements.txt ")
string(APPEND authz_venv_cmd "&& (cd ${CMAKE_BINARY_DIR}/bindings/python && {Python3_EXECUTABLE} -m pip install .) ")
# NOTE: Here we are already in the venv so Python3_EXECUTABLE is not available anymore
string(APPEND authz_venv_cmd "&& (cd ${CMAKE_BINARY_DIR}/bindings/python && python3 -m pip install .) ")
string(APPEND authz_venv_cmd "&& touch ${authz_venv_stamp_file} ")
string(APPEND authz_venv_cmd "|| echo 'venv already set up'")
add_test(
Expand Down

0 comments on commit 2091f8d

Please sign in to comment.