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 SebastianBergmann\Timer\Duration;
|
||||
use SplFileInfo;
|
||||
use function sprintf;
|
||||
use function strlen;
|
||||
use Symfony\Component\Console\Formatter\OutputFormatter;
|
||||
use Symfony\Component\Console\Output\OutputInterface;
|
||||
@ -76,17 +75,6 @@ final class ResultPrinter
|
||||
$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 */
|
||||
public function printFeedback(SplFileInfo $progressFile, array $teamcityFiles): void
|
||||
{
|
||||
@ -155,7 +143,7 @@ final class ResultPrinter
|
||||
$state = (new StateGenerator())->fromPhpUnitTestResult($testResult);
|
||||
|
||||
$this->compactPrinter->errors($state);
|
||||
$this->compactPrinter->recap($state, $testResult, $duration);
|
||||
$this->compactPrinter->recap($state, $testResult, $duration, $this->options);
|
||||
}
|
||||
|
||||
private function printFeedbackItem(string $item): void
|
||||
|
||||
@ -121,8 +121,6 @@ final class WrapperRunner implements RunnerInterface
|
||||
|
||||
$result = TestResultFacade::result();
|
||||
|
||||
$this->printer->start($suiteLoader->testCount);
|
||||
|
||||
$this->timer->start();
|
||||
|
||||
$this->startWorkers();
|
||||
|
||||
@ -6,6 +6,7 @@ namespace Pest\Plugins\Parallel\Support;
|
||||
|
||||
use NunoMaduro\Collision\Adapters\Phpunit\State;
|
||||
use NunoMaduro\Collision\Adapters\Phpunit\Style;
|
||||
use ParaTest\Options;
|
||||
use PHPUnit\Event\Telemetry\HRTime;
|
||||
use PHPUnit\Event\Telemetry\Info;
|
||||
use PHPUnit\Event\Telemetry\MemoryUsage;
|
||||
|
||||
Reference in New Issue
Block a user