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

[WIP] Add test coverage report with gcovr #1318

Closed
wants to merge 4 commits into from

Conversation

JckXia
Copy link
Member

@JckXia JckXia commented May 11, 2023

No description provided.

@KevinEady
Copy link
Contributor

I've been playing around with uploading coverage via the CI on my local fork. This PR ran this job, uploading this report and you can see its file explorer.

@JckXia , does this match with what you see locally when running gcovr?

@KevinEady
Copy link
Contributor

Looking at the results in the above report, I'm not sure how accurate it is...? For example, it is reporting that ThreadSafeFunction::New(napi_env, const Function&, ResourceString, size_t, size_t) is not covered, but we have it in a test here.

@KevinEady
Copy link
Contributor

With optimizations off, file explorer

@JckXia
Copy link
Member Author

JckXia commented Jul 11, 2023

Hey @KevinEady! Thank you so much for taking a look into this. I ran this command:
gcovr --gcov-filter '.*\b(napi-inl.h)|(napi.h)\b' -r $(cd ../../ && pwd) --html --html-details -o ../../coverage/cxxcov_deets.html from test/build and got a coverage score of 94.2% for napi-inl.h. Though I assume this is with optimizations. Coverage data for napi.h seems to be missing, however.

On a side note, initially ThreadSafeFunction::New(napi_env, const Function&, ResourceString, size_t, size_t) was shown to be uncovered. However, it was shown as "covered" on a subsequent invocation of the command.

@KevinEady
Copy link
Contributor

Hi @JckXia , Which compiler + version are you using?

@JckXia
Copy link
Member Author

JckXia commented Jul 12, 2023

I am using g++ 11.3.0 on ubuntu

g++ (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

@por1981
Copy link

por1981 commented Jul 14, 2023

_ No description provided. _

#1318 (comment)

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

Successfully merging this pull request may close these issues.

None yet

3 participants