Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
aallrd opened this issue Jul 14, 2023 · 1 comment

Comments

@aallrd
Copy link

aallrd commented Jul 14, 2023

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.

@marco-c
Copy link
Collaborator

marco-c commented Aug 1, 2023

Where are the .gcno files stored? You need to pass both gcda and gcno.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants