Lines Matching +full:- +full:- +full:coverage
3 # SPDX-License-Identifier: Apache-2.0
5 set -eu
9 _generate_coverage_report.sh [-help]
10 Generate an html coverage report for BabbleSim tests
15 Coverage files will be searched for in the folder pointed by
22 By default it takes all coverage information generated by all run tests
25 You can also merge in the twister coverage report by setting
27 TWISTER_COVERAGE_FILE=\${ZEPHYR_BASE}/twister-out/coverage.info
29 twister -p nrf52_bsim -T tests/bluetooth/ --coverage
31 Note: Generating a coverage report for many tests is a lengthy process
36 if [ $# -ge 1 ]; then
37 if grep -Eiq "(\?|-\?|-h|help|-help|--help)" <<< $1 ; then
43 WORK_DIR="${WORK_DIR:-${ZEPHYR_BASE}/bsim_out}"
44 OUTPUT_DIR="${OUTPUT_DIR:-${WORK_DIR}}"
45 TWISTER_COVERAGE_FILE="${TWISTER_COVERAGE_FILE:-""}"
47 lcov --capture --directory ${WORK_DIR} --output-file ${OUTPUT_DIR}/coverage.pre.info \
48 -q --rc lcov_branch_coverage=1
49 lcov --remove ${OUTPUT_DIR}/coverage.pre.info *generated* \
50 --output-file ${OUTPUT_DIR}/coverage.info -q --rc lcov_branch_coverage=1
51 genhtml ${OUTPUT_DIR}/coverage.info ${TWISTER_COVERAGE_FILE} --output-directory \
52 ${OUTPUT_DIR}/lcov_html -q --ignore-errors source --branch-coverage --highlight --legend
54 echo -e "\033[0;32mGenerated: ${OUTPUT_DIR}/lcov_html/index.html\033[0m"