I'm trying to get coverage information for each of my test cases (and also the total coverage). But since .gcda
file will be merged everytime the program runs, it's not possible unless the file is deleted/moved.
The problem of deleting the .gcda
file for every new test case execution is that I have to repeat the whole process again in order to get the coverage information of all of my test cases. If I have 2000 test cases, I have to run my program 4000 times.
As for moving the .gcda
file, I have to merge all of the .gcda
files. Is it possible to merge multiple gcda files with Gcov (or Gcovr since I use it for the XML output)?
Apparently lcov has a merging feature but AFAIK it doesn't support xml output.