diff options
author | ulfjack <ulfjack@google.com> | 2017-07-12 12:10:11 +0200 |
---|---|---|
committer | László Csomor <laszlocsomor@google.com> | 2017-07-12 16:02:39 +0200 |
commit | 264f40fb42ce1390f9ee420f923b77ef3a82327f (patch) | |
tree | 11e16746189e6ee28b57c9294f8570715e4edb87 /src/test/java/com/google/devtools/build/lib/remote | |
parent | 423a46a11acd109467573c3344a4dd49f211aea6 (diff) |
Rewrite all the sandbox strategy implementations
- Make use of existing abstractions like SpawnRunner and SpawnExecutionPolicy.
- Instead of having the *Strategy create a *Runner, and then call back into
SandboxStrategy, create a single SandboxContainer which contains the full
command line, environment, and everything needed to create and delete the
sandbox directory.
- Do all the work in SandboxStrategy, including creation and deletion of the
sandbox directory.
- Use SpawnResult instead of throwing, catching, and rethrowing.
- Simplify the control flow a bit.
PiperOrigin-RevId: 161644979
Diffstat (limited to 'src/test/java/com/google/devtools/build/lib/remote')
-rw-r--r-- | src/test/java/com/google/devtools/build/lib/remote/CachedLocalSpawnRunnerTest.java | 5 | ||||
-rw-r--r-- | src/test/java/com/google/devtools/build/lib/remote/GrpcRemoteExecutionClientTest.java | 5 |
2 files changed, 10 insertions, 0 deletions
diff --git a/src/test/java/com/google/devtools/build/lib/remote/CachedLocalSpawnRunnerTest.java b/src/test/java/com/google/devtools/build/lib/remote/CachedLocalSpawnRunnerTest.java index 15eab5a4a1..882e304a30 100644 --- a/src/test/java/com/google/devtools/build/lib/remote/CachedLocalSpawnRunnerTest.java +++ b/src/test/java/com/google/devtools/build/lib/remote/CachedLocalSpawnRunnerTest.java @@ -91,6 +91,11 @@ public class CachedLocalSpawnRunnerTest { } @Override + public ArtifactExpander getArtifactExpander() { + throw new UnsupportedOperationException(); + } + + @Override public long getTimeoutMillis() { return 0; } diff --git a/src/test/java/com/google/devtools/build/lib/remote/GrpcRemoteExecutionClientTest.java b/src/test/java/com/google/devtools/build/lib/remote/GrpcRemoteExecutionClientTest.java index e299ba7873..238b831deb 100644 --- a/src/test/java/com/google/devtools/build/lib/remote/GrpcRemoteExecutionClientTest.java +++ b/src/test/java/com/google/devtools/build/lib/remote/GrpcRemoteExecutionClientTest.java @@ -116,6 +116,11 @@ public class GrpcRemoteExecutionClientTest { } @Override + public ArtifactExpander getArtifactExpander() { + throw new UnsupportedOperationException(); + } + + @Override public long getTimeoutMillis() { return 0; } |