-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Switch coverage from gcov to lcov #1000
Comments
Sweet. This would also resolve #858 |
Now we just need to find someone enthusiastic enough to enter the Bazel coverage vortex of doom. Count me in as a P2 if there is no such volunteer. |
This would also probably have the nice side effect that we wouldn't need to be forcing gcovr 3.3, which isn't standard in Ubuntu 14.04. |
Frankly, I think someone from the Bazel team should enter their own vortex of doom and deal with this so they can "eat their own dogfood." |
So, one issue we have today in a non-CI setting is that the clang runs actually fail silently, with the only symptom a 0.00 coverage results and empty coverage HTML for the Envoy sources. It looks like under the hood that gcov segfaults, gcovr hides it. I'm going to make some doc and add some |
clang isn't compatible with gcov (see envoyproxy#858). We plan to switch to lcov in the future (see envoyproxy#1000). For now, just make sure we fail visibly and document.
I have a build with have lcov "working" (horribly hackery generating HTML reports) but it currently claims we don't have coverage for a whole bunch of trailing braces despite a number of attempts to minimize code optimization. As far I can tell is a known issue with clang and lcov and you "fix" by using coverage annotations to functionally comment out all of the optimized end braces We could go and dehackify my scripts and // LCOV_EXCL_LINE a bunch of end braces, or we can stick with gcov. I lean towards the latter because while a one-off LCOV_EXCL_LINE sweep isn't bad, the annoyance of dealing with it for incremental code changes makes me want to stick with gcov until lcov is more aggressive about identifying these correctly. @mattklein123 thoughts? |
@alyssawilk yeah I agree. Now that we have the ability to easily generate coverage for people as part of CI, it seems this is less urgent. Perhaps we can just leave this issues open for tracking and wait for clang/lcov/bazel to fix this properly? |
SGTM. My horrible horrible horrible hacks documented for posterity over in #1800 Basically:
Look at /tmp/envoy-docker-build/tmp/_bazel_bazel/your_hash_here/output/index.html |
This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged "help wanted" or other activity occurs. Thank you for your contributions. |
This issue has been automatically closed because it has not had activity in the last 37 days. If this issue is still valid, please ping a maintainer and ask them to label it as "help wanted". Thank you for your contributions. |
These are specified in the Kotlin interface, but not in Swift. They'll be wired up separately. Signed-off-by: Michael Rebello <me@michaelrebello.com> Signed-off-by: JP Simard <jp@jpsim.com>
These are specified in the Kotlin interface, but not in Swift. They'll be wired up separately. Signed-off-by: Michael Rebello <me@michaelrebello.com> Signed-off-by: JP Simard <jp@jpsim.com>
We need this for two reasons:
clang coverage.
Excluding lines such as
NOT_IMPLEMENTED
andNOT_REACHED
.We know
lcov
is really slow from bazelbuild/bazel#1118, but since we use a single test binary it shouldn't be too bad, maybe a couple of minutes for the test (vs. 30 mins + when running with all the tests producing individual lcov reports).The text was updated successfully, but these errors were encountered: