Increase C++ code coverage
See original GitHub issueCoverage of the C++ code should be achievable with gcov
, as pointed out by @cmarqu on gitter.
I got something rudimentary using python setup.py develop
with conda/GCC, using these extra args for compiling and linking:
["--coverage", "-fprofile-arcs", "-ftest-coverage"]
.
The libraries are built in place so the *.gcno
and *.gcda
files show up in the repo, and after running some of the tests I was able to generate some *.gcov
files with coverage results.
I’m not sure how any of this would translate to our CI builds though. codecov supports C++11: https://docs.codecov.io/docs/supported-languages
_Originally posted by @garmin-mjames in https://github.com/cocotb/cocotb/issues/1962#issuecomment-694673986_
Issue Analytics
- State:
- Created 3 years ago
- Comments:9 (9 by maintainers)
Top Results From Across the Web
Improving Test Coverage - Semantic Designs
The usual way to increase covered code answer is "code more tests" that exercise additional code. To minimize test coding effort, you want...
Read more >Increase & Achieve Code Coverage - Unit Test Assistant
As you progress through the unit testing journey, you'll want to ensure that you are filling in code coverage gaps and delivering great ......
Read more >9 Best Code Coverage Tools for Java, Python, C, C++, C#, .NET
Code Coverage Tools: Cobertura ✔️ Coverage.py ✔️ JaCoCo ✔️ OpenClover ... It helps you to tests to create to increase coverage.
Read more >Code coverage testing - Visual Studio (Windows)
Starting in Visual Studio 2022 Update 2, you can enable faster code coverage test results by selecting Tools > Options > Environment >...
Read more >asp.net mvc - How to increase Code coverage for pre-defined ...
I have to write unit test case and increase the code coverage for a pre written controller. using System.Collections.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The solution with ccache mentioned here may help: https://gcovr.com/en/stable/cookbook.html#how-to-collect-coverage-for-c-extensions-in-python
@cmarqu Can this be closed?