[
https://issues.apache.org/jira/browse/MESOS-987?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14069254#comment-14069254
]
Dominic Hamon edited comment on MESOS-987 at 7/21/14 11:38 PM:
---------------------------------------------------------------
An alternative to adding it to the configure script:
{noformat}
$ CXXFLAGS="-pg --coverage" LDFLAGS=-lgcov ./configure
$ make check GTEST_FILTER='*'
$ cd build/src
$ find -name \*.gcno | xargs gcov
...
Lines executed:64.46% of 68888
$ lcov --directory . -c -o report.info --ignore-errors source
$ genhtml report.info --output-directory /tmp/lcov
$ Overall coverage rate:
lines......: 64.5% (44364 of 68821 lines)
functions..: 47.6% (28304 of 59445 functions)
{noformat}
Though this doesn't exclude 3rdparty and system folders.
was (Author: dhamon):
An alternative to adding it to the configure script:
{noformat}
$ CXXFLAGS="-pg --coverage" LDFLAGS=-lgcov ./configure
$ make check GTEST_FILTER=''
$ cd build/src && ./mesos-tests
$ find -name \*.gcno | xargs gcov
...
Lines executed:64.46% of 68888
$
{noformat}
> Wire up a code coverage tool
> ----------------------------
>
> Key: MESOS-987
> URL: https://issues.apache.org/jira/browse/MESOS-987
> Project: Mesos
> Issue Type: Improvement
> Components: technical debt
> Reporter: Vinod Kone
> Assignee: Dominic Hamon
>
> Some options are gcov (works only with gcc afaict) and optionally lcov.
> It would be nice to hook this up with Jenkins too.
> http://meekrosoft.wordpress.com/2010/06/02/continuous-code-coverage-with-gcc-googletest-and-hudson/
--
This message was sent by Atlassian JIRA
(v6.2#6252)