]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
cmake: set $PATH for tests using jsonnet tools 47625/head
authorKefu Chai <tchaikov@gmail.com>
Tue, 16 Aug 2022 02:52:53 +0000 (10:52 +0800)
committerKefu Chai <tchaikov@gmail.com>
Tue, 16 Aug 2022 09:00:10 +0000 (17:00 +0800)
otherwise they would not able to find executables installed into
${CMAKE_CURRENT_BINARY_DIR}.

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
(cherry picked from commit 4a3afcf27769a512fba7e0194d2e3b6a55e06bca)

monitoring/ceph-mixin/CMakeLists.txt

index 66e620f6c85e768a5c92cd25892b5aff05beb18c..ac1fdb13ea9e8893e102ee2bab4c05fcc5942da7 100644 (file)
@@ -34,10 +34,12 @@ if(WITH_GRAFANA)
       add_tox_test(grafana-lint TOX_ENVS lint)
       add_tox_test(jsonnet-lint TOX_ENVS jsonnet-lint)
       set_property(TEST run-tox-jsonnet-lint PROPERTY
-          FIXTURES_REQUIRED venv-for-jsonnet-lint jsonnet)
+          FIXTURES_REQUIRED venv-for-jsonnet-lint jsonnet
+          ENVIRONMENT "PATH=${CMAKE_CURRENT_BINARY_DIR}:$ENV{PATH}")
       add_tox_test(jsonnet-check TOX_ENVS jsonnet-check)
       set_property(TEST run-tox-jsonnet-check PROPERTY
-          FIXTURES_REQUIRED venv-for-jsonnet-check jsonnet jsonnet-bundler)
+          FIXTURES_REQUIRED venv-for-jsonnet-check jsonnet jsonnet-bundler
+          ENVIRONMENT "PATH=${CMAKE_CURRENT_BINARY_DIR}:$ENV{PATH}")
 
       add_tox_test(alerts-check TOX_ENVS alerts-check)
       add_tox_test(alerts-lint TOX_ENVS alerts-lint)