Make `bazel coverage` work with minimal mode
This PR solves the problem in a different way that #16475 tries to solve:
1. https://github.com/bazelbuild/bazel/pull/16812 allows skyframe read metadata from ActionFS.
2. Use `ActionFileSystem` to check existence of coverage data.
3. Fire event `CoverageReport` in the action after the coverage report is generated and listen to it in `ToplevelArtifactsDownloader` to download the report.
Closes #16556.
PiperOrigin-RevId: 502854552
Change-Id: I2796baaa962857831ff161423be6dffa6eb73e5c
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 66ecb01..5a442d8 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
@@ -771,7 +771,10 @@
Verify.verify(
!(testAction.isCoverageMode() && testAction.getSplitCoveragePostProcessing())
- || testAction.getCoverageData().getPath().exists());
+ || actionExecutionContext
+ .getPathResolver()
+ .convertPath(testAction.getCoverageData().getPath())
+ .exists());
Verify.verifyNotNull(spawnResults);
Verify.verifyNotNull(testResultDataBuilder);