Skip to content

Commit

Permalink
Delegate coverage tools to @remote_coverage_tools
Browse files Browse the repository at this point in the history
Requires:
 - bazelbuild#10379 is merged
 - a new remote coverage tools zip pushed
 - coverage.WORKSPACE updated to the new tools

This changes the @bazel_tools//tools/test/BUILD file to fully delegate to the @remote_coverage_tools repository, which must contain rules for :lcov_merger and :coverage_report_generator.

This makes the @remote_coverage_tools reference self-contained, which allows overriding the tools using --override_repository, and allows independently replacing or fixing them.

Progress on bazelbuild#4685.

Change-Id: I321c62332f00d910f4ccfb3244d63e60627d59ad
  • Loading branch information
ulfjack committed Dec 7, 2019
1 parent ba0a4ba commit a79bff1
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 26 deletions.
Expand Up @@ -104,7 +104,7 @@ public static LabelLateBoundDefault<TestConfiguration> coverageSupportAttribute(
"//tools/test:coverage_report_generator";

private static final String DEFAULT_COVERAGE_OUTPUT_GENERATOR_VALUE =
"@bazel_tools//tools/test/CoverageOutputGenerator/java/com/google/devtools/coverageoutputgenerator:Main";
"@bazel_tools//tools/test:lcov_merger";

@AutoCodec
static final Resolver<TestConfiguration, Label> COVERAGE_REPORT_GENERATOR_CONFIGURATION_RESOLVER =
Expand Down
1 change: 0 additions & 1 deletion tools/BUILD
Expand Up @@ -61,7 +61,6 @@ filegroup(
"//tools/python:embedded_tools",
"//tools/runfiles:embedded_tools",
"//tools/test:embedded_tools",
"//tools/test/CoverageOutputGenerator/java/com/google/devtools/coverageoutputgenerator:embedded_tools",
"//tools/osx/crosstool:srcs",
"//tools/osx:srcs",
"//tools/sh:embedded_tools",
Expand Down
9 changes: 7 additions & 2 deletions tools/test/BUILD.tools
Expand Up @@ -33,9 +33,14 @@ filegroup(
srcs = ["collect_coverage.sh"],
)

filegroup(
alias(
name = "coverage_report_generator",
srcs = ["@bazel_tools//tools/test/CoverageOutputGenerator/java/com/google/devtools/coverageoutputgenerator:Main"],
actual = "@remote_coverage_tools//:coverage_report_generator",
)

alias(
name = "lcov_merger",
actual = "@remote_coverage_tools//:lcov_merger",
)

filegroup(
Expand Down
Expand Up @@ -170,11 +170,3 @@ filegroup(
srcs = glob(["**"]),
visibility = ["//visibility:public"],
)

filegroup(
name = "embedded_tools",
srcs = [
"BUILD.tools",
],
visibility = ["//visibility:public"],
)

This file was deleted.

0 comments on commit a79bff1

Please sign in to comment.