diff options
author | Joe Guo <joeg@catalyst.net.nz> | 2019-05-16 14:38:25 +1200 |
---|---|---|
committer | Gary Lockyer <gary@samba.org> | 2019-05-22 05:59:13 +0000 |
commit | 40a9b739c640b4944289ec19d5efaee5b30f995c (patch) | |
tree | 13dee9c72734f8db704237a9fa85809eab7fe9b4 /Makefile | |
parent | a666a99e4dc594bc153cd26b24cddd547c1cc750 (diff) | |
download | samba-40a9b739c640b4944289ec19d5efaee5b30f995c.tar.gz |
Makefile: add lcov command
A helper cmd to generate .info file from .gcno and .gcda file,
and then generate html report from .info file.
Usage:
./configure --enable-coverage
make -j
make test TESTS=mytest
make lcov
Signed-off-by: Joe Guo <joeg@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -28,6 +28,19 @@ subunit-test: testenv: $(WAF) test --testenv $(TEST_OPTIONS) +lcov: + @echo usage: + @echo "" + @echo ./configure --enable-coverage + @echo make -j + @echo make test TESTS=mytest + @echo make lcov + @echo "" + rm -f lcov.info + lcov --capture --directory . --output-file lcov.info && \ + genhtml lcov.info --output-directory public --prefix=$$(pwd) && \ + echo Please open public/index.html in browser to view the coverage report + gdbtestenv: $(WAF) test --testenv --gdbtest $(TEST_OPTIONS) |