• Home
  • Raw
  • Download

Lines Matching +full:- +full:- +full:coverage

5 Usage: $0 [-r]
6 Collect coverage statistics of library code into an HTML report.
9 1. Build the library with CFLAGS="--coverage -O0 -g3" and link the test
10 programs with LDFLAGS="--coverage".
11 This can be an out-of-tree build.
12 For example (in-tree):
13 make CFLAGS="--coverage -O0 -g3" LDFLAGS="--coverage"
14 Or (out-of-tree):
15 mkdir build-coverage && cd build-coverage &&
16 cmake -D CMAKE_BUILD_TYPE=Coverage .. && make
19 object files and coverage statistics files.
20 4. Browse the coverage report in Coverage/index.html.
21 5. After rework, run "$0 -r", then re-test and run "$0" to get a fresh report.
24 -r Reset traces. Run this before re-testing to get fresh measurements.
29 # SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
31 set -eu
35 test -d library
40 rm -rf Coverage
41 mkdir Coverage Coverage/tmp
46 # https://github.com/linux-test-project/lcov/commit/632c25a0d1f5e4d2f4fd5b28ce7c8b86d388c91f
47 COVTMP=$PWD/Coverage/tmp
48 lcov --capture --initial --directory $library_dir -o "$COVTMP/files.info"
49 lcov --rc lcov_branch_coverage=1 --capture --directory $library_dir -o "$COVTMP/tests.info"
50 …lcov --rc lcov_branch_coverage=1 --add-tracefile "$COVTMP/files.info" --add-tracefile "$COVTMP/tes…
51 lcov --rc lcov_branch_coverage=1 --remove "$COVTMP/all.info" -o "$COVTMP/final.info" '*.h'
52 gendesc tests/Descriptions.txt -o "$COVTMP/descriptions"
53 …genhtml --title "$title" --description-file "$COVTMP/descriptions" --keep-descriptions --legend --
54 rm -f "$COVTMP/"*.info "$COVTMP/descriptions"
55 echo "Coverage report in: Coverage/index.html"
61 rm -f $library_dir/*.gcda
63 rm -f $library_dir/CMakeFiles/*.dir/*.gcda
66 if [ $# -gt 0 ] && [ "$1" = "--help" ]; then
76 title='TF-PSA-Crypto'
86 shift $((OPTIND - 1))