GitHub user edespino opened a pull request:
https://github.com/apache/incubator-madlib/pull/151
MADLIB-1138. Add basic code coverage support:
For developers, add cmake option configuration option ENABLE_COVERAGE
which will introduce gcov compilation and linking
options (-fprofile-arcs -ftest-coverage). Two supporting make targets
are introduced:
* GenCoverageReport - Capture gcov counters and generate report
* ResetCoverageCounters - Zero counters gcov counters
Features:
* Counters will be captured in build/CodeCoverage.info file. System
and Third party metrics will be filtered out of coverage info file
and stored in CodeCoverage-filtered.info
* HTML report will be created in build/CodeCoverageReport directory
Usage:
* cmake -DENABLE_COVERAGE=ON ..
* <build, install and execute desired tests as usual>
* make GenCoverageReport
* ... To view report, open build/CodeCoverageReport/index.html in browser
...
* make ResetCoverageCounters
* ... Run another test ...
* make GenCoverageReport
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/edespino/incubator-madlib MADLIB-1138
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/incubator-madlib/pull/151.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #151
----
commit 4d4e9e4f6973e9c9bcede7e233e3c4f5c4e90524
Author: Ed Espino <[email protected]>
Date: 2017-07-15T06:06:08Z
MADLIB-1138. Add basic code coverage support:
For developers, add cmake option configuration option ENABLE_COVERAGE
which will introduce gcov compilation and linking
options (-fprofile-arcs -ftest-coverage). Two supporting make targets
are introduced:
* GenCoverageReport - Capture gcov counters and generate report
* ResetCoverageCounters - Zero counters gcov counters
Features:
* Counters will be captured in build/CodeCoverage.info file. System
and Third party metrics will be filtered out of coverage info file
and stored in CodeCoverage-filtered.info
* HTML report will be created in build/CodeCoverageReport directory
Usage:
* cmake -DENABLE_COVERAGE=ON ..
* <build, install and execute desired tests as usual>
* make GenCoverageReport
* <To view report, open build/CodeCoverageReport/index.html in browser>
* make ResetCoverageCounters
* <Run another test>
* make GenCoverageReport
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---