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

Sagar picture Sagar · Jul 11, 2011 · Viewed 9.4k times · Source

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

Answer

dbn picture dbn · Apr 26, 2013

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