0

Good afternoon,

I'd like to know if it could be possible to combine several gcda files without using the lcov -a tracefile1 -a tracefile2 -o output.html.

Actually this is my spec:

compile my code on local server excute tests on remote server 1 and 2

{

  • then copy the generated gcda on server1 on the local compilation server and generate the info file thanks to lcov

  • then copy the generated gcda on server2 on the local compilation server and generate the info file thanks to lcov

  • then combine both info files

}

The info file generation is actually quite long and I'd like to know if there is a possibility to combine gcdas from servers 1 and 2 without creating the info file. And generate the info file only for the resulting gcdas?

yugr
  • 19,769
  • 3
  • 51
  • 96
Totoc1001
  • 338
  • 2
  • 11

2 Answers2

0

Gcov as of now does not have any functionality to merge coverage reports.

I have a setup similar to yours and I use lcov to merge the tracefiles(or .info files).You can write scripts that will transfer the .gcda files from remote servers back to your local machine to generate the coverage report. There are other tools available that can solve your problem like TestWellCTC++,Rapicover,etc but they are not open source.

VVish
  • 251
  • 4
  • 11
  • "Gcov as of now does not have any functionality to merge coverage reports" - this is no longer true, please see another question. – yugr Jan 09 '22 at 06:07
0

Gcov as of now has functionality to merge coverage reports:

$ gcov-tool merge path1 path2

(by default results will be stored in merged_profile folder).

To add to another answer, gcov can also merge coverage data from multiple runs with the help of gcov-tool:

$ gcov-tool merge dir1 dir2

(by default results will be stored into merged_profile folder).

Unfortunately gcov-tool allows merging only two profiles at a time but you can use gcov-tool-many to work around this.

yugr
  • 19,769
  • 3
  • 51
  • 96