hw/vfio/ap: Plug memleak in vfio_ap_get_group()
[qemu/ar7.git] / scripts / travis / coverage-summary.sh
blobd7086cf9ca6c24d1bfe86235f570eedf27ea36bc
1 #!/bin/sh
3 # Author: Alex Bennée <alex.bennee@linaro.org>
5 # Summerise the state of code coverage with gcovr and tweak the output
6 # to be more sane on Travis hosts. 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"
11 # This code is licensed under the GPL version 2 or later. See
12 # the COPYING file in the top-level directory.
14 # first generate the coverage report
15 gcovr -p -o raw-report.txt
17 # strip the full-path and line markers
18 sed s@$PWD\/@@ raw-report.txt | sed s/[0-9]\*[,-]//g > simplified.txt
20 # reflow lines that got split
21 awk '/.[ch]$/ { printf("%s", $0); next } 1' simplified.txt > rejoined.txt
23 # columnify
24 column -t rejoined.txt > final.txt
26 # and dump, stripping out 0% coverage
27 grep -v "0%" final.txt