After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 683212 - Port to gnome-common code coverage macros
Port to gnome-common code coverage macros
Status: RESOLVED FIXED
Product: totem-pl-parser
Classification: Core
Component: General
unspecified
Other All
: Normal normal
: ---
Assigned To: totem-pl-parser-maint
totem-pl-parser-maint
Depends on:
Blocks:
 
 
Reported: 2012-09-02 15:58 UTC by Philip Withnall
Modified: 2012-09-18 23:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Use gnome-common code coverage macros (2.19 KB, patch)
2012-09-02 16:04 UTC, Philip Withnall
committed Details | Review

Description Philip Withnall 2012-09-02 15:58:20 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).
Comment 1 Philip Withnall 2012-09-02 16:04:07 UTC
Created attachment 223205 [details] [review]
Use gnome-common code coverage macros
Comment 2 Bastien Nocera 2012-09-06 13:34:27 UTC
Review of attachment 223205 [details] [review]:

It works, though the code coverage results should really be more readily usable.
Comment 3 Philip Withnall 2012-09-06 22:21:17 UTC
(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”?
Comment 4 Bastien Nocera 2012-09-07 17:36:05 UTC
(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 5 Philip Withnall 2012-09-07 20:27:31 UTC
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(+)
Comment 6 Philip Withnall 2012-09-07 20:32:39 UTC
(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.
Comment 7 Bastien Nocera 2012-09-10 15:12:30 UTC
(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.
Comment 8 Philip Withnall 2012-09-18 23:47:46 UTC
(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.