diff options
author | ulfjack <ulfjack@google.com> | 2017-06-06 08:33:40 -0400 |
---|---|---|
committer | John Cater <jcater@google.com> | 2017-06-06 09:51:12 -0400 |
commit | f3753580583ab025eceaaf2b76e61b7b99be2e39 (patch) | |
tree | 5fa1c5e6fce2029ff71f5713f8783f469ceae5ff /src/main/java/com/google/devtools/build/lib/runtime/BlazeCommand.java | |
parent | 24e3d7a387f9e15733b01fe09e2cb03f18f8c271 (diff) |
Move the instrumentation filter computation to BuildTool
Previously, it was in CoverageCommand, which led to all sorts of special casing
and workarounds, because it required options editing, error handling during
options editing, as well as early package path setup. It also caused us to
duplicate target pattern evaluation for the coverage command.
A semantic change is that the TestCommand can now also trigger the heuristic
instrumentation filter computation, if collect_code_coverage is enabled; we
might consider also enabling this for the BuildCommand, which can also have
collect_code_coverage enabled (e.g., when a user wants to build a non-test
binary with coverage instrumentation).
Also remove a bunch of unnecessary AbruptExitException declarations.
RELNOTES: bazel test now also computes a default instrumentation filter if --collect_code_coverage is enabled
PiperOrigin-RevId: 158129953
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/runtime/BlazeCommand.java')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/runtime/BlazeCommand.java | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/runtime/BlazeCommand.java b/src/main/java/com/google/devtools/build/lib/runtime/BlazeCommand.java index 6be7ae1afe..c1f3fd094e 100644 --- a/src/main/java/com/google/devtools/build/lib/runtime/BlazeCommand.java +++ b/src/main/java/com/google/devtools/build/lib/runtime/BlazeCommand.java @@ -13,7 +13,6 @@ // limitations under the License. package com.google.devtools.build.lib.runtime; -import com.google.devtools.build.lib.util.AbruptExitException; import com.google.devtools.build.lib.util.ExitCode; import com.google.devtools.common.options.OptionsParser; import com.google.devtools.common.options.OptionsProvider; @@ -52,8 +51,6 @@ public interface BlazeCommand { * * @param env the command environment of the currently running command * @param optionsParser the options parser for the current command - * - * @throws AbruptExitException if something went wrong */ - void editOptions(CommandEnvironment env, OptionsParser optionsParser) throws AbruptExitException; + void editOptions(CommandEnvironment env, OptionsParser optionsParser); } |