mirror of
https://github.com/pestphp/pest.git
synced 2026-04-22 06:57:28 +02:00
wip
This commit is contained in:
@ -55,6 +55,11 @@ final class Shard implements AddsOutput, HandlesArguments, Terminable
|
|||||||
*/
|
*/
|
||||||
private static bool $shardsOutdated = false;
|
private static bool $shardsOutdated = false;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Whether the test suite passed.
|
||||||
|
*/
|
||||||
|
private static bool $passed = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Collected timings from workers or subscribers.
|
* Collected timings from workers or subscribers.
|
||||||
*
|
*
|
||||||
@ -217,7 +222,9 @@ final class Shard implements AddsOutput, HandlesArguments, Terminable
|
|||||||
*/
|
*/
|
||||||
public function addOutput(int $exitCode): int
|
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();
|
self::$collectedTimings = $this->collectTimings();
|
||||||
|
|
||||||
$count = self::$knownTests !== null
|
$count = self::$knownTests !== null
|
||||||
@ -280,6 +287,10 @@ final class Shard implements AddsOutput, HandlesArguments, Terminable
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (! self::$passed) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$timings = self::$collectedTimings ?? $this->collectTimings();
|
$timings = self::$collectedTimings ?? $this->collectTimings();
|
||||||
|
|
||||||
if ($timings === []) {
|
if ($timings === []) {
|
||||||
|
|||||||
Reference in New Issue
Block a user