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

Local coverage reporting #13

Closed
springmeyer opened this issue Jul 2, 2017 · 2 comments
Closed

Local coverage reporting #13

springmeyer opened this issue Jul 2, 2017 · 2 comments

Comments

@springmeyer
Copy link
Contributor

Context

  • Adding tests as you develop code is critical.
  • Being able to see the coverage of those tests is instrumental to knowing what tests are missing and to feeling motivated to write tests.
  • Being able to get quick feedback on coverage locally (rather than waiting for travis + codecov) can be a huge productivity boost for writing tests to achieve more coverage

Solution

https://github.com/mapbox/cpp#code-coverage describes how to use clang++ and llvm-cov to instrument the code and view code coverage locally.

For the best results this requires:

  • llvm-cov 4.0.0
  • the same version of clang++ as llvm-cov to compile the code (so also clang++ 4.0.0)

https://github.com/mapbox/node-cpp-skel/blob/master/scripts/coverage.sh is an example of scripting the recompile of code and automatic reporting of coverage.

@springmeyer
Copy link
Contributor Author

springmeyer commented Aug 23, 2017

This depends on #12 being in place, since having the environment from setup.sh available greatly simplifies the coverage.sh script.

springmeyer pushed a commit that referenced this issue Aug 23, 2017
springmeyer pushed a commit that referenced this issue Aug 24, 2017
springmeyer pushed a commit that referenced this issue Aug 24, 2017
address #12 and #13

add back cxxflags
springmeyer pushed a commit that referenced this issue Aug 24, 2017
@springmeyer
Copy link
Contributor Author

Solved by #27

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

1 participant