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

add/fix support for bazel coverage #151

Merged
merged 5 commits into from
Oct 11, 2023
Merged

Conversation

tobithiel
Copy link
Contributor

Type of change

bazel coverage <...> with C/C++ targets was not working because the gcov binary was not included in the runfiles. This was showing as a silent failure as an empty coverage report. The test log contains:

GCov does not exist at the given path: 'external/gcc_toolchain_x86_64/bin/gcov'

Test plan

  • Manual testing with
$ bazel coverage --instrument_test_targets --combined_report=lcov //examples/hello_world_cpp:hello_world_cpp_test
$ genhtml --output genhtml "$(bazel info output_path)//_coverage/_coverage_report.dat"

@CLAassistant
Copy link

CLAassistant commented Sep 27, 2023

CLA assistant check
All committers have signed the CLA.

@f0rmiga
Copy link
Owner

f0rmiga commented Sep 28, 2023

Thanks for this! I think it makes sense to change one of the CI targets to call bazel coverage instead of bazel test. I can do it after we merge this, no problem.

@tobithiel
Copy link
Contributor Author

Thanks for this! I think it makes sense to change one of the CI targets to call bazel coverage instead of bazel test. I can do it after we merge this, no problem.

No problem, thanks for the project. I gave it a try, but I can't really test it since I'm not sure how to actually trigger CI (or don't have permissions to). So feel free to revert and do it differently.

@f0rmiga
Copy link
Owner

f0rmiga commented Sep 29, 2023

I'll get to it today.

@tobithiel
Copy link
Contributor Author

@f0rmiga Could you take another look please when you have some time? I merged in main to resolve the conflicts and use the new CI stuff.

@f0rmiga
Copy link
Owner

f0rmiga commented Oct 11, 2023

Awesome, thanks!

@f0rmiga f0rmiga merged commit e2a3469 into f0rmiga:main Oct 11, 2023
11 checks passed
@tobithiel tobithiel deleted the coverage_support branch October 11, 2023 04:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants