diff --git a/src/main/java/com/google/devtools/build/lib/exec/StandaloneTestStrategy.java b/src/main/java/com/google/devtools/build/lib/exec/StandaloneTestStrategy.java index a7000ebbc233b7..3e8ca341c80a2d 100644 --- a/src/main/java/com/google/devtools/build/lib/exec/StandaloneTestStrategy.java +++ b/src/main/java/com/google/devtools/build/lib/exec/StandaloneTestStrategy.java @@ -740,6 +740,12 @@ private TestAttemptResult runTestAttempt( .getOutputMetadataStore() .getTreeArtifactChildren( (SpecialArtifact) testAction.getCoverageDirectoryTreeArtifact()); + ImmutableSet coverageSpawnMetadata = + ImmutableSet.builder() + .addAll(expandedCoverageDir) + .add(testAction.getCoverageDirectoryTreeArtifact()) + .build(); + Spawn coveragePostProcessingSpawn = createCoveragePostProcessingSpawn( actionExecutionContext, @@ -759,7 +765,7 @@ private TestAttemptResult runTestAttempt( ActionExecutionContext coverageActionExecutionContext = actionExecutionContext .withFileOutErr(coverageOutErr) - .withOutputsAsInputs(expandedCoverageDir); + .withOutputsAsInputs(coverageSpawnMetadata); writeOutFile(coverageOutErr.getErrorPath(), coverageOutErr.getOutputPath()); appendCoverageLog(coverageOutErr, fileOutErr);