Skip to content

Commit 906c115

Browse files
committed
Try to collect coverage with Bazel BWOB
Signed-off-by: Vihang Mehta <vihang@gimletlabs.ai>
1 parent 2711c9f commit 906c115

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

.bazelrc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ build --remote_download_minimal
2020
test --remote_download_minimal
2121
run --remote_download_outputs=all
2222
coverage --build_runfile_links
23+
coverage --nocache_test_results
2324

2425
# Needed by rules_meta.
2526
# Follow https://github.com/fmeum/rules_meta/issues/1#issuecomment-1255828109
@@ -269,3 +270,4 @@ build:remote --build_metadata=VISIBILITY=PUBLIC
269270
coverage:remote --strategy=CoverageReport=local,remote
270271
coverage:remote --experimental_fetch_all_coverage_outputs
271272
coverage:remote --experimental_split_coverage_postprocessing
273+
coverage:remote --experimental_remote_download_regex=.*/(coverage.dat$|_coverage/_coverage_report.dat$)

ci/collect_coverage.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,12 +138,13 @@ check_config
138138
# Print config parameters.
139139
print_config
140140

141-
lcov_opts=(--rc lcov_branch_coverage=1)
141+
# TODO: Try to track down the negative coverage issue.
142+
lcov_opts=(--rc branch_coverage=1 --ignore-errors negative)
142143

143144
cd $(bazel info workspace)
144145

145146
# Get coverage from bazel targets.
146-
bazel coverage --remote_download_outputs=all --combined_report=lcov //src/...
147+
bazel coverage --combined_report=lcov //src/...
147148

148149
# Copy the output file
149150
cp --no-preserve=mode "$(bazel info output_path)/_coverage/_coverage_report.dat" ${COVERAGE_FILE}

0 commit comments

Comments
 (0)