Fix local flaky test attempts reusing the same TEST_TMPDIR. When a test is run with --test_strategy=local (or equivalent Google-specific strategies), flaky retry attempts were reusing the same TestRunnerSpawn instance. This caused the subsequent attempts to use the same TEST_TMPDIR without it being properly cleared, potentially leading to interference between test runs. RELNOTES: None. PiperOrigin-RevId: 885161547 Change-Id: Ia997c41039f02874f6f0d8fb74132cbe90d3a544
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 439057b..6dcf1fb 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
@@ -615,6 +615,12 @@ .build(); finalizeTest(standaloneTestResult, failedAttempts); } + + @Override + public TestRunnerSpawn getFlakyRetryRunner(List<SpawnResult> previousAttemptResults) + throws ExecException, InterruptedException { + return createTestRunnerSpawn(testAction, actionExecutionContext); + } } private static TestExecException createTestExecException(