[CDash] [CTest] [Usage] Ignoring coverage line by GCOV_EXCL_LINE

Zack Galbreath zack.galbreath at kitware.com
Tue May 26 17:18:05 UTC 2020

I can't say I have much experience with these markups, but after searching
a bit I found this relevant post on stackoverflow:


Their solution was to use gcovr v3.4.

I haven't used this tool either, but it looks like it also has an option to
output coverage data in Cobertura XML format:
That's another coverage format that CTest knows how to parse.

Good luck! Let us know how it goes.

On Tue, May 26, 2020 at 5:04 AM Nikhil Reddy Ramolla <rnr1410 at gmail.com>

> Hello, this is my current CTest script for a C++ Project:
> include(${CTEST_SOURCE_DIRECTORY}/CTestConfig.cmake)
> gcov) ctest_empty_binary_directory(${CTEST_BINARY_DIRECTORY})
> ctest_start(Experimental) ctest_configure() ctest_build() ctest_test()
> ctest_coverage() ctest_submit()
> The GCC coverage flags are enabled by default in src/CMakeLists.txt.
> I see that everything is working as intended, but [GL]COVR?_EXCL_LINE is
> not working.
> lcov and genhtml are two other tools which are useful to create coverage
> report in html, but I want it to submit to CDash instead, as a part of
> CDash's coverage.
> So I changed CTEST_COVERAGE_COMMAND to lcov and got this eror:
> lcov -o /path/to/testThis.dir /path/to/testThis.dir/this.cpp.gcda lcov:
> Need one of options -z, -c, -a, -e, -r, -l, --diff or --summary Use lcov
> --help to get usage information Coverage command returned: 2 while
> processing: /path/to/testThis.dir/this.cpp.gcda Command produced error: 0
> From this it is clear to me that lcov is not intended to use for this case.
> But I really want an alternative/patch of gcov which can exclude
> Is a solution present for this?
> I have already posted in https:// <http://goog_1415041473>
> discourse.cmake.org but got no reply.
> _______________________________________________
> CDash mailing list
> CDash at public.kitware.com
> https://public.kitware.com/mailman/listinfo/cdash
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cdash/attachments/20200526/f2da96ee/attachment-0003.htm>

More information about the CDash mailing list