From 47cbc929870aaff6b01ba24cd028b8787a1ae9a4 Mon Sep 17 00:00:00 2001 From: Cole Robinson Date: Wed, 13 Mar 2019 13:03:15 -0400 Subject: [PATCH] docs: hacking: Add 'Code coverage reports' section Reviewed-by: Martin Kletzander Signed-off-by: Cole Robinson --- docs/hacking.html.in | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/docs/hacking.html.in b/docs/hacking.html.in index f99d143b7b..902d05430f 100644 --- a/docs/hacking.html.in +++ b/docs/hacking.html.in @@ -1412,5 +1412,34 @@ int foo() in the same way, but still make sure they get reviewed if non-trivial. +

Code coverage reports

+ +

+ Code coverage HTML reports can be generated with: +

+ +
+  make coverage
+
+ +

+ Reports will be generated in the cov/ directory. Point a + web browser at cov/index.html for the full report. +

+ +

+ The make coverage target is provided by gnulib. + It is a convenience helper for calling the following 3 targets in order. + It may be useful to occasionally call these directly. + +

    +
  • make init-coverage: run make clean and + remove all code coverage counter files (*.gcno, etc.)
  • +
  • make build-coverage: run make and + make check with CFLAGS filled in with + necessary coverage flags
  • +
  • make gen-coverage: generate the HTML report
  • +
+

-- GitLab