[CMake] CTest: Glob files to include in coverage report with 0% line coverage

Andreas Schuh andreas.schuh.84 at googlemail.com
Wed Jan 25 12:34:47 EST 2012


I am not sure where I found info on this variable, but the ITK/VTK
projects are always a good resource on the latest trends/development
in CMake/CTest/CPack.

Further, for anyone interested, please note the difference in
CTEST_EXTRA_COVERAGE_GLOB, which lists glob expressions as used by
file (GLOB), and CTEST_CUSTOM_COVERAGE_EXCLUDE, which uses regular
expressions. In the beginning, I wasn't very clear about this, but in
either case you would need to use "/test/*" or "/test/.*",
respectively, to include/exclude all files in some "test/" directory.


Regarding this variable, I was eventually looking at the source code
and figured that indeed only source files in the source tree are
considered.

Related bug report: http://public.kitware.com/Bug/view.php?id=12910

Andreas

On Tue, Jan 24, 2012 at 7:12 AM, David Cole <david.cole at kitware.com> wrote:
> On Tue, Jan 24, 2012 at 2:51 AM, Eric Noulard <eric.noulard at gmail.com> wrote:
>> 2012/1/24 Rolf Eike Beer <eike at sf-mail.de>:
>>> Andreas Schuh wrote:
>>>> Hi,
>>>>
>>>> Setting CTEST_EXTRA_COVERAGE_GLOB in the CTestCustom.cmake file can be
>>>> used to add additional files which shall be included in the coverage
>>>> report. This is useful to ensure that files which are not covered by
>>>> any test are still reported with 0% line coverage.
>>>
>>> Oh, interesting variable. How can it be that there is absolutely zero
>>> documentation for in CMake?
>>
>> Because ctest and cpack documentation are very far from being
>> documented as cmake is ?
>> E.g. current ctest and cpack do not have --help-variable-* support?
>>
>> If you want to help please try my "stage/ImproveCPackDoc-reloaded" branch
>> and may be read this: http://public.kitware.com/Bug/view.php?id=10067
>>
>> The technique I propose may be used for cpack, ctest, etc...
>>
>> --
>> Erk
>> Membre de l'April - « promouvoir et défendre le logiciel libre » -
>> http://www.april.org
>> --
>>
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>>
>> Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ
>>
>> Follow this link to subscribe/unsubscribe:
>> http://www.cmake.org/mailman/listinfo/cmake
>
>
> There is zero documentation for all of the ctest related variables. We
> need somebody who can write a bunch of documentation someday to fill
> in that blank.
> --
>
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake


More information about the CMake mailing list