Fix path in --verbose_failure messages for sandboxed actions.
Combined with --sandbox_debug, this should help reproduce failures for
sandboxed actions more easily, as the paths will correctly be the ones
within the sandbox.
Fixes
RELNOTES: None.
@@ -97,7 +97,7 @@ abstract class AbstractSandboxSpawnRunner implements SpawnRunner {
OutErr outErr = context.getFileOutErr();
context.prefetchInputs();
- SpawnResult result = run(originalSpawn, sandbox, outErr, timeout, execRoot, statisticsPath);
+ SpawnResult result = run(originalSpawn, sandbox, outErr, timeout, statisticsPath);
context.lockOutputFiles();
try {
@@ -119,7 +119,6 @@ abstract class AbstractSandboxSpawnRunner implements SpawnRunner {
SandboxedSpawn sandbox,
OutErr outErr,
Duration timeout,
- Path execRoot,
Path statisticsPath)
throws IOException, InterruptedException {
Command cmd = new Command(
@@ -133,7 +132,7 @@ abstract class AbstractSandboxSpawnRunner implements SpawnRunner {
true,
sandbox.getArguments(),
sandbox.getEnvironment(),
- execRoot.getPathString(),
+ sandbox.getSandboxExecRoot().getPathString(),
null);
} else {
failureMessage =
@@ -141,7 +140,7 @@ abstract class AbstractSandboxSpawnRunner implements SpawnRunner {
verboseFailures,
originalSpawn.getArguments(),
originalSpawn.getEnvironment(),
- execRoot.getPathString(),
+ sandbox.getSandboxExecRoot().getPathString(),
originalSpawn.getExecutionPlatform())
+ SANDBOX_DEBUG_SUGGESTION;
}
