cmake: set $PATH for tests using jsonnet tools

otherwise they would not able to find executables installed into
${CMAKE_CURRENT_BINARY_DIR}.

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
This commit is contained in:
Kefu Chai 2022-08-16 10:52:53 +08:00
parent ee8ccbfc9e
commit 4a3afcf277

View 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)