-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Make the llvm coverage tests a little more robust. #24624
Conversation
Check that the actual coverage data simply contains the expected coverage data, rather than checking for an exact match. This matters for when we start to process baseline coverage, which may result in header files getting included in the report. This is in-keeping with the other coverage tests. Also adds the branch data into the reports - this is never disabled when using LLVM so we should check it.
3d9be41
to
4b385b6
Compare
Can header files not provide coverage data for regular coverage, e.g. via macros? |
There are cases where header files should produce coverage (e.g. templates), just not in these test cases. However, I seem to remember having issues with LLVM and coverage for header files that results in them either not being generated or not ending up in the final report. |
I've added a test to check that we do get coverage for header files that actually contribute something. It seems that LLVM omits files that contribute nothing (headers that only contain declarations), which conflicts somewhat with our current baseline coverage implementation. |
I'll be doing the import myself. |
@bazel-io flag 8.1.0 |
@bazel-io fork 8.1.0 |
Check that the actual coverage data simply contains the expected coverage data, rather
than checking for an exact match. This matters for when we start to process baseline
coverage, which may result in header files getting included in the report. This is
in-keeping with the other coverage tests.
Also adds the branch data into the reports, which we will check when we're using an LLVM
version that supports branch coverage, and a test that checks header files that include
coverage data are actually included in the final report.
Required for #24593