/**
  * @param ProcessEvent $processEvent
  */
 public function onProcessTerminated(ProcessEvent $processEvent)
 {
     foreach ($this->parsers as $parser) {
         if (!$parser->parseAndContinue($processEvent->getProcess())) {
             return;
         }
     }
 }
Beispiel #2
0
 /**
  * @param ProcessEvent $processEvent
  */
 public function onProcessTerminated(ProcessEvent $processEvent)
 {
     $process = $processEvent->getProcess();
     $logs = $this->logLocator->fetch($process);
     if ($this->noTestsExecuted($process, $logs)) {
         $this->noTestExecutedResultContainer->addProcessToFilenames($process);
         return;
     }
     foreach ($logs as $singleLog) {
         $this->processLog($process, $singleLog);
     }
 }
Beispiel #3
0
 /**
  * @param ProcessEvent $processEvent
  */
 public function onProcessTerminated(ProcessEvent $processEvent)
 {
     $process = $processEvent->getProcess();
     if (!$processEvent->has('output_interface')) {
         throw new \BadMethodCallException('missing output_interface');
     }
     $this->output = $processEvent->get('output_interface');
     if (!$this->output instanceof OutputInterface) {
         throw new \BadMethodCallException('output_interface, unexpected type: ' . get_class($this->output));
     }
     foreach ($process->getTestResults() as $testResult) {
         $this->printFormattedWithCounter($testResult);
     }
 }
Beispiel #4
0
 /**
  * @param ProcessEvent $processEvent
  *
  * @return bool
  */
 public function onProcessTerminated(ProcessEvent $processEvent)
 {
     $process = $processEvent->getProcess();
     if ($process->getRetryCount() >= $this->maxRetry) {
         return false;
     }
     $deadlocks = array();
     @preg_match(self::MYSQL_LOCK_EXCEPTION, $process->getOutput(), $deadlocks);
     $entityManagerClosed = array();
     @preg_match(self::DOCTRINE_EM_CLOSED, $process->getOutput(), $entityManagerClosed);
     if (!empty($deadlocks) || !empty($entityManagerClosed)) {
         $process->markAsToBeRetried();
         $process->increaseRetryCount();
     }
     return $process->isToBeRetried();
 }
Beispiel #5
0
 /**
  * @param ProcessEvent $processEvent
  */
 public function onProcessTerminated(ProcessEvent $processEvent)
 {
     $process = $processEvent->getProcess();
     if (!$processEvent->has('output_interface')) {
         throw new \BadMethodCallException('missing output_interface');
     }
     $output = $processEvent->get('output_interface');
     if (!$output instanceof OutputInterface) {
         throw new \BadMethodCallException('output_interace wrong type');
     }
     if ($process->isToBeRetried()) {
         $this->printWithCounter($output, '<ok>A</ok>');
     } else {
         if (count($process->getTestResults())) {
             foreach ($process->getTestResults() as $testResult) {
                 $this->printSingleTestResult($output, $testResult);
             }
         } else {
             // TODO --- this operation should be done somewhere else!
             $process->setTestResults(array('X'));
             $this->printWithCounter($output, '<error>X</error>');
         }
     }
 }
Beispiel #6
0
 /**
  * @param ProcessEvent $processEvent
  */
 public function onProcessTerminated(ProcessEvent $processEvent)
 {
     $this->merge($processEvent->getProcess());
 }