Skip to content

Commit 33dca48

Browse files
lberkibazel-io
authored andcommitted
Add tree artifact metadata for the coverage post-processing spawn.
This makes --experimental_split_coverage_postprocessing work in the wake of bazelbuild@fb6658c: before, it was enough to add the metadata of the tree file artifacts to the metadata provider of the post-processing action, but that change made the metadata of the tree artifact necessary, too. Progress towards bazelbuild#20753. RELNOTES: None. PiperOrigin-RevId: 596929659 Change-Id: I481ef36328de7f7ab07f2ec7a0ac83d5fd508c36
1 parent e123e29 commit 33dca48

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/main/java/com/google/devtools/build/lib/exec/StandaloneTestStrategy.java

+7-1
Original file line numberDiff line numberDiff line change
@@ -740,6 +740,12 @@ private TestAttemptResult runTestAttempt(
740740
.getOutputMetadataStore()
741741
.getTreeArtifactChildren(
742742
(SpecialArtifact) testAction.getCoverageDirectoryTreeArtifact());
743+
ImmutableSet<ActionInput> coverageSpawnMetadata =
744+
ImmutableSet.<ActionInput>builder()
745+
.addAll(expandedCoverageDir)
746+
.add(testAction.getCoverageDirectoryTreeArtifact())
747+
.build();
748+
743749
Spawn coveragePostProcessingSpawn =
744750
createCoveragePostProcessingSpawn(
745751
actionExecutionContext,
@@ -759,7 +765,7 @@ private TestAttemptResult runTestAttempt(
759765
ActionExecutionContext coverageActionExecutionContext =
760766
actionExecutionContext
761767
.withFileOutErr(coverageOutErr)
762-
.withOutputsAsInputs(expandedCoverageDir);
768+
.withOutputsAsInputs(coverageSpawnMetadata);
763769

764770
writeOutFile(coverageOutErr.getErrorPath(), coverageOutErr.getOutputPath());
765771
appendCoverageLog(coverageOutErr, fileOutErr);

0 commit comments

Comments
 (0)