summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobert Griebl <robert.griebl@qt.io>2024-02-28 14:04:38 +0100
committerRobert Griebl <robert.griebl@qt.io>2024-02-28 14:53:37 +0100
commit04011fe78554717c81698cafc5fd96a994b793e3 (patch)
tree41e02f2ff255252225727db0561cf8c2d6b5659b
parent1a4ef7f43f04bdc7e1389c14e27d6f1eb2acf5b3 (diff)
coverage: make sure lcov version 2 is available
Change-Id: I0864195736780d0bd91966b366a635235b83b12f Pick-to: 6.7 6.6 6.5 Reviewed-by: Dominik Holland <dominik.holland@qt.io>
-rw-r--r--CMakeLists.txt1
1 files changed, 1 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e1dca564..c69198db 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -99,6 +99,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 --repeat until-pass:3