]> Git Repo - qemu.git/blob - scripts/ci/coverage-summary.sh
net: Pad short frames to minimum size before sending from SLiRP/TAP
[qemu.git] / scripts / ci / coverage-summary.sh
1 #!/bin/sh
2 #
3 # Author: Alex BennĂ©e <[email protected]>
4 #
5 # Summerise the state of code coverage with gcovr and tweak the output
6 # to be more sane on CI runner. As we expect to be executed on a
7 # throw away CI instance we do spam temp files all over the shop. You
8 # most likely don't want to execute this script but just call gcovr
9 # directly. See also "make coverage-report"
10 #
11 # This code is licensed under the GPL version 2 or later.  See
12 # the COPYING file in the top-level directory.
13
14 # first generate the coverage report
15 gcovr -p -o raw-report.txt
16
17 # strip the full-path and line markers
18 sed s@$PWD\/@@ raw-report.txt | sed s/[0-9]\*[,-]//g > simplified.txt
19
20 # reflow lines that got split
21 awk '/.[ch]$/ { printf("%s", $0); next } 1' simplified.txt > rejoined.txt
22
23 # columnify
24 column -t rejoined.txt > final.txt
25
26 # and dump, stripping out 0% coverage
27 grep -v "0%" final.txt
This page took 0.028633 seconds and 4 git commands to generate.