aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test/java/com/google/devtools/build/lib/runtime
diff options
context:
space:
mode:
authorGravatar Klaus Aehlig <aehlig@google.com>2018-02-27 05:47:21 -0800
committerGravatar Copybara-Service <copybara-piper@google.com>2018-02-27 05:48:54 -0800
commitc2499c406d0727853ea0ddc5372a50be95de5515 (patch)
tree16a06cfd31ae66c6a32155071b8dfc3d8a8b090d /src/test/java/com/google/devtools/build/lib/runtime
parent4c763e8ff61884952953b7bca8793796f282cdc0 (diff)
Expose --output_user_base to the Bazel server process
...so that it can use that path to compute other directories in the output user base, in particular the default location for caches. The first cache we will add is the hash-index cache for downloads of external archives, but a spawn cache might be added later in the output user base as well. Change-Id: I24b1c33235c8f76ec008ecb1789163de2b2a45be PiperOrigin-RevId: 187164275
Diffstat (limited to 'src/test/java/com/google/devtools/build/lib/runtime')
-rw-r--r--src/test/java/com/google/devtools/build/lib/runtime/BlazeCommandDispatcherRcoptionsTest.java5
-rw-r--r--src/test/java/com/google/devtools/build/lib/runtime/BlazeOptionHandlerTest.java3
-rw-r--r--src/test/java/com/google/devtools/build/lib/runtime/BuildEventStreamerTest.java4
-rw-r--r--src/test/java/com/google/devtools/build/lib/runtime/CommandInterruptionTest.java3
-rw-r--r--src/test/java/com/google/devtools/build/lib/runtime/commands/CleanCommandRecommendsAsyncTest.java3
5 files changed, 13 insertions, 5 deletions
diff --git a/src/test/java/com/google/devtools/build/lib/runtime/BlazeCommandDispatcherRcoptionsTest.java b/src/test/java/com/google/devtools/build/lib/runtime/BlazeCommandDispatcherRcoptionsTest.java
index 0d9e7ba8fd..32a0879040 100644
--- a/src/test/java/com/google/devtools/build/lib/runtime/BlazeCommandDispatcherRcoptionsTest.java
+++ b/src/test/java/com/google/devtools/build/lib/runtime/BlazeCommandDispatcherRcoptionsTest.java
@@ -132,7 +132,10 @@ public class BlazeCommandDispatcherRcoptionsTest {
public final void initializeRuntime() throws Exception {
String productName = TestConstants.PRODUCT_NAME;
ServerDirectories serverDirectories =
- new ServerDirectories(scratch.dir("install_base"), scratch.dir("output_base"));
+ new ServerDirectories(
+ scratch.dir("install_base"),
+ scratch.dir("output_base"),
+ scratch.dir("user_output_root"));
this.runtime =
new BlazeRuntime.Builder()
.setFileSystem(scratch.getFileSystem())
diff --git a/src/test/java/com/google/devtools/build/lib/runtime/BlazeOptionHandlerTest.java b/src/test/java/com/google/devtools/build/lib/runtime/BlazeOptionHandlerTest.java
index ab601c2f05..2efebed15d 100644
--- a/src/test/java/com/google/devtools/build/lib/runtime/BlazeOptionHandlerTest.java
+++ b/src/test/java/com/google/devtools/build/lib/runtime/BlazeOptionHandlerTest.java
@@ -64,7 +64,8 @@ public class BlazeOptionHandlerTest {
parser.setAllowResidue(true);
String productName = TestConstants.PRODUCT_NAME;
ServerDirectories serverDirectories =
- new ServerDirectories(scratch.dir("install_base"), scratch.dir("output_base"));
+ new ServerDirectories(
+ scratch.dir("install_base"), scratch.dir("output_base"), scratch.dir("user_root"));
this.runtime =
new BlazeRuntime.Builder()
.setFileSystem(scratch.getFileSystem())
diff --git a/src/test/java/com/google/devtools/build/lib/runtime/BuildEventStreamerTest.java b/src/test/java/com/google/devtools/build/lib/runtime/BuildEventStreamerTest.java
index 023ce8475a..3c0af6c31c 100644
--- a/src/test/java/com/google/devtools/build/lib/runtime/BuildEventStreamerTest.java
+++ b/src/test/java/com/google/devtools/build/lib/runtime/BuildEventStreamerTest.java
@@ -627,7 +627,9 @@ public class BuildEventStreamerTest extends FoundationTestCase {
BuildConfiguration configuration =
new BuildConfiguration(
new BlazeDirectories(
- new ServerDirectories(outputBase, outputBase), rootDirectory, "productName"),
+ new ServerDirectories(outputBase, outputBase, outputBase),
+ rootDirectory,
+ "productName"),
ImmutableMap
.<Class<? extends BuildConfiguration.Fragment>, BuildConfiguration.Fragment>of(),
BuildOptions.of(
diff --git a/src/test/java/com/google/devtools/build/lib/runtime/CommandInterruptionTest.java b/src/test/java/com/google/devtools/build/lib/runtime/CommandInterruptionTest.java
index adf8a56775..de38e15cec 100644
--- a/src/test/java/com/google/devtools/build/lib/runtime/CommandInterruptionTest.java
+++ b/src/test/java/com/google/devtools/build/lib/runtime/CommandInterruptionTest.java
@@ -348,7 +348,8 @@ public final class CommandInterruptionTest {
isTestShuttingDown = new AtomicBoolean(false);
String productName = TestConstants.PRODUCT_NAME;
ServerDirectories serverDirectories =
- new ServerDirectories(scratch.dir("install"), scratch.dir("output"));
+ new ServerDirectories(
+ scratch.dir("install"), scratch.dir("output"), scratch.dir("user_root"));
BlazeRuntime runtime =
new BlazeRuntime.Builder()
.setFileSystem(scratch.getFileSystem())
diff --git a/src/test/java/com/google/devtools/build/lib/runtime/commands/CleanCommandRecommendsAsyncTest.java b/src/test/java/com/google/devtools/build/lib/runtime/commands/CleanCommandRecommendsAsyncTest.java
index 7c0006caaa..4a45e7d10f 100644
--- a/src/test/java/com/google/devtools/build/lib/runtime/commands/CleanCommandRecommendsAsyncTest.java
+++ b/src/test/java/com/google/devtools/build/lib/runtime/commands/CleanCommandRecommendsAsyncTest.java
@@ -79,7 +79,8 @@ public class CleanCommandRecommendsAsyncTest {
String productName = TestConstants.PRODUCT_NAME;
Scratch scratch = new Scratch();
ServerDirectories serverDirectories =
- new ServerDirectories(scratch.dir("install"), scratch.dir("output"));
+ new ServerDirectories(
+ scratch.dir("install"), scratch.dir("output"), scratch.dir("user_root"));
BlazeRuntime runtime =
new BlazeRuntime.Builder()
.setFileSystem(scratch.getFileSystem())