This commit is contained in:
nuno maduro
2026-04-14 09:53:57 -07:00
parent e616eab9fb
commit 0acab1cbb4

View File

@ -55,6 +55,11 @@ final class Shard implements AddsOutput, HandlesArguments, Terminable
*/
private static bool $shardsOutdated = false;
/**
* Whether the test suite passed.
*/
private static bool $passed = false;
/**
* Collected timings from workers or subscribers.
*
@ -217,7 +222,9 @@ final class Shard implements AddsOutput, HandlesArguments, Terminable
*/
public function addOutput(int $exitCode): int
{
if (self::$updateShards && ! Parallel::isWorker()) {
self::$passed = $exitCode === 0;
if (self::$updateShards && self::$passed && ! Parallel::isWorker()) {
self::$collectedTimings = $this->collectTimings();
$count = self::$knownTests !== null
@ -280,6 +287,10 @@ final class Shard implements AddsOutput, HandlesArguments, Terminable
return;
}
if (! self::$passed) {
return;
}
$timings = self::$collectedTimings ?? $this->collectTimings();
if ($timings === []) {