Skip to content

allow paralell gcda processing/avoid temporary files in base directory #37

@pspacek

Description

@pspacek

Hello,

it seems that lcov/geninfo uses directory specified by --base-directory parameter for temporary files. This breaks parallel execution of multiple lcov instances on the same base directory, or of base-directory is read-only for any reason.

Parallel execution might sound weird at first, but it makes sense for programs which are executed in parallel and test coverage needs to be combined from all individual runs.

I have hundreds of .gcda and .gcno trees from the same program (which was run in parallel and gcda files redirected elsewhere) and now I'm attempting to create individual .info files for each run and then combine all .info files into the final info file used for genhtml.

While doing this, I attempted to speed up the process by executing lcov in parallel:

lcov -q --base-directory '$(TOPSRCDIR)' --no-external --capture -d daemon -o tempfile$(n).info

but lcov processing fails with following errors:

geninfo: WARNING: cannot find an entry for #usr#include#bits#stdio2.h.gcov in .gcno file, skipping file!

Further inspection of strace output showed that lcov creates these files in base-directory.

Please consider creating temporary files outside of temporary directory.
Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions