aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar Googler <noreply@google.com>2016-09-19 19:43:42 +0000
committerGravatar Laszlo Csomor <laszlocsomor@google.com>2016-09-20 06:46:06 +0000
commit6b70be2bc422e9fc4d4f1a4f662a42d9f1c79878 (patch)
tree54b2285cf900708dd84bbb5fdec1f5b19d5581d6 /src
parent41cf7809b5a95b9ed5fed25221cad073e1ec472d (diff)
Change default of --[no]instrument_test_targets to false
Also change --instrumentation_filter defaults to not exclude targets whose names end with "_test" or "Tests", preferring instead to exclude only the direct sources of test rules by default, regardless of name. The javatests directory is still excluded. (That default is tweaked to exclude only targets somewhere below a directory named javatests, instead of any target containing "javatests" as a substring.) RELNOTES: Change default of --[no]instrument_test_targets to false, change default --instrumentation_filter (which previously tried to exclude test targets by heuristic) to only exclude targets in javatests. -- MOS_MIGRATED_REVID=133618501
Diffstat (limited to 'src')
-rw-r--r--src/main/java/com/google/devtools/build/lib/analysis/config/BuildConfiguration.java13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/analysis/config/BuildConfiguration.java b/src/main/java/com/google/devtools/build/lib/analysis/config/BuildConfiguration.java
index 640cb13887..df9d7666b3 100644
--- a/src/main/java/com/google/devtools/build/lib/analysis/config/BuildConfiguration.java
+++ b/src/main/java/com/google/devtools/build/lib/analysis/config/BuildConfiguration.java
@@ -524,21 +524,20 @@ public final class BuildConfiguration {
// CoverageCommand.setDefaultInstrumentationFilter()
@Option(name = "instrumentation_filter",
converter = RegexFilter.RegexFilterConverter.class,
- defaultValue = "-javatests,-_test$,-Tests$",
+ defaultValue = "-/javatests[/:]",
category = "semantics",
help = "When coverage is enabled, only rules with names included by the "
+ "specified regex-based filter will be instrumented. Rules prefixed "
- + "with '-' are excluded instead. By default, rules containing "
- + "'javatests' or ending with '_test' will not be instrumented.")
+ + "with '-' are excluded instead. Note that only non-test rules are "
+ + "instrumented unless --instrument_test_targets is enabled.")
public RegexFilter instrumentationFilter;
@Option(name = "instrument_test_targets",
- defaultValue = "true",
+ defaultValue = "false",
category = "semantics",
help = "When coverage is enabled, specifies whether to consider instrumenting test rules. "
- + "When true (the default), test rules included by --instrumentation_filter are "
- + "instrumented. When false, test rules are always excluded from coverage "
- + "instrumentation.")
+ + "When set, test rules included by --instrumentation_filter are instrumented. "
+ + "Otherwise, test rules are always excluded from coverage instrumentation.")
public boolean instrumentTestTargets;
@Option(name = "show_cached_analysis_results",