From 76bae8b9847d6a61ce109a6c2210df02d40a0540 Mon Sep 17 00:00:00 2001 From: Vincent Bernat Date: Thu, 9 Jun 2016 15:28:52 +0200 Subject: [PATCH] doc: explain how to get coverage reports The base-directory option seems a bit off? --- README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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 --------- -- 2.39.5