mirror of
https://github.com/pestphp/pest.git
synced 2026-03-06 07:47:22 +01:00
feat: improves parallel output
This commit is contained in:
@ -20,7 +20,6 @@ use PHPUnit\TextUI\Output\Printer;
|
|||||||
use function preg_replace;
|
use function preg_replace;
|
||||||
use SebastianBergmann\Timer\Duration;
|
use SebastianBergmann\Timer\Duration;
|
||||||
use SplFileInfo;
|
use SplFileInfo;
|
||||||
use function sprintf;
|
|
||||||
use function strlen;
|
use function strlen;
|
||||||
use Symfony\Component\Console\Formatter\OutputFormatter;
|
use Symfony\Component\Console\Formatter\OutputFormatter;
|
||||||
use Symfony\Component\Console\Output\OutputInterface;
|
use Symfony\Component\Console\Output\OutputInterface;
|
||||||
@ -76,17 +75,6 @@ final class ResultPrinter
|
|||||||
$this->teamcityLogFileHandle = $teamcityLogFileHandle;
|
$this->teamcityLogFileHandle = $teamcityLogFileHandle;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function start(int $numberOfTests): void
|
|
||||||
{
|
|
||||||
$this->compactPrinter->line(sprintf(
|
|
||||||
'Running %d test%s using %d process%s',
|
|
||||||
$numberOfTests,
|
|
||||||
$numberOfTests === 1 ? '' : 's',
|
|
||||||
$this->options->processes,
|
|
||||||
$this->options->processes === 1 ? '' : 'es')
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
/** @param array<int, SplFileInfo> $teamcityFiles */
|
/** @param array<int, SplFileInfo> $teamcityFiles */
|
||||||
public function printFeedback(SplFileInfo $progressFile, array $teamcityFiles): void
|
public function printFeedback(SplFileInfo $progressFile, array $teamcityFiles): void
|
||||||
{
|
{
|
||||||
@ -155,7 +143,7 @@ final class ResultPrinter
|
|||||||
$state = (new StateGenerator())->fromPhpUnitTestResult($testResult);
|
$state = (new StateGenerator())->fromPhpUnitTestResult($testResult);
|
||||||
|
|
||||||
$this->compactPrinter->errors($state);
|
$this->compactPrinter->errors($state);
|
||||||
$this->compactPrinter->recap($state, $testResult, $duration);
|
$this->compactPrinter->recap($state, $testResult, $duration, $this->options);
|
||||||
}
|
}
|
||||||
|
|
||||||
private function printFeedbackItem(string $item): void
|
private function printFeedbackItem(string $item): void
|
||||||
|
|||||||
@ -121,8 +121,6 @@ final class WrapperRunner implements RunnerInterface
|
|||||||
|
|
||||||
$result = TestResultFacade::result();
|
$result = TestResultFacade::result();
|
||||||
|
|
||||||
$this->printer->start($suiteLoader->testCount);
|
|
||||||
|
|
||||||
$this->timer->start();
|
$this->timer->start();
|
||||||
|
|
||||||
$this->startWorkers();
|
$this->startWorkers();
|
||||||
|
|||||||
@ -6,6 +6,7 @@ namespace Pest\Plugins\Parallel\Support;
|
|||||||
|
|
||||||
use NunoMaduro\Collision\Adapters\Phpunit\State;
|
use NunoMaduro\Collision\Adapters\Phpunit\State;
|
||||||
use NunoMaduro\Collision\Adapters\Phpunit\Style;
|
use NunoMaduro\Collision\Adapters\Phpunit\Style;
|
||||||
|
use ParaTest\Options;
|
||||||
use PHPUnit\Event\Telemetry\HRTime;
|
use PHPUnit\Event\Telemetry\HRTime;
|
||||||
use PHPUnit\Event\Telemetry\Info;
|
use PHPUnit\Event\Telemetry\Info;
|
||||||
use PHPUnit\Event\Telemetry\MemoryUsage;
|
use PHPUnit\Event\Telemetry\MemoryUsage;
|
||||||
|
|||||||
Reference in New Issue
Block a user