aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorImre Kis <imre.kis@arm.com>2022-04-20 17:52:35 +0200
committerImre Kis <imre.kis@arm.com>2022-04-21 15:48:39 +0200
commit0e65dd6f1ca1e60660ca3fc328683666a3f4044d (patch)
tree572f4b450b687bb2e3263d0c7c8f05a5479e77c8
parent12d171d7257ef2ab6157150a06688b640a8ac547 (diff)
downloadtrusted-services-topics/fwtb.tar.gz
Enable branch coverage measurementtopics/fwtb
Enable branch coverage when invoking lcov and genhtml. Signed-off-by: Imre Kis <imre.kis@arm.com> Change-Id: I9ff9fcb123f8719715d192e3a11a8bbfccdc3965
-rw-r--r--cmake/Coverage.cmake5
1 files changed, 4 insertions, 1 deletions
diff --git a/cmake/Coverage.cmake b/cmake/Coverage.cmake
index b7a64393..a66649c8 100644
--- a/cmake/Coverage.cmake
+++ b/cmake/Coverage.cmake
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2020-2021, Arm Limited. All rights reserved.
+# Copyright (c) 2020-2022, Arm Limited. All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
#
@@ -171,6 +171,7 @@ function(coverage_generate)
--directory ${BINARY_DIR}
--base-directory ${SOURCE_DIR}
--output-file ${TEMP_FILE}
+ --rc lcov_branch_coverage=1
COMMAND ${CPICKER_COVERAGE_MAPPER_COMMAND}
--input ${TEMP_FILE}
--output ${OUTPUT_FILE}
@@ -229,6 +230,7 @@ function(coverage_filter)
COMMAND ${LCOV_COMMAND}
--extract ${INPUT_FILE} \"${INCLUDE_DIRECTORY_ABSPATH}\"
--output-file ${OUTPUT_FILE}
+ --rc lcov_branch_coverage=1
DEPENDS ${INPUT_FILE}
)
@@ -275,6 +277,7 @@ function(coverage_generate_report)
OUTPUT ${OUTPUT_DIRECTORY}
COMMAND genhtml ${INPUT_FILE}
--show-details
+ --branch-coverage
--output-directory ${OUTPUT_DIRECTORY}
DEPENDS ${INPUT_FILE}
)