diff options
author | 2017-03-21 10:08:03 +0000 | |
---|---|---|
committer | 2017-03-21 12:53:49 +0000 | |
commit | c0a84443526539c36557a6b6bfd0e41623d62fd0 (patch) | |
tree | cad733194b2fb397676b4d60e9d062c8d1aa0e02 /src/main/java/com/google/devtools/build/lib/sandbox/SymlinkedExecRoot.java | |
parent | 30e3276642fae54ff1be951c52e3286b715409ea (diff) |
Add SpawnInputExpander helper class to arrange runfiles for spawn strategies
This new class is a combination of SpawnHelper and our internal code; the
plan is to migrate all spawn strategies to the new class. The strict flag
should be enabled by default, but that's a breaking change, so we need to do
it later.
- Use it in SandboxStrategy.
- Add ActionInput.getExecPath to return a PathFragment; this avoids lots of
back and forth between path fragments and strings.
This is a step towards #1593.
The previous attempt was missing a one-line patch in StandaloneTestStrategy,
which broke all tests with sandboxing. StandaloneTestStrategy was fixed in a
separate change, so this should be safe now.
--
PiperOrigin-RevId: 150733457
MOS_MIGRATED_REVID=150733457
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/sandbox/SymlinkedExecRoot.java')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/sandbox/SymlinkedExecRoot.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/sandbox/SymlinkedExecRoot.java b/src/main/java/com/google/devtools/build/lib/sandbox/SymlinkedExecRoot.java index 173f1cefa6..a158f02961 100644 --- a/src/main/java/com/google/devtools/build/lib/sandbox/SymlinkedExecRoot.java +++ b/src/main/java/com/google/devtools/build/lib/sandbox/SymlinkedExecRoot.java @@ -92,7 +92,8 @@ public final class SymlinkedExecRoot implements SandboxExecRoot { throws IOException { for (PathFragment inputPath : inputs) { Path dir = sandboxExecRoot.getRelative(inputPath).getParentDirectory(); - Preconditions.checkArgument(dir.startsWith(sandboxExecRoot)); + Preconditions.checkArgument( + dir.startsWith(sandboxExecRoot), "Bad relative path: '%s'", inputPath); FileSystemUtils.createDirectoryAndParentsWithCache(createdDirs, dir); } } |