Re: code coverage patch - Mailing list pgsql-hackers

From Michelle Caisse
Subject Re: code coverage patch
Date
Msg-id 48C05FEF.3020800@sun.com
Whole thread Raw
In response to Re: code coverage patch  (Alvaro Herrera <alvherre@commandprompt.com>)
Responses Re: code coverage patch  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-hackers
Thanks, I'll take a look at these issues.<br /><br /> -- Michelle<br /><br /> Alvaro Herrera wrote: <blockquote
cite="mid20080904212045.GD5786@alvh.no-ip.org"type="cite"><pre wrap="">Michelle Caisse wrote: </pre><blockquote
type="cite"><prewrap="">I've attached a patch that allows the generation of code coverage  
 
statistics. To test it, apply the patch, then:

autoconf
./configure --enable-coverage
make
make check (or execute any other application against the database to see  
the coverage of that app)
make coverage
make coverage_out   </pre></blockquote><pre wrap="">
"make clean" does not work for me; it doesn't remove the .gcda and .gcno
files.  Apparently the problem is that $(enable_coverage) is not
defined, so that part of common.mk is not called.

Note: one thing to keep in mind is directories like src/port.  There are
some .gcda and .gcno files in there too, but even if common.mk is fixed,
they will not be cleaned because src/port does not seem to use
common.mk.

Another thing that I'm unsure about is the coverage_out target.  It does
work, but is it running the coverage target each time it is invoked?
Because if so, it's removing all of ./coverage and creating it again ...
is this the desired behavior?

This patch is missing a installation.sgml patch, at a minimum.  I think
it would be useful to mention that we support gcov, and the make targets
we have, in some other part of the documentation.  I can't readily find
a good spot, but I think a new file to be inserted in the internals
chapter would be appropriate.

Two hunks no longer apply, but that's OK because they were working
around a problem that no longer exists.  Other than the minor gripes
above, the patch looks OK to me.
 </pre></blockquote><br /><pre class="moz-signature" cols="72">-- 
Michelle Caisse               Sun Microsystems
California, U.S.     <a class="moz-txt-link-freetext" href="http://sun.com/postgresql">http://sun.com/postgresql</a>

</pre>

pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Verbosity of Function Return Type Checks
Next
From: "Alex Hunsaker"
Date:
Subject: Re: Need more reviewers!