GNOME Bugzilla – Bug 683212
Port to gnome-common code coverage macros
Last modified: 2012-09-18 23:47:46 UTC
gnome-common 3.6.0 will include code coverage macros to ease adding gcov support. Patch coming up which will add code coverage support to totem-pl-parser. This should only be committed once we’re ready to depend on gnome-common 3.6.0 (which hasn’t even been released yet).
Created attachment 223205 [details] [review] Use gnome-common code coverage macros
Review of attachment 223205 [details] [review]: It works, though the code coverage results should really be more readily usable.
(In reply to comment #2) > It works, though the code coverage results should really be more readily > usable. Thanks for the review. I’ll commit it once gnome-common has been released. What do you mean by “code coverage results should really be more readily usable”?
(In reply to comment #3) > (In reply to comment #2) > > It works, though the code coverage results should really be more readily > > usable. > > Thanks for the review. I’ll commit it once gnome-common has been released. Don't need to wait for a release, gnome-common can be updated for people who need to autoreconf. > What do you mean by “code coverage results should really be more readily > usable”? I don't see what I'm supposed to do with this. I have a bunch of *.gcno files. What now?
Comment on attachment 223205 [details] [review] Use gnome-common code coverage macros commit 97cbbf6caaf89460fa99640e5ca7ff748a864cb6 Author: Philip Withnall <philip@tecnocode.co.uk> Date: Tue Aug 21 21:27:55 2012 +0100 build: Use gnome-common code coverage macros to add gcov support This replaces totem-pl-parser’s existing home-grown solution with the gnome-common code coverage macros added in gnome-common 3.5.6/3.6.0. To use: cd plparse && make check-code-coverage this will run the totem-pl-parser test suite and build a code coverage report of the code which was touched. The report will be an HTML file and its URI will be printed on completion. Closes: https://bugzilla.gnome.org/show_bug.cgi?id=683212 configure.in | 1 + plparse/Makefile.am | 6 ++++++ 2 files changed, 7 insertions(+)
(In reply to comment #4) > > What do you mean by “code coverage results should really be more readily > > usable”? > > I don't see what I'm supposed to do with this. I have a bunch of *.gcno files. > What now? Run: cd plparse && make check-code-coverage this will run the test suite and build a code coverage report, then print the URI for the report. I’ve just added some documentation to gnome-code-coverage.m4 in gnome-common to explain this. I’m not sure what else I can do. Suggestions welcome.
(In reply to comment #6) > (In reply to comment #4) > > > What do you mean by “code coverage results should really be more readily > > > usable”? > > > > I don't see what I'm supposed to do with this. I have a bunch of *.gcno files. > > What now? > > Run: > cd plparse && make check-code-coverage > this will run the test suite and build a code coverage report, then print the > URI for the report. > > I’ve just added some documentation to gnome-code-coverage.m4 in gnome-common to > explain this. I’m not sure what else I can do. Suggestions welcome. I would generate those files all the time if --enable-code-coverage was passed to configure. Or is it too costly? Seems a bit weird that a separate target would be required.
(In reply to comment #7) > I would generate those files all the time if --enable-code-coverage was passed > to configure. Or is it too costly? Seems a bit weird that a separate target > would be required. Generating the report does take a little while. If you run it, do you think the delay is acceptable enough to make it part of `make check`? If so, we could override totem-pl-parser’s ‘check’ target to always build the code coverage report. I don’t think it’s something which should be done in gnome-common though.