I have the same source files (C and Obj-C) being compiled into two targets: the unit test executable and the actual product (which then gets integration tested). The two tar
I think the intended way to do this is not to combine the .gcda
files directly but to create independent coverage data files using
lcov -o unittests.coverage -c -d unittests
lcov -o integrationtests.coverage -c -d integrationtests
Each coverage data then represents one "run". You can of course create separate graphs or html views. But you can also combine the data using --add-tracefile
, -a
for short
lcov -o total.coverage -a unittests.coverage -a integrationtests.coverage
From the total.coverage
you can generate the total report, using genhtml
for example.