MantisBT - CMake | |||||||||||||||
View Issue Details | |||||||||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||||||||
0011717 | CMake | CTest | public | 2011-01-17 17:21 | 2012-07-09 06:52 | ||||||||||
Reporter | Marco Craveiro | ||||||||||||||
Assigned To | David Cole | ||||||||||||||
Priority | normal | Severity | minor | Reproducibility | always | ||||||||||
Status | closed | Resolution | fixed | ||||||||||||
Platform | Linux | OS | Ubuntu | OS Version | 10.10 | ||||||||||
Product Version | CMake 2.8.3 | ||||||||||||||
Target Version | CMake 2.8.7 | Fixed in Version | CMake 2.8.7 | ||||||||||||
Summary | 0011717: gcov: handling the same file name in different directories | ||||||||||||||
Description | i've been trying to use ctest's coverage support on a project that uses the same file name in different directories, e.g.: serialisation/some_class_name.hpp streaming/some_class_name.hpp ... due to the parameters passed in to gcov by ctest, this results in naming clashes when generating the *.gcov files from the different *.gcda input files. symptoms of this problem: ------------------------- 1. errors such as: Error(s) while accumulating results: Problem reading source file: some_file_name line:45 out total: 49 Looks like there are more lines in the file: }; Looks like there are more lines in the file: Looks like there are more lines in the file: <snip> debugging ctest revealed that each of these is actually an error in a different file, all of which suffering from the name clashing. 2. an error at the end of ctest even though the submission is successful: <snip> Submission successful Error in read script: some_ctest_script.cmake | ||||||||||||||
Steps To Reproduce | the following steps assume a linux environment with all development tools installed (gcov, gcc, cmake, tar, etc). 1. download the attachment cmake_gcov_bug.tgz. it contains the smallest amount of code i could come up with that illustrates the problem. 2. unpack it by running: $ tar -zxf cmake_gcov_bug.tgz 3. run ctest: $ cd cmake_gcov_bug $ ctest -S CTest.cmake -VV 4. An error will occur: <snip> Error(s) while accumulating results: Looks like there are more lines in the file: class some_class_a <snip> Error in read script: /home/marco/code/cmake_gcov_bug/CTest.cmake | ||||||||||||||
Additional Information | - the errors occur due to the gcov parameters passed in, which result in using "short" filenames. - the problem should be fixed by adding the flag -p (--preserve-paths) to the gcov invocation in cmCTestCoverageHandler::HandleGCovCoverage (Source/CTest/cmCTestCoverageHandler.cxx). this code uses the gcov generated filename to process the file and works correctly with a longer filename. - once processed into a SingleFileCoverageVector, it appears nothing else relies on the original gcov file name. - patch will be attached subsequently as only one file can be uploaded from submission form. | ||||||||||||||
Tags | No tags attached. | ||||||||||||||
Relationships |
| ||||||||||||||
Attached Files | cmake_gcov_bug.tgz (1,086) 2011-01-17 17:21 https://public.kitware.com/Bug/file/3640/cmake_gcov_bug.tgz 0001-use-the-preserve-paths-flag-when-invoking-gcov-to-av.patch (1,255) 2011-01-17 17:22 https://public.kitware.com/Bug/file/3641/0001-use-the-preserve-paths-flag-when-invoking-gcov-to-av.patch | ||||||||||||||
Issue History | |||||||||||||||
Date Modified | Username | Field | Change | ||||||||||||
2011-01-17 17:21 | Marco Craveiro | New Issue | |||||||||||||
2011-01-17 17:21 | Marco Craveiro | File Added: cmake_gcov_bug.tgz | |||||||||||||
2011-01-17 17:22 | Marco Craveiro | File Added: 0001-use-the-preserve-paths-flag-when-invoking-gcov-to-av.patch | |||||||||||||
2011-01-21 14:53 | Marco Craveiro | Note Added: 0025009 | |||||||||||||
2011-01-21 14:56 | Marco Craveiro | Note Edited: 0025009 | bug_revision_view_page.php?bugnote_id=25009#r153 | ||||||||||||
2011-01-26 09:35 | David Cole | Assigned To | => David Cole | ||||||||||||
2011-01-26 09:35 | David Cole | Status | new => assigned | ||||||||||||
2011-02-09 16:10 | David Cole | Note Added: 0025360 | |||||||||||||
2011-02-09 16:10 | David Cole | Status | assigned => resolved | ||||||||||||
2011-02-09 16:10 | David Cole | Resolution | open => fixed | ||||||||||||
2011-02-16 11:43 | David Cole | Target Version | => CMake 2.8.5 | ||||||||||||
2011-02-16 11:43 | David Cole | Steps to Reproduce Updated | bug_revision_view_page.php?rev_id=205#r205 | ||||||||||||
2011-06-06 18:25 | David Cole | Status | resolved => closed | ||||||||||||
2011-06-06 18:25 | David Cole | Note Added: 0026720 | |||||||||||||
2011-06-17 18:23 | David Cole | Fixed in Version | => CMake 2.8.5 | ||||||||||||
2011-06-17 18:23 | David Cole | Steps to Reproduce Updated | bug_revision_view_page.php?rev_id=362#r362 | ||||||||||||
2011-10-05 17:31 | David Cole | Relationship added | related to 0012415 | ||||||||||||
2011-10-05 17:32 | David Cole | Relationship added | related to 0012490 | ||||||||||||
2011-10-22 11:11 | David Cole | Note Added: 0027614 | |||||||||||||
2011-10-22 11:11 | David Cole | Status | closed => feedback | ||||||||||||
2011-10-22 11:11 | David Cole | Resolution | fixed => reopened | ||||||||||||
2011-10-22 11:11 | David Cole | Fixed in Version | CMake 2.8.5 => | ||||||||||||
2011-10-22 11:11 | David Cole | Target Version | CMake 2.8.5 => CMake 2.8.7 | ||||||||||||
2011-10-22 11:16 | David Cole | Note Added: 0027615 | |||||||||||||
2011-10-22 11:16 | David Cole | Status | feedback => resolved | ||||||||||||
2011-10-22 11:16 | David Cole | Fixed in Version | => CMake 2.8.7 | ||||||||||||
2011-10-22 11:16 | David Cole | Resolution | reopened => fixed | ||||||||||||
2012-07-09 06:52 | David Cole | Note Added: 0029972 | |||||||||||||
2012-07-09 06:52 | David Cole | Status | resolved => closed |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|