From: Cole Robinson Date: Wed, 13 Mar 2019 17:03:15 +0000 (-0400) Subject: docs: hacking: Add 'Code coverage reports' section X-Git-Tag: v5.2.0-rc1~186 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=47cbc929870aaff6b01ba24cd028b8787a1ae9a4;p=thirdparty%2Flibvirt.git docs: hacking: Add 'Code coverage reports' section Reviewed-by: Martin Kletzander Signed-off-by: Cole Robinson --- 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
  • +
+