Skip to content

Commit

Permalink
Define Bazel coverage config
Browse files Browse the repository at this point in the history
Define configuration options for collecting coverage data with Bazel.

The coverage command for Bazel is fairly fragile and many configurations
do not work [1,2]. The `--javabase` option is set as suggested in this
bug report[3]. Coverage has been manually tested with GCC 7 on Ubuntu
18.04.

[1]: bazelbuild/bazel#9406
[2]: bazelbuild/bazel#10457
[3]: bazelbuild/bazel#7953
  • Loading branch information
oliverlee committed Nov 21, 2020
1 parent 8d99351 commit fb45ffe
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,9 @@ test --build_tests_only
test --test_output=errors
test --test_summary=detailed
test --action_env='GTEST_COLOR=1'

coverage -c dbg
coverage --instrumentation_filter=''
coverage --javabase=@bazel_tools//tools/jdk:remote_jdk11
coverage --combined_report=lcov
coverage --coverage_report_generator=@bazel_tools//tools/test/CoverageOutputGenerator/java/com/google/devtools/coverageoutputgenerator:Main

0 comments on commit fb45ffe

Please sign in to comment.