From 80c37d7eb69b3cc7b837a7f8330edb193e749362 Mon Sep 17 00:00:00 2001 From: Sara Adams <4410333+saraadams@users.noreply.github.com> Date: Mon, 8 Jan 2024 09:52:38 +0100 Subject: [PATCH] Add .bazelrc entries for running `bazel coverage` (#168) Contributes to #167 Signed-off-by: Sara Adams --- .bazelrc | 8 ++++++++ MODULE.bazel.lock | 20 ++++++++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/.bazelrc b/.bazelrc index 4d6959e..c4aa067 100644 --- a/.bazelrc +++ b/.bazelrc @@ -1,6 +1,14 @@ common --enable_platform_specific_config common --experimental_announce_profile_path +coverage --combined_report=lcov +# These are required to make coverage work. +coverage --experimental_fetch_all_coverage_outputs +coverage --experimental_split_coverage_postprocessing +# The Coverage report generator can't run remotely because it's missing some +# RE platform options (especially containerImage). +coverage --strategy=CoverageReport=local + build --explicit_java_test_deps build --nostamp build --incompatible_strict_action_env diff --git a/MODULE.bazel.lock b/MODULE.bazel.lock index f8ffbbc..a38b253 100644 --- a/MODULE.bazel.lock +++ b/MODULE.bazel.lock @@ -1102,6 +1102,26 @@ } } }, + "@@bazel_tools//tools/test:extensions.bzl%remote_coverage_tools_extension": { + "general": { + "bzlTransitiveDigest": "cizrA62cv8WUgb0cCmx5B6PRijtr/I4TAWxg/4caNGU=", + "accumulatedFileDigests": {}, + "envVariables": {}, + "generatedRepoSpecs": { + "remote_coverage_tools": { + "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", + "ruleClassName": "http_archive", + "attributes": { + "name": "bazel_tools~remote_coverage_tools_extension~remote_coverage_tools", + "sha256": "7006375f6756819b7013ca875eab70a541cf7d89142d9c511ed78ea4fefa38af", + "urls": [ + "https://mirror.bazel.build/bazel_coverage_output_generator/releases/coverage_output_generator-v2.6.zip" + ] + } + } + } + } + }, "@@buildifier_prebuilt~6.3.3//:defs.bzl%buildifier_prebuilt_deps_extension": { "general": { "bzlTransitiveDigest": "hxFr9Y+nZmWympflJ/60YOO2NVcYQSkk9F3wM5Qr17Y=",