summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobert Griebl <robert.griebl@qt.io>2024-02-28 14:04:38 +0100
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2024-02-28 16:29:39 +0000
commitcbc0eda4a88cca78a4d2661f4e3dd962ebde5352 (patch)
treec6193977559e7223f7d6e503b2b85309068c2a19
parentdf5cc3ba9b195980428679ec7bdbac99d39e5e86 (diff)
coverage: make sure lcov version 2 is available
Change-Id: I0864195736780d0bd91966b366a635235b83b12f Pick-to: 6.6 6.5 Reviewed-by: Dominik Holland <dominik.holland@qt.io> (cherry picked from commit 04011fe78554717c81698cafc5fd96a994b793e3) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--CMakeLists.txt1
1 files changed, 1 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c2c90733..5a4c4c8f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -98,6 +98,7 @@ if(AM_COVERAGE)
add_custom_target(check_coverage
COMMAND sh -c 'which lcov >/dev/null || { echo "The lcov tool is not available." && exit 2 \; }'
COMMAND sh -c 'which genhtml >/dev/null || { echo "The genhtml tool is not available." && exit 2 \; }'
+ COMMAND sh -c 'lcov --version | grep -q "^lcov: LCOV version 2\." || { echo "The lcov tool must be version 2." && exit 2 \; }'
COMMAND find . \\\( -name \"*.gcov-info\" -o -name \"*.gcda\" \\\) -print0 | xargs -0 rm -f
COMMAND lcov -keep-going -c -i -d . ${LCOV_EXTRA_ARGS} --rc branch_coverage=1 --rc geninfo_auto_base=1 -o "${CMAKE_CURRENT_BINARY_DIR}/base.gcov-info"
COMMAND ctest --test-dir tests/auto --verbose