]> git.ipfire.org Git - thirdparty/lldpd.git/commitdiff
doc: explain how to get coverage reports
authorVincent Bernat <vincent@bernat.im>
Thu, 9 Jun 2016 13:28:52 +0000 (15:28 +0200)
committerVincent Bernat <vincent@bernat.im>
Thu, 9 Jun 2016 13:32:03 +0000 (15:32 +0200)
The base-directory option seems a bit off?

README.md

index 7dedb3a94d0034730fca36dd67a79256c9e738ef..271bf2cf2173442f3bdfc42d44d4a0ad10376ec6 100644 (file)
--- a/README.md
+++ b/README.md
@@ -256,6 +256,18 @@ There is a general test suite with `make check`. It's also possible to
 run integration tests. They need [py.test](http://pytest.org/latest/)
 and rely on Linux containers to be executed.
 
+To enable code coverage, use:
+
+    ../configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \
+                 --enable-sanitizers --with-snmp \
+                 CFLAGS="-O0 -g --coverage" LDFLAGS="--coverage"
+    make
+    make check
+    # maybe, run integration tests
+    lcov --base-directory $PWD/src/lib \
+         --directory src --capture --output-file gcov.info
+    genhtml gcov.info --output-directory coverage
+
 Embedding
 ---------