also report coverage for header files

Tue, 08 Oct 2024 19:52:09 +0200

author
Mike Becker <universe@uap-core.de>
date
Tue, 08 Oct 2024 19:52:09 +0200
changeset 922
eabfbe9e2952
parent 921
5a7aa9cf9c3a
child 923
45da884269c8

also report coverage for header files

src/Makefile file | annotate | diff | comparison | revisions
--- a/src/Makefile	Tue Oct 08 18:47:45 2024 +0200
+++ b/src/Makefile	Tue Oct 08 19:52:09 2024 +0200
@@ -39,7 +39,11 @@
 	mv *.gcov "$(build_dir)"
 
 %.c.gcov: %.c $(build_dir)/%.gcno
-	@printf '%16s - %s\n' "$<" "`gcov -Ho "$(build_dir)" $< | grep --max-count=1 -i 'lines executed'`"
+	@tabs 22
+	@gcov -Ho "$(build_dir)" $< | grep -A1 'File' | grep -v '\--' \
+		| sed 's/File /  /' | sed 's/Lines executed:/\t/' | tr -d '\n'"'" \
+		| sed -E 's/(of [0-9]+)/\1\n/g'
+	@tabs -8
 
 $(build_dir)/%.gcno:
 	test -f "$@"

mercurial