aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main/java/com/google/devtools/build/lib/buildtool/ExecutionTool.java17
1 files changed, 7 insertions, 10 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/buildtool/ExecutionTool.java b/src/main/java/com/google/devtools/build/lib/buildtool/ExecutionTool.java
index 9fb061587a..a07fb9de73 100644
--- a/src/main/java/com/google/devtools/build/lib/buildtool/ExecutionTool.java
+++ b/src/main/java/com/google/devtools/build/lib/buildtool/ExecutionTool.java
@@ -249,17 +249,14 @@ public class ExecutionTool {
}
}
- // If tests are to be run during build, too, we have to explicitly load the test action context.
- if (request.shouldRunTests()) {
- String testStrategyValue = request.getOptions(ExecutionOptions.class).testStrategy;
- ActionContext context = strategyConverter.getStrategy(TestActionContext.class,
- testStrategyValue);
- if (context == null) {
- throw makeExceptionForInvalidStrategyValue(testStrategyValue, "test",
- strategyConverter.getValidValues(TestActionContext.class));
- }
- strategies.add(context);
+ String testStrategyValue = request.getOptions(ExecutionOptions.class).testStrategy;
+ ActionContext context = strategyConverter.getStrategy(TestActionContext.class,
+ testStrategyValue);
+ if (context == null) {
+ throw makeExceptionForInvalidStrategyValue(testStrategyValue, "test",
+ strategyConverter.getValidValues(TestActionContext.class));
}
+ strategies.add(context);
}
private static ImmutableList<ActionContextConsumer> getActionContextConsumersFromModules(