Automated rollback of commit 64ac2a81f73ba7b085d0de65f12230814f4151c8.
*** Reason for rollback ***
See b/219621210 and b/186996003#comment17
*** Original change description ***
`TestRunnerAction` now produces a `TestResult` when test lifecycle fails at runtime.
Test execution entails running the target's test binary, and even if the binary
has been successfully built, the build tool may encounter failures when spawning
the test executable process. Previously this scenario did not produce a
TestResult or TestSummary BEP event; this is now fixed. Similarly fixed is the
scenario where execution fails after spawning the test process successfully.
The exception-handling l...
PiperOrigin-RevId: 428689515
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 8aa0bff..b1c9342 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
@@ -234,16 +234,7 @@
attemptId, /*isLastAttempt=*/ false, actionExecutionContext, action, result);
}
- @Override
- public TestAttemptResult makeIncompleteTestResult() {
- return StandaloneTestResult.builder()
- .setSpawnResults(ImmutableList.of())
- .setExecutionInfo(ExecutionInfo.getDefaultInstance())
- .setTestResultDataBuilder(TestResultData.newBuilder().setStatus(BlazeTestStatus.INCOMPLETE))
- .build();
- }
-
- public void finalizeTest(
+ private void finalizeTest(
TestRunnerAction action,
ActionExecutionContext actionExecutionContext,
StandaloneTestResult standaloneTestResult,
@@ -270,7 +261,7 @@
TestResultData data = dataBuilder.build();
TestResult result =
new TestResult(action, data, false, standaloneTestResult.primarySystemFailure());
- postTestResultCached(actionExecutionContext, result);
+ postTestResult(actionExecutionContext, result);
}
private StandaloneFailedAttemptResult processTestAttempt(
@@ -648,7 +639,7 @@
}
}
- private final class StandaloneTestRunnerSpawn extends AbstractTestRunnerSpawn {
+ private final class StandaloneTestRunnerSpawn implements TestRunnerSpawn {
private final TestRunnerAction testAction;
private final ActionExecutionContext actionExecutionContext;
private final Spawn spawn;