As a follow up to []. This changelist creates an intermediary FileWriteAction to store the list of lcov files in a file before calling the code coverage report binary.
Cleanup on the COVERAGE_REPORT to support multiple actions.
RELNOTES: HTML code coverage report fix for large targets.
--
MOS_MIGRATED_REVID=86033675
diff --git a/src/main/java/com/google/devtools/build/lib/analysis/BuildView.java b/src/main/java/com/google/devtools/build/lib/analysis/BuildView.java
index 052d0a2..59adaf7 100644
--- a/src/main/java/com/google/devtools/build/lib/analysis/BuildView.java
+++ b/src/main/java/com/google/devtools/build/lib/analysis/BuildView.java
@@ -64,6 +64,7 @@
import com.google.devtools.build.lib.pkgcache.LoadingPhaseRunner.LoadingResult;
import com.google.devtools.build.lib.pkgcache.PackageManager;
import com.google.devtools.build.lib.rules.test.CoverageReportActionFactory;
+import com.google.devtools.build.lib.rules.test.CoverageReportActionFactory.CoverageReportActionsWrapper;
import com.google.devtools.build.lib.skyframe.ConfiguredTargetKey;
import com.google.devtools.build.lib.skyframe.CoverageReportValue;
import com.google.devtools.build.lib.skyframe.SkyframeBuildView;
@@ -700,7 +701,7 @@
/**
* Skyframe implementation of {@link PackageRootResolver}.
- *
+ *
* <p> Note: you should not use this class inside of any SkyFunction.
*/
@VisibleForTesting
@@ -741,14 +742,16 @@
artifactsToBuild.addAll(buildInfoArtifacts);
addExtraActionsIfRequested(viewOptions, artifactsToBuild, configuredTargets);
if (coverageReportActionFactory != null) {
- Action action = coverageReportActionFactory.createCoverageReportAction(
+ CoverageReportActionsWrapper actionsWrapper;
+ actionsWrapper = coverageReportActionFactory.createCoverageReportActionsWrapper(
allTargetsToTest,
getBaselineCoverageArtifacts(configuredTargets),
artifactFactory,
CoverageReportValue.ARTIFACT_OWNER);
- if (action != null) {
- skyframeExecutor.injectCoverageReportData(action);
- artifactsToBuild.addAll(action.getOutputs());
+ if (actionsWrapper != null) {
+ ImmutableList <Action> actions = actionsWrapper.getActions();
+ skyframeExecutor.injectCoverageReportData(actions);
+ artifactsToBuild.addAll(actionsWrapper.getCoverageOutputs());
}
}