aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java
diff options
context:
space:
mode:
authorGravatar ulfjack <ulfjack@google.com>2017-06-08 17:10:06 +0200
committerGravatar Jakob Buchgraber <buchgr@google.com>2017-06-09 10:22:46 +0200
commit5a3b24c68ed80b3724e0d52b4bdcc6ec72bdc605 (patch)
tree3bae54d8bd3934e9f4fa2de170b5ca86ae671c2f /src/main/java
parent159c1e3467e757d0fb586c4f782dd916f042f255 (diff)
Split workspace-specific tests out of BlazeRuntimeTest
This creates a new class BlazeWorkspaceTest, and removes the initCommand method from BlazeRuntime. PiperOrigin-RevId: 158396032
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/com/google/devtools/build/lib/runtime/BlazeRuntime.java13
1 files changed, 2 insertions, 11 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/runtime/BlazeRuntime.java b/src/main/java/com/google/devtools/build/lib/runtime/BlazeRuntime.java
index 10812a4c01..f09843f691 100644
--- a/src/main/java/com/google/devtools/build/lib/runtime/BlazeRuntime.java
+++ b/src/main/java/com/google/devtools/build/lib/runtime/BlazeRuntime.java
@@ -194,7 +194,7 @@ public final class BlazeRuntime {
this.pathToUriConverter = pathToUriConverter;
}
- public void initWorkspace(BlazeDirectories directories, BinTools binTools)
+ public BlazeWorkspace initWorkspace(BlazeDirectories directories, BinTools binTools)
throws AbruptExitException {
Preconditions.checkState(this.workspace == null);
WorkspaceBuilder builder = new WorkspaceBuilder(directories, binTools);
@@ -203,6 +203,7 @@ public final class BlazeRuntime {
}
this.workspace = builder.build(
this, packageFactory, ruleClassProvider, getProductName(), eventBusExceptionHandler);
+ return workspace;
}
@Nullable public CoverageReportActionFactory getCoverageReportActionFactory(
@@ -239,16 +240,6 @@ public final class BlazeRuntime {
}
}
- /**
- * Initializes a CommandEnvironment to execute a command in this server.
- *
- * <p>This method should be called from the "main" thread on which the command will execute;
- * that thread will receive interruptions if a module requests an early exit.
- */
- public CommandEnvironment initCommand() {
- return workspace.initCommand();
- }
-
@Nullable
public InvocationPolicy getModuleInvocationPolicy() {
return moduleInvocationPolicy;