Skip to content

Commit

Permalink
Merge pull request #41725 from tchaikov/wip-cmake-prom-warning
Browse files Browse the repository at this point in the history
cmake: do not print warning in each cmake run

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
  • Loading branch information
tchaikov committed Jun 7, 2021
2 parents 106c3b8 + e1a081a commit fac4e1a
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -606,6 +606,10 @@ add_ceph_test(run-cli-tests ${CMAKE_CURRENT_SOURCE_DIR}/run-cli-tests)

add_ceph_test(smoke.sh ${CMAKE_CURRENT_SOURCE_DIR}/smoke.sh)

if(DEFINED PROMTOOL_EXECUTABLE)
set(promtool_executable_checked TRUE)
endif()

find_program(PROMTOOL_EXECUTABLE promtool)
if(PROMTOOL_EXECUTABLE)
execute_process(
Expand All @@ -615,11 +619,11 @@ if(PROMTOOL_EXECUTABLE)
if(NOT rc)
add_ceph_test(run-promtool-unittests
${PROMTOOL_EXECUTABLE} test rules ${CMAKE_SOURCE_DIR}/monitoring/prometheus/alerts/test_alerts.yml)
else()
elseif(NOT promtool_executable_checked)
message(WARNING "'${PROMTOOL_EXECUTABLE} test rules' does not work, "
"please use a newer prometheus")
endif()
else()
elseif(NOT promtool_executable_checked)
message(WARNING "run-promtool-unittests is skipped due to missing promtool")
endif()

Expand Down

0 comments on commit fac4e1a

Please sign in to comment.