Skip to content

Commit

Permalink
Enable coverage job in CI for RBE
Browse files Browse the repository at this point in the history
  • Loading branch information
UebelAndre committed Dec 17, 2023
1 parent 346ade2 commit ddef461
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .bazelci/presubmit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ tasks:
- sed -i 's/^# rbe_preconfig/rbe_preconfig/' WORKSPACE.bazel
build_targets: *default_linux_targets
test_targets: *default_linux_targets
coverage_targets: *default_linux_targets
post_shell_commands: *coverage_validation_post_shell_commands
macos:
build_targets: *default_macos_targets
test_targets: *default_macos_targets
Expand Down Expand Up @@ -122,6 +124,8 @@ tasks:
build_flags: *aspects_flags
build_targets: *default_linux_targets
test_targets: *default_linux_targets
coverage_targets: *default_linux_targets
post_shell_commands: *coverage_validation_post_shell_commands
rbe_ubuntu2004_rolling_with_aspects:
name: RBE Rolling Bazel Version With Aspects
platform: rbe_ubuntu2004
Expand All @@ -130,6 +134,8 @@ tasks:
- sed -i 's/^# rbe_preconfig/rbe_preconfig/' WORKSPACE.bazel
build_targets: *default_linux_targets
test_targets: *default_linux_targets
coverage_targets: *default_linux_targets
post_shell_commands: *coverage_validation_post_shell_commands
build_flags: *aspects_flags
soft_fail: yes
bazel: "rolling"
Expand Down
5 changes: 5 additions & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ coverage --combined_report=lcov
# Avoid fully cached builds reporting no coverage and failing CI
# https://bazel.build/reference/command-line-reference#flag--experimental_fetch_all_coverage_outputs
coverage --experimental_fetch_all_coverage_outputs
coverage --experimental_split_coverage_postprocessing
coverage --remote_download_toplevel
coverage --test_env=VERBOSE_COVERAGE=1
coverage --test_env=RUST_BACKTRACE=1
coverage --test_output=errors

###############################################################################
## Unique configuration groups
Expand Down
2 changes: 1 addition & 1 deletion rust/settings/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ bool_flag(
# reporting tools like `llvm-cov` and `llvm-profdata` as runfiles to each test.
bool_flag(
name = "experimental_use_coverage_metadata_files",
build_setting_default = False,
build_setting_default = True,
)

# A flag to set rustc --sysroot flag to the sysroot generated by rust_toolchain
Expand Down

0 comments on commit ddef461

Please sign in to comment.