View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0008932 | CMake | CTest | public | 2009-04-27 12:08 | 2016-06-10 14:30 | ||||
Reporter | Tom Vercauteren | ||||||||
Assigned To | Zach Mullen | ||||||||
Priority | normal | Severity | feature | Reproducibility | always | ||||
Status | closed | Resolution | moved | ||||||
Platform | OS | OS Version | |||||||
Product Version | |||||||||
Target Version | Fixed in Version | ||||||||
Summary | 0008932: Enhance coverage information by globbing for *.gcno instead of *.gcda in ctest | ||||||||
Description | In cdash, it would be interesting to get, in the "Coverage Summary" box, a "Total Coverage" number that is as accurate as possible. When ctest is used to generate coverage information, it looks for (gc)da files in the build directory rather than (gc)no files - cf. cmCTestCoverageHandler::FindGCovFiles in cmCTestCoverageHandler.cxx. This might lead to overestimating the coverage percentage. If I understand it correctly, when everything is setup correctly for a coverage build: - gcc generates (gc)no files at compile time - (gc)da files are generated at run time - i.e. when the unit tests are run This implies that if a given file (say myfile.cpp) is compiled in my project but its code is never executed when "make test" is called: 1) I want a line to be added in cdash that says that this file is untested 2) In the "Coverage Summary" box of cdash, the number of "Untested lines" should account for this untested file 3) In my build directory, myfile.cpp.gcno exists 4) In my build directory, myfile.cpp.gcda does not exists It therefore seems that: 1) A file such as myfile.cpp above would currently not appear at all on cdash. 2) If ctest was to report a file as being "UNTESTED" when a .gcno file is found without its .gcda counterpart, myfile.cpp would appear on cdash as being "UNTESTED" This mailing list thread might provide more information: http://www.cmake.org/pipermail/cmake/2009-April/029045.html [^] | ||||||||
Additional Information | A patch against today's cvs version of cmake is attached | ||||||||
Tags | No tags attached. | ||||||||
Attached Files | cmake-cov-gcno-gcda-2009-04-27.patch [^] (1,378 bytes) 2009-04-27 12:08 [Show Content] | ||||||||
Relationships | |
Relationships |
Notes | |
(0016193) Bill Hoffman (manager) 2009-04-27 12:35 |
Did you test this? Do you have a before and after dashboard link? |
(0016194) Tom Vercauteren (reporter) 2009-04-27 12:43 |
This patch has been tested with an intranet installation of cdash. There is thus no before and after dashboard link I can share. |
(0020904) Tom Vercauteren (reporter) 2010-06-03 08:02 |
For the record, this commit seems related to the same problem: http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7049dff85a7cbfd64d61de60c27ea794d013570c [^] |
(0020905) David Cole (manager) 2010-06-03 09:03 |
Zach, would you say your commit fully addresses this issue... or is there legitimately more of a feature request here than is covered by your recent CTEST_EXTRA_COVERAGE_GLOB code...? |
(0020906) Zach Mullen (developer) 2010-06-03 09:20 |
My extra coverage glob feature addresses files in the source directory which are never touched by the compiler. It was my understanding, given that we see "untested" files all the time, that even files which are not touched at runtime also generate gcda files. This is evidenced by the files listed as 0% coverage in the following list: http://www.cdash.org/CDash/viewCoverage.php?buildid=624618 [^] What Tom is requesting is something that *should* already be getting done -- files that do get compiled but which have no lines touched at runtime. Tom, have you verified that your premises about gcno and gcda are correct? |
(0020907) Tom Vercauteren (reporter) 2010-06-03 09:41 |
Not sure I fully understand the question. In my project, after a full coverage run by cmake/ctest I get: > find . -name "*.gcno" | wc -l 767 > find . -name "*.gcda" | wc -l 636 I haven't yet had the time to experiment with a cmake version that has the CTEST_EXTRA_COVERAGE_GLOB code. |
(0041547) Kitware Robot (administrator) 2016-06-10 14:27 |
Resolving issue as `moved`. This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page. |
Notes |
Issue History | |||
Date Modified | Username | Field | Change |
2009-04-27 12:08 | Tom Vercauteren | New Issue | |
2009-04-27 12:08 | Tom Vercauteren | File Added: cmake-cov-gcno-gcda-2009-04-27.patch | |
2009-04-27 12:27 | Bill Hoffman | Status | new => assigned |
2009-04-27 12:27 | Bill Hoffman | Assigned To | => Bill Hoffman |
2009-04-27 12:35 | Bill Hoffman | Note Added: 0016193 | |
2009-04-27 12:43 | Tom Vercauteren | Note Added: 0016194 | |
2009-10-12 15:12 | David Cole | Assigned To | Bill Hoffman => David Cole |
2010-06-03 08:02 | Tom Vercauteren | Note Added: 0020904 | |
2010-06-03 09:02 | David Cole | Assigned To | David Cole => Zach Mullen |
2010-06-03 09:03 | David Cole | Note Added: 0020905 | |
2010-06-03 09:20 | Zach Mullen | Note Added: 0020906 | |
2010-06-03 09:41 | Tom Vercauteren | Note Added: 0020907 | |
2016-06-10 14:27 | Kitware Robot | Note Added: 0041547 | |
2016-06-10 14:27 | Kitware Robot | Status | assigned => resolved |
2016-06-10 14:27 | Kitware Robot | Resolution | open => moved |
2016-06-10 14:30 | Kitware Robot | Status | resolved => closed |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |