aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--src/main/java/com/google/devtools/build/lib/remote/RemoteSpawnStrategy.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/remote/RemoteSpawnStrategy.java b/src/main/java/com/google/devtools/build/lib/remote/RemoteSpawnStrategy.java
index 0391baddb2..05c9b92d8c 100644
--- a/src/main/java/com/google/devtools/build/lib/remote/RemoteSpawnStrategy.java
+++ b/src/main/java/com/google/devtools/build/lib/remote/RemoteSpawnStrategy.java
@@ -152,6 +152,15 @@ final class RemoteSpawnStrategy implements SpawnActionContext {
try {
ActionResult.Builder result = ActionResult.newBuilder();
actionCache.uploadAllResults(execRoot, outputFiles, result);
+ FileOutErr outErr = actionExecutionContext.getFileOutErr();
+ if (outErr.getErrorPath().exists()) {
+ ContentDigest stderr = actionCache.uploadFileContents(outErr.getErrorPath());
+ result.setStderrDigest(stderr);
+ }
+ if (outErr.getOutputPath().exists()) {
+ ContentDigest stdout = actionCache.uploadFileContents(outErr.getOutputPath());
+ result.setStdoutDigest(stdout);
+ }
actionCache.setCachedActionResult(actionKey, result.build());
// Handle all cache errors here.
} catch (IOException e) {