Skip to content

coverage: use lcov to merge multi-binary coverage report#10909

Merged
lizan merged 18 commits intoenvoyproxy:masterfrom
lizan:multi_binary_coverage
May 15, 2020
Merged

coverage: use lcov to merge multi-binary coverage report#10909
lizan merged 18 commits intoenvoyproxy:masterfrom
lizan:multi_binary_coverage

Conversation

@lizan
Copy link
Copy Markdown
Member

@lizan lizan commented Apr 22, 2020

Description:
Use bazel lcov merger to merge coverage generated by llvm-cov export from multiple binary run. This improves coverage test stability by run them in separate sandbox.

Risk Level: Low (test only)
Testing: CI
Docs Changes: N/A
Release Notes: N/A

lizan added 6 commits April 22, 2020 22:56
Signed-off-by: Lizan Zhou <lizan@tetrate.io>
Signed-off-by: Lizan Zhou <lizan@tetrate.io>
Signed-off-by: Lizan Zhou <lizan@tetrate.io>
Signed-off-by: Lizan Zhou <lizan@tetrate.io>
Signed-off-by: Lizan Zhou <lizan@tetrate.io>
Signed-off-by: Lizan Zhou <lizan@tetrate.io>
@stale
Copy link
Copy Markdown

stale bot commented May 1, 2020

This pull request has been automatically marked as stale because it has not had activity in the last 7 days. It will be closed in 7 days if no further activity occurs. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions!

@stale stale bot added the stale stalebot believes this issue/PR has not been touched recently label May 1, 2020
…rage

Signed-off-by: Lizan Zhou <lizan@tetrate.io>
@stale stale bot removed the stale stalebot believes this issue/PR has not been touched recently label May 5, 2020
…rage

Signed-off-by: Lizan Zhou <lizan@tetrate.io>
lizan added 2 commits May 11, 2020 00:57
Signed-off-by: Lizan Zhou <lizan@tetrate.io>
Signed-off-by: Lizan Zhou <lizan@tetrate.io>
lizan added 2 commits May 11, 2020 08:03
Signed-off-by: Lizan Zhou <lizan@tetrate.io>
…rage

Signed-off-by: Lizan Zhou <lizan@tetrate.io>
@lizan lizan marked this pull request as ready for review May 12, 2020 00:12
@lizan lizan requested a review from asraa May 12, 2020 00:12
Signed-off-by: Lizan Zhou <lizan@tetrate.io>
@lizan
Copy link
Copy Markdown
Member Author

lizan commented May 12, 2020

@asraa PTAL but I think this effectively reverted #10289, will see if I can bring it back.

lizan added 2 commits May 13, 2020 06:31
…rage

Signed-off-by: Lizan Zhou <lizan@tetrate.io>
Signed-off-by: Lizan Zhou <lizan@tetrate.io>
@lizan
Copy link
Copy Markdown
Member Author

lizan commented May 13, 2020

@asraa @htuch I brought fuzz back and this is ready for review.

@lizan lizan force-pushed the multi_binary_coverage branch from d3222fb to 7dc3d6b Compare May 13, 2020 10:51
Signed-off-by: Lizan Zhou <lizan@tetrate.io>
Copy link
Copy Markdown
Contributor

@asraa asraa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you so much! The fuzz wrapper is unbelievably clean, TIL about --run_under.

Will look into stat merger fuzzing issue discussed offline https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=21460

Signed-off-by: Lizan Zhou <lizan@tetrate.io>
Signed-off-by: Lizan Zhou <lizan@tetrate.io>
@lizan lizan merged commit 7a28514 into envoyproxy:master May 15, 2020
@lizan lizan deleted the multi_binary_coverage branch May 15, 2020 02:37
bazel-io pushed a commit to bazelbuild/bazel that referenced this pull request Oct 21, 2020
Support for coverage with clang in Bazel was half working because the report produced was in a binary format and it wasn't be utilized by the LCOV merger and therefore didn't show up in the final LCOV report.

This CL uses llvm-cov as was used by Envoy in envoyproxy/envoy#10909 to produce an LCOV report.

To run this the following environment variable and build flags are needed:
BAZEL_USE_LLVM_NATIVE_COVERAGE=1 GCOV={path to llvm_profdata} CC=clang \
    BAZEL_LLVM_COV={path to llvm_cov} bazel coverage --experimental_generate_llvm_lcov
PiperOrigin-RevId: 338254344
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

Successfully merging this pull request may close these issues.

2 participants