Add :coverage_suport data runfiles to the inputs of TestActions.
@@ -29,6 +29,7 @@ import com.google.devtools.build.lib.analysis.FilesToRunProvider;
import com.google.devtools.build.lib.analysis.PrerequisiteArtifacts;
import com.google.devtools.build.lib.analysis.RuleContext;
import com.google.devtools.build.lib.analysis.Runfiles;
+import com.google.devtools.build.lib.analysis.RunfilesProvider;
import com.google.devtools.build.lib.analysis.RunfilesSupplierImpl;
import com.google.devtools.build.lib.analysis.RunfilesSupport;
import com.google.devtools.build.lib.analysis.ShToolchain;
@@ -214,6 +215,11 @@ public final class TestActionBuilder {
inputsBuilder.addTransitive(metadataFiles);
inputsBuilder.addTransitive(
PrerequisiteArtifacts.nestedSet(ruleContext, ":coverage_support"));
+ inputsBuilder.addTransitive(
+ ruleContext
+ .getPrerequisite(":coverage_support", RunfilesProvider.class)
+ .getDataRunfiles()
+ .getAllArtifacts());
if (ruleContext.isAttrDefined("$collect_cc_coverage", LABEL)) {
Artifact collectCcCoverage =
