From: Vincent Bernat Date: Thu, 9 Jun 2016 13:28:52 +0000 (+0200) Subject: doc: explain how to get coverage reports X-Git-Tag: 0.9.4~22 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=76bae8b9847d6a61ce109a6c2210df02d40a0540;p=thirdparty%2Flldpd.git doc: explain how to get coverage reports The base-directory option seems a bit off? --- diff --git a/README.md b/README.md index 7dedb3a9..271bf2cf 100644 --- 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 ---------