Split workspace-specific tests out of BlazeRuntimeTest This creates a new class BlazeWorkspaceTest, and removes the initCommand method from BlazeRuntime. PiperOrigin-RevId: 158396032
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 10812a4..f09843f 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 @@ 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 @@ } this.workspace = builder.build( this, packageFactory, ruleClassProvider, getProductName(), eventBusExceptionHandler); + return workspace; } @Nullable public CoverageReportActionFactory getCoverageReportActionFactory( @@ -239,16 +240,6 @@ } } - /** - * 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;