MantisBT - CMake
View Issue Details
0004972CMakeCTestpublic2007-05-06 10:142008-09-11 11:14
Trevor Kellaway 
Bill Hoffman 
normalminoralways
closedfixed 
 
 
0004972: Code coverage "Something went wrong" verbose mode reports wrong binary path.
In cmCTestCoverageHandler.cxx there is a cut/paste error for the verbose mode reported binary path, it is incorrectly using the source path:

 cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "s: ["
   << sourceFile.substr(0, cont->SourceDir.size()) << "]"
   << std::endl);

 cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "b: ["
   << sourceFile.substr(0, cont->BinaryDir.size()) << "]"
   << std::endl);

Note: The output log message code does this correctly.
No tags attached.
related to 0004971closed Bill Hoffman MSYS gcov fails if drive letter case differs 
related to 0005668closed Bill Hoffman CMake/CTest code coverage support doesn't work for MinGW gcc under Windows 
Issue History
2007-08-31 11:28Alex NeundorfAssigned ToSystem Admin => David Cole
2008-07-31 14:19David ColeNote Added: 0012908
2008-07-31 14:20David ColeRelationship addedrelated to 0004971
2008-07-31 14:21David ColeStatusassigned => resolved
2008-07-31 14:21David ColeResolutionopen => fixed
2008-07-31 14:21David ColeNote Added: 0012909
2008-07-31 14:21David ColeAssigned ToDavid Cole => Bill Hoffman
2008-07-31 14:21David ColeStatusresolved => assigned
2008-09-11 11:14Bill HoffmanStatusassigned => closed
2009-10-12 15:08David ColeRelationship addedrelated to 0005668

Notes
(0007572)
Trevor Kellaway   
2007-05-07 13:22   
As requested here is an example, the verbose console output:

===
Something went wrong
File: [m:/Users/TK/trunk/sw/tools/source/custom_cl6x/source/custom_cl6x.c]
s: [m:/Users/TK/trunk/sw/tools/source/custom_cl6x/source]
b: [m:/Users/TK/trunk/sw/tools/source/custom_cl6x/source/cust]
Open file: CoverageLog-0
===

Note that the "b:" path is wrong, it is incorrectly using a subset of the source path, rather than the binary path.

The LastCoverage_20070507-1716.log file is correct:
===
  Something went wrong. Cannot find: m:/Users/TK/trunk/sw/tools/source/custom_cl6x/source/custom_cl6x.c in source dir: M:/Users/TK/trunk/sw/tools/source/custom_cl6x/source or binary dir: M:/Users/TK/trunk/sw/tools/source/custom_cl6x/build/Debug
===


(0012908)
David Cole   
2008-07-31 14:19   
Fixed in CVS HEAD:

/cvsroot/CMake/CMake/Source/CTest/cmCTestCoverageHandler.cxx,v <-- cmCTestCoverageHandler.cxx
new revision: 1.55; previous revision: 1.54

(s and b were not meant to be source and binary path.... they were originally meant just for ctest developer eyes... to help understand *why* the "something went wrong" message was occurring)

I removed s and b and spit the source and binary directories instead since that seems to be clearer anyhow. I suspect the root cause of this was the case of the drive letter, "M" vs. "m" in this case, which was fixed with related issue 0004971.
(0012909)
David Cole   
2008-07-31 14:21   
Bill, you can merge this to CMake-2-6 after a night on the dashboards, too.... Thanks