-
Notifications
You must be signed in to change notification settings - Fork 127
Add GCOV / LCOV C coverage support #7
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
Conversation
9ff8616
to
88e5a70
Compare
Makefile
Outdated
lcov-open: $(LCOV_REPORT) | ||
xdg-open $(LCOV_REPORT)/index.html | ||
|
||
lcov: lcov-clean lcov-coverage lcov-report |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think make guarantees the order in which it builds dependencies (especially with parallel builds – I have make
aliased to make -j4
).
IMO it should be something like:
lcov: lcov-clean
$(MAKE) lcov-coverage
$(MAKE) lcov-report
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the makefile has .NOTPARALLEL:
to disable all parallel builds. But I can change the code.
.travis.yml
Outdated
- python: 2.7 | ||
env: | ||
- TOXENV=py27 | ||
- WITH_GCOV=1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is WITH_GCOV
necessary here? It's specified in tox.ini
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, passenv only passes through existing variables, right? In that case I guess it's fine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tox.ini has passenv = WITH_GCOV
. It does not set WITH_GCOV
but let tox pass the env vars through. By default tox unsets most env vars.
Makefile
Outdated
@@ -9,3 +14,26 @@ clean: | |||
rm -f .coverage .coverage.* | |||
find . -name '*.py[co]' -or -name '*.so*' -or -name '*.dylib' -delete | |||
find . -depth -name __pycache__ -exec rm -rf {} \; | |||
|
|||
# LCOV report |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will send anyone unfamiliar LCOV
to Google. Can you note what this is? e.g. # LCOV report (measuring test coverage for C code)
Signed-off-by: Christian Heimes <cheimes@redhat.com>
I found a way to simplify the config. Does this look good to you? (Sorry for the mess I made when pushing it to this PR) |
Codecov Report
|
ACK We can move to matrix configuration later in order to run CI for linters and documentation. UPDATE: There is a typo in setup.py: |
Signed-off-by: Christian Heimes cheimes@redhat.com