0

this is a follow-up question to this question I posted yesterday: capture coverage data in parallel with lcov

I'm trying to process the .gcda files from different runs of the same source code in parallel:

lcov --gcov-tool <path>/build/bin/../gcc-7.3.0/bin/gcov --directory <.gcno/.gcda dir> --base-directory <src dir> --quiet --capture --no-external --test-name <name> --output-file /tmp/lcov_<name>

It seems like the problem is that lcov/gcov is generating temp files inside --base-directory, and then in parallel runs lcov fails because the temp files' names are the same. The solution I came up with is creating a directory with the same directory-tree as the --base-directory, and then create symlinks to all the source code files. This works in parallel, however after merging all tracefiles and generating a final report, lcov treats the same files as different.

i.e [...]/machine_1/src/example.cpp and [...]/machine_2/src/example.cpp is treated as 2 different files in the report and not merged. Is there any way when merging to ignore the path up until reaching the actual source code (in this case /src/ folder)?

thank you!

Wolf
  • 77
  • 8

0 Answers0