]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph-mixin: fix PATH issues with jsonnet-bundler
authorArthur Outhenin-Chalandre <arthur.outhenin-chalandre@cern.ch>
Thu, 18 Aug 2022 11:37:31 +0000 (13:37 +0200)
committerArthur Outhenin-Chalandre <arthur.outhenin-chalandre@cern.ch>
Tue, 30 Aug 2022 11:03:35 +0000 (13:03 +0200)
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 <arthur.outhenin-chalandre@cern.ch>
Co-Authored-By: Kefu Chai <tchaikov@gmail.com>
(cherry picked from commit d46e14c71bffda1381dac7da244ab8347d035769)

cmake/modules/AddCephTest.cmake
monitoring/ceph-mixin/CMakeLists.txt

index 46d3a1b4cb813fbfe7042aa2ac12e2a3afdf070a..2784567c68711c943d65811a78fbfa2fc7925c3f 100644 (file)
@@ -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()
index 411cfb970d0d1b80c06c966d61ec9b0fce3ef6e1..e63c740b7a57510da4d62c11ca1973f48ea6ae57 100644 (file)
@@ -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)