Recently in doing Cppunit test related work, with Gcov and Lcov tools to see the coverage of each line of code, the personal feel lcov awesome, looks very comfortable, point up is also very cool! ~~
Chatting to this point, as the title:
I'm using Lcov's--remove command.remove/filter out remaining unwanted stuff from tracefile
Now we can remove the (remaining) stuff that we aren ' t interested in from the tracefile.
Lcov--remove/tmp/libreoffice_total.info '/usr/include/* '/usr/lib/* '/usr/local/src/libreoffice/*/ unpackedtarball/* '/usr/local/src/libreoffice/workdir/* '/usr/local/src/libreoffice/instdir/* '/usr/local/src/ libreoffice/external/* '-o/tmp/libreoffice_filtered.info
/usr/include/* and/usr/lib/* These two paths plus can filter out those system functions of the coverage information (iostream, etc.), if you want to filter other paths, then add it yourself! ~~
PS: The manual said--extract command seems to be possible, but I did not try.
- e tracefile pattern --extract tracefile pattern tracefile. Use this switch if you want to extract coverages data for only a particular set of files from a Tracefile. Additional command line parameters is interpreted as Shell wildcard Patterns (note that they may need to being escaped accordingly to prevent the shell from expanding them first ). Every file entry in tracefile which matches at least one of those patterns would be extracted.
Reference Link: https://wiki.documentfoundation.org/Development/Lcov#patch_.27geninfo.27