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

Aggregation of coverage measurements for code with ifdef #338

Closed
peter-toft-greve opened this issue Nov 6, 2019 · 6 comments
Closed

Aggregation of coverage measurements for code with ifdef #338

peter-toft-greve opened this issue Nov 6, 2019 · 6 comments

Comments

@peter-toft-greve
Copy link

I have tried to raise a question on how to aggregate coverage measures for code with ifdef
in https://stackoverflow.com/questions/58632496/how-to-get-100-coverage-with-gcovr-with-ifdef-code
Basically - how can I summarize or aggregate test results from my code when tested with different
compile options. I cannot make this work.

I guess that I probably should have asked here directly.
If answered I will cross-answer the stackoverflow my self.

@latk
Copy link
Member

latk commented Nov 6, 2019 via email

@peter-toft-greve
Copy link
Author

@latk This sounds brilliant. Will test as the first thing tomorrow morning. Thanx a mil. More to follow :)

@peter-toft-greve
Copy link
Author

peter-toft-greve commented Nov 7, 2019

@latk This is a PURE homerun - thanx a mil!!
I will answer on StackOverflow and credit you (+reference the documentation)

For sake of completeness - I take it that this cannot be done prior to gcovr 4.2?

(and we can close this now)

@latk
Copy link
Member

latk commented Nov 7, 2019

Thank you. Yes, the necessary features (JSON output, merging) were first released with gcovr 4.2.

@peter-toft-greve
Copy link
Author

peter-toft-greve commented Nov 7, 2019

@latk One suggestion for further updates; that
gcovr --add-tracefile <wildcard_pattern>
e.g.
gcovr --add-tracefile run-*.json
is supported - to avoid to naming the *json files

With run-1,json and run-2.json as output (cf. https://gcovr.com/en/stable/guide.html#combining-tracefiles) it seems that with gcovr 4.2 I do have to use two --add-tracefile options.

@peter-toft-greve
Copy link
Author

@latk as promised > I have updated https://stackoverflow.com/questions/58632496/ and credited you. THANX!!!

CezaryGapinski added a commit to CezaryGapinski/gcovr that referenced this issue Feb 15, 2020
CezaryGapinski added a commit to CezaryGapinski/gcovr that referenced this issue Feb 15, 2020
CezaryGapinski added a commit to CezaryGapinski/gcovr that referenced this issue Feb 15, 2020
CezaryGapinski added a commit to CezaryGapinski/gcovr that referenced this issue Feb 15, 2020
CezaryGapinski added a commit to CezaryGapinski/gcovr that referenced this issue Feb 15, 2020
CezaryGapinski added a commit to CezaryGapinski/gcovr that referenced this issue Feb 15, 2020
CezaryGapinski added a commit to CezaryGapinski/gcovr that referenced this issue Feb 15, 2020
CezaryGapinski added a commit to CezaryGapinski/gcovr that referenced this issue Feb 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants