Skip to content

Commit

Permalink
ceph-mixin: fix PATH issues with jsonnet-bundler
Browse files Browse the repository at this point in the history
In 4a3afcf, the $PATH is set for the test, but we cannot set multiple
properties with a single `set_property()` cmake command. We fix that by
adding the installation path of jsonnet-bundler
(CMAKE_CURRENT_BINARY_DIR) to the $PATH used for every tox test.

Signed-off-by: Arthur Outhenin-Chalandre <[email protected]>
Co-Authored-By: Kefu Chai <[email protected]>
  • Loading branch information
MrFreezeex and tchaikov committed Aug 18, 2022
1 parent 50f4580 commit d46e14c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cmake/modules/AddCephTest.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ function(add_tox_test name)
CEPH_LIB=${CMAKE_LIBRARY_OUTPUT_DIRECTORY}
CEPH_BUILD_VIRTUALENV=${CEPH_BUILD_VIRTUALENV}
LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/lib
PATH=${CMAKE_RUNTIME_OUTPUT_DIRECTORY}:${CMAKE_SOURCE_DIR}/src:$ENV{PATH}
PATH=${CMAKE_RUNTIME_OUTPUT_DIRECTORY}:${CMAKE_SOURCE_DIR}/src:${CMAKE_CURRENT_BINARY_DIR}:$ENV{PATH}
PYTHONPATH=${CMAKE_SOURCE_DIR}/src/pybind)
list(APPEND tox_test run-tox-${name})
endfunction()
3 changes: 1 addition & 2 deletions monitoring/ceph-mixin/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ if(WITH_GRAFANA)
FIXTURES_REQUIRED venv-for-jsonnet-lint)
add_tox_test(jsonnet-check TOX_ENVS jsonnet-check)
set_property(TEST run-tox-jsonnet-check PROPERTY
FIXTURES_REQUIRED venv-for-jsonnet-check jsonnet-bundler
ENVIRONMENT "PATH=${CMAKE_CURRENT_BINARY_DIR}:$ENV{PATH}")
FIXTURES_REQUIRED venv-for-jsonnet-check jsonnet-bundler)

add_tox_test(alerts-check TOX_ENVS alerts-check)
add_tox_test(alerts-lint TOX_ENVS alerts-lint)
Expand Down

0 comments on commit d46e14c

Please sign in to comment.