开发者

Looking for a way to exclude files used by geninfo/genhtml

开发者 https://www.devze.com 2023-03-19 15:55 出处:网络
We are trying to use geninfo and genhtml (alternative to gcovr, see here) to produce an html page using coverage provided by gcov.

We are trying to use geninfo and genhtml (alternative to gcovr, see here) to produce an html page using coverage provided by gcov.

  • geninfo creates lcov-tracefiles from gcov's开发者_高级运维 *.gcda files
  • genhtml generates html files from the above tracefiles

However, the end result includes not only our code, but also files from /usr/include.

Does anyone know of a way to exclude these?

I tried looking at the man page but could not find anything http://linux.die.net/man/1/geninfo


If you're just looking to ignore files from /usr/include, a better option is probably "--no-external", which is intended for exactly this purpose.

lcov --no-external -d $(BLD_DIR) --capture -o .coverage.run


You can use the lcov -r option to remove those files you aren't interested in.

lcov -r <input tracefile> /usr/include/\* -o <output tracefile>
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号