c++ - How to tell lcov to ignore lines in the source files -
i wondering if there possibility tell lcov ignore lines in source files, ie. not report them unvisited. looking solution can put in code itself, like:
int some_method(char some_var, char some_other_var) { if(some_var == 'a') { if(some_other_var == 'b') { /* real stuff here */ } else { lcov_do_not_report_next_line // **<-- this?? ** not_implemented("a*") } } else { not_implemented("*") }
and necessary background:
a big piece of code 1 above being tested in series of unit tests, since code still under development there lot of not_implemented("a*")
macros put message on screen line number/filename , exit application. there no tests not implemented branches, written when feature implemented.
however lcov reports these not_implemented
lines , ugly in coverage report (ie: make high ratio of red lines).
is ask possible, or should live this?
you can use following comments in source.
from http://ltp.sourceforge.net/coverage/lcov/geninfo.1.php
- lcov_excl_line
- lines containing marker excluded.
- lcov_excl_start
- marks beginning of excluded section. current line part of section.
- lcov_excl_stop
- marks end of excluded section. current line not part of section.
Comments
Post a Comment