<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7653.38">
<TITLE>Coverage Woes</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->

<P><FONT SIZE=2 FACE="Arial">Hi,</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">&nbsp; We're ramping up our testing using CDash, CTest, and CMake.&nbsp; I started a coverage build but get no coverage information. I'm not sure how to debug ctest as it doesn't produce coverage information properly.&nbsp; Long post, sorry.</FONT></P>

<P><FONT SIZE=2 FACE="Arial">Environment:</FONT>

<BR><FONT SIZE=2 FACE="Arial">$ ctest -version</FONT>

<BR><FONT SIZE=2 FACE="Arial">ctest version 2.7-20080417</FONT>

<BR><FONT SIZE=2 FACE="Arial">$ cmake -version</FONT>

<BR><FONT SIZE=2 FACE="Arial">cmake version 2.7-20080417</FONT>

<BR><FONT SIZE=2 FACE="Arial">$ gcc -v</FONT>

<BR><FONT SIZE=2 FACE="Arial">Using built-in specs.</FONT>

<BR><FONT SIZE=2 FACE="Arial">Target: x86_64-redhat-linux</FONT>

<BR><FONT SIZE=2 FACE="Arial">Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-libgcj-multifile --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --enable-plugin --with-java-home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre --with-cpu=generic --host=x86_64-redhat-linux</FONT></P>

<P><FONT SIZE=2 FACE="Arial">Thread model: posix</FONT>

<BR><FONT SIZE=2 FACE="Arial">gcc version 4.1.2 20071124 (Red Hat 4.1.2-42)</FONT>

<BR><FONT SIZE=2 FACE="Arial">$ gcov -v</FONT>

<BR><FONT SIZE=2 FACE="Arial">gcov (GCC) 4.1.2 20071124 (Red Hat 4.1.2-42)</FONT>

<BR><FONT SIZE=2 FACE="Arial">$ uname -a</FONT>

<BR><FONT SIZE=2 FACE="Arial">Linux mi3bld04.mayo.edu 2.6.18-92.1.10.el5 #1 SMP Tue Aug 5 07:42:41 EDT 2008 x86_64 x86_64 x86_64 GNU/Linux</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">Our main test driver is called NoOp, I know it's executed, but no coverage info is produced:</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">$ find . -name &quot;NoOp*&quot;</FONT>

<BR><FONT SIZE=2 FACE="Arial">./Testing/CoverageInfo/NoOp.cxx.gcda##NoOp.cxx.gcov</FONT>

<BR><FONT SIZE=2 FACE="Arial">./Testing/CoverageInfo/NoOp.cxx.gcda##iostream.gcov</FONT>

<BR><FONT SIZE=2 FACE="Arial">./Testing/CMakeFiles/NoOp.dir</FONT>

<BR><FONT SIZE=2 FACE="Arial">./Testing/CMakeFiles/NoOp.dir/Source/NoOp.cxx.gcda</FONT>

<BR><FONT SIZE=2 FACE="Arial">./Testing/CMakeFiles/NoOp.dir/Source/NoOp.cxx.o</FONT>

<BR><FONT SIZE=2 FACE="Arial">./Testing/CMakeFiles/NoOp.dir/Source/NoOp.cxx.gcno</FONT>

<BR><FONT SIZE=2 FACE="Arial">./bin/NoOp</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">ctest claims to properly build the output, but doesn't manage to package it up and ship it out (the file has the proper info in it):</FONT></P>

<P><FONT SIZE=2 FACE="Arial">.&quot;/usr/bin/gcov&quot; -l -o &quot;/home/blezek/Source/Testing/MI3CLibNightly-linux86-coverage-gcc/Testing/CMakeFiles/NoOp.dir/Source&quot; &quot;/home/blezek/Source/Testing/MI3CLibNightly-linux86-coverage-gcc/Testing/CMakeFiles/NoOp.dir/Source/NoOp.cxx.gcda&quot;</FONT></P>

<P><FONT SIZE=2 FACE="Arial">File '/home/blezek/Source/Testing/MI3CLibNightly/Testing/Source/NoOp.cxx'</FONT>

<BR><FONT SIZE=2 FACE="Arial">Lines executed:100.00% of 5</FONT>

<BR><FONT SIZE=2 FACE="Arial">/home/blezek/Source/Testing/MI3CLibNightly/Testing/Source/NoOp.cxx:creating 'NoOp.cxx.gcda##NoOp.cxx.gcov'</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">File '/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/iostream'</FONT>

<BR><FONT SIZE=2 FACE="Arial">Lines executed:100.00% of 1</FONT>

<BR><FONT SIZE=2 FACE="Arial">/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/iostream:creating 'NoOp.cxx.gcda##iostream.gcov'</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">--------------------------------------------------------------</FONT>

<BR><FONT SIZE=2 FACE="Arial">File '/home/blezek/Source/Testing/MI3CLibNightly/Testing/Source/NoOp.cxx'</FONT>

<BR><FONT SIZE=2 FACE="Arial">Lines executed:100.00% of 5</FONT>

<BR><FONT SIZE=2 FACE="Arial">/home/blezek/Source/Testing/MI3CLibNightly/Testing/Source/NoOp.cxx:creating 'NoOp.cxx.gcda##NoOp.cxx.gcov'</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">File '/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/iostream'</FONT>

<BR><FONT SIZE=2 FACE="Arial">Lines executed:100.00% of 1</FONT>

<BR><FONT SIZE=2 FACE="Arial">/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/iostream:creating 'NoOp.cxx.gcda##iostream.gcov'</FONT>
</P>
<BR>

<P><FONT SIZE=2 FACE="Arial">--------------------------------------------------------------</FONT>

<BR><FONT SIZE=2 FACE="Arial">&nbsp;&nbsp; produced s: /home/blezek/Source/Testing/MI3CLibNightly/Testing/Source/NoOp.cxx</FONT>

<BR><FONT SIZE=2 FACE="Arial">&nbsp;&nbsp; in file: NoOp.cxx.gcda##NoOp.cxx.gcov</FONT>

<BR><FONT SIZE=2 FACE="Arial">&lt;Snip&gt;</FONT>

<BR><FONT SIZE=2 FACE="Arial">.Process file: /home/blezek/Source/Testing/MI3CLibNightly/Testing/Source/NoOp.cxx</FONT>

<BR><FONT SIZE=2 FACE="Arial">Actually perfoming coverage for: /home/blezek/Source/Testing/MI3CLibNightly/Testing/Source/NoOp.cxx</FONT>
</P>
<BR>

<P><FONT SIZE=2 FACE="Arial">So we have some coverage.&nbsp; However, ctest does not produce any coverage information at all, though the file (./Testing/CoverageInfo/NoOp.cxx.gcda##NoOp.cxx.gcov) has the correct coverage information in it.</FONT></P>
<BR>
<BR>
<BR>

<P><FONT SIZE=2 FACE="Arial">$grep NoOp Testing/20081222-1437/*</FONT>

<BR><FONT SIZE=2 FACE="Arial">Testing/20081222-1437/CoverageLog-2.xml:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;File Name=&quot;NoOp.cxx&quot; FullPath=&quot;./Testing/Source/NoOp.cxx&quot;&gt;</FONT>
</P>
<BR>
<BR>

<P><FONT SIZE=2 FACE="Arial">So it would appear that ctest is not properly generating coverage information.&nbsp; Any help, thoughts or suggestions?</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">Merry Christmas and Happy New Year,</FONT>

<BR><FONT SIZE=2 FACE="Arial">-dan</FONT>
</P>
<BR>
<BR>
<BR>

<P><B><FONT SIZE=2 FACE="Arial">Daniel Blezek, PhD</FONT></B>

<BR><FONT SIZE=2 FACE="Arial">Medical Imaging Informatics Innovation Center</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">P 127 or (77) 8 8886</FONT>

<BR><FONT SIZE=2 FACE="Arial">T 507 538 8886</FONT>

<BR><FONT SIZE=2 FACE="Arial">E blezek.daniel@mayo.edu</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">Mayo Clinic</FONT>

<BR><FONT SIZE=2 FACE="Arial">200 First St. S.W.</FONT>

<BR><FONT SIZE=2 FACE="Arial">Harwick SL-44</FONT>

<BR><FONT SIZE=2 FACE="Arial">Rochester, MN 55905</FONT>

<BR><FONT SIZE=2 FACE="Arial">mayoclinic.org</FONT>
</P>

</BODY>
</HTML>