mozilla / mozilla/grcov

Example for C++ coverage processing with different folders for source/notes and coverage data files?

Open
#1,072 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
1.4k
Forks
170
Avg merge
3d 10h
Merged PRs (30d)
4

Description

Hello,

I am trying to use grcov to process coverage information of a C++ application on a runtime server.

$ ./grcov --version
grcov 0.8.18
$ gcov --version
gcov (GCC) 11.2.1 20220127 (Red Hat 11.2.1-9)

When executing the application, the folder COVERAGE/<PID> is created containing the gcda files:

COVERAGE/<PID>/output/lib/awesome/o/awesome/file.gcda

I have a SOURCES folder that contains the source code of the application and the associated gcno files:

SOURCES/
  lib/awesome/file.cpp
  output/lib/awesome/o/awesome/file.gcno

I don't know how to call grcov with this setup, I have tried the below command but it fails:

$ ./grcov \
  --output-types lcov \
  --output-path grcov.lcov.info \
  --source-dir SOURCES \
  COVERAGE/<PID>/
[ERROR] A panic occurred at src/producer.rs:544: No input files found

Do you know if this is possible?

Thank you.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the shown grcov 0.8.18 command with the SOURCES and COVERAGE/ layout, using the sample C++ paths and gcda/gcno files from the issue. Done means the repository contains a clear example or documented invocation for processing this separated source and coverage-data setup without the reported “No input files found” failure.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
testing-qa
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.