- install lcov
- ./configure /*...*/ --enable-gcov
- make coverage-html
- xdg-open coveragereport/index.html
Thanks for working on that.
Given that we are preparing final releases, better do real test in private branches (kai/master or km/master) for now.
This looks like a lot of boilerplate code. It is okay to test this in libksba but when we come to the point touse this with more packages I would suggest to do this as a shell script. Our ./autogen.sh is already the common denominator of all configure stuff. Adding a mode there to enable coverage reports and to use it as a helper script for Makefiles (iff needed) will make things much easier to maintain and keep consistend between packages. The generic autogen.sh source is in libgpg-error.
FWIW, Maintaining such files in all packages is a pita. We should either replace that by a link gnupg.org/devel/something or point to the README.GIT in libgpg-error, which is the dependency of all our packages (except for the very special nPth)
I'd suggest to that only in maintainer mode.
I didn't realize that we have a release coming up. Makes sense to postpone putting the changes into master until we're sure it doesn't break the build. Thanks for the review!
I'll try to integrate that into gcov.m4. The problem is that the boilerplate is project specific b/c it's excluding things like tests and utility functions from the coverage.
How about adding it to HACKING in gnupg?
Actually there is another task. We should move away from the distributed gnupg/doc/HACKING as primary source to the gnupg-doc/web/faq/HACKING.org. (or we even move from faq/ to the new devel/)
We can more easily update the web page so that new hackers get the latest info and not those from some distributed tarball. gnupg would then distribute a copy retrieved using the "make distcheck".
Generate coverage information.
- autogen.sh: add options --coverage and --report to help w/ coverage info collection and reporting.
- m4/gcov.m4: new file. Boilerplate for locating gcov et.al.
- Makefile.am: add coverage-html target
./configure --enable-maintainer-mode --enable-gcov
To measure test coverage gcov and lcov needs to be installed and
./configure called w/ --enable-gcov. The coverage-html make target will
then create a HTML report.