diff options
author | Luke T. Shumaker <lukeshu@lukeshu.com> | 2025-05-27 19:47:25 -0400 |
---|---|---|
committer | Luke T. Shumaker <lukeshu@lukeshu.com> | 2025-05-27 19:47:25 -0400 |
commit | bf3667b8b76eefd95e33e32b4f5abbf2de0e2065 (patch) | |
tree | 241b909f0d68f3c0f355ad924375c2fa5b9a19ae /GNUmakefile | |
parent | 42fb27570262b52e2ca889030c621b5f4af76fe1 (diff) | |
parent | 968f7710458f44d5e62d2624461f4e8459c04168 (diff) |
Merge branch 'lukeshu/cover'
Diffstat (limited to 'GNUmakefile')
-rw-r--r-- | GNUmakefile | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/GNUmakefile b/GNUmakefile index 9836b33..146f725 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -101,8 +101,16 @@ check: $(MAKE) -k INNER=t $(foreach t,$(build_types),$(foreach p,$(platforms),build/$p-$t/check)) .PHONY: check +# `gcc` writes .gcno +# Running the program writes .gcda (updates existing files, concurrent-safe) +# GCC `gcov` post-processes .gcno+.gcda to .gcov +# `gcovr` is a Python script that calls `gcov` and merges and post-processes the .gcov files to other formats +gcovr_flags = --txt=$(@D)/coverage.txt +gcovr_flags += --html=$(@D)/coverage.html --html-details --html-single-page=js-enabled $(foreach t,$(build_types),$(foreach p,$(platforms),build/$p-$t/check)): build/%/check: build/%/build + ./build-aux/gcov-prune $(@D) +cd $(@D) && ctest --output-on-failure $(if $(filter --jobserver-auth=%,$(MAKEFLAGS)),--parallel) + gcovr $(gcovr_flags) -- $(@D) .PHONY: $(foreach t,$(build_types),$(foreach p,$(platforms),build/$p-$t/check)) # `lint` and `format` ########################################################## |