-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Conversation
332afa9
to
9bf127d
Compare
9bf127d
to
2faebb3
Compare
4774a0f
to
9984940
Compare
9984940
to
0bd501d
Compare
26763c7
to
8d84fff
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
feel free to merge once tested.
ifeq ($(ENABLE_TESTCOVERAGE), 1) | ||
CFLAGS += --coverage | ||
LDFLAGS += --coverage | ||
endif |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
need to make sure this flag is portable to other compilers/linkers. I checked for gcc and clang, both of which supports gcov.
https://gcc.gnu.org/onlinedocs/gcc/Instrumentation-Options.html#Instrumentation-Options
https://clang.llvm.org/docs/SourceBasedCodeCoverage.html
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's only compatible with GCC and clang, right. Want me to add a check?
Here's an example report: https://codecov.io/gh/apache/incubator-mxnet/tree/26763c7b686f6059beabf7e56dd98bf1e526ab52 |
This PR adds coverage metrics for the C++ backend.
Something to verify at a later stage: Compare coverage result of optimized builds with non-optimized: https://github.com/pyarmak/cmake-gtest-coverage-example/blob/master/cmake/modules/CodeCoverage.cmake