Search code examples
gcovlcov

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

{

  • 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?


Solution

  • 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.