Totoc1001
Totoc1001

Reputation: 356

GCOV: gcda files combination

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

{

}

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?

Upvotes: 0

Views: 573

Answers (2)

yugr
yugr

Reputation: 21878

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.

Upvotes: 0

VVish
VVish

Reputation: 311

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.

Upvotes: 0

Related Questions