How to use lcov --diff
option to generate code coverage report for the diff of changes in a source view? I have a source view and i am able to generate lcov log file and html report for few of the modules in the source view. But, i am looking for an option to do a code coverage report for the diff of changes introduced in a source tree. I came across lcov --diff
option. Could some one guide me how to use this option? Since i am facing no difference using this option to generate code coverage.
Following are the steps tried:
- Generate code coverage data (
.info
file) without any modifications in the source tree. - Modify the source tree.
- Take a diff file with
-u
option. - Generate code coverage data again with
--diff
option . For eg.--diff <.info file>