/**
  * @param ProcessResultInterface $process
  *
  * @return bool True if chain should continue
  */
 public function parseAndContinue(ProcessResultInterface $process)
 {
     $output = $process->getOutput();
     // SEGFAULT
     $segFault = array();
     preg_match(self::SEGFAULT_REGEX, $output, $segFault);
     if (!empty($segFault)) {
         $process->addSegmentationFault($process->getFilename() . ' - ' . $segFault[0]);
         return false;
     }
     return true;
 }
Example #2
0
 /**
  * @param ProcessResultInterface $process
  */
 protected function analyzeProcess(ProcessResultInterface $process)
 {
     $filename = $process->getFilename();
     if ($process->hasSegmentationFaults()) {
         $this->segmentationFaults->addFileName($filename);
     }
     if (in_array('X', $process->getTestResults())) {
         $this->unknownStatus->addFileName($filename);
         $this->unknownStatus->addToOutputBuffer($process->getOutput());
     }
     if ($process->hasFatalErrors()) {
         $this->fatalErrors->addFileName($filename);
         $this->fatalErrors->addToOutputBuffer($process->getFatalErrors());
     }
     if ($process->hasErrors()) {
         $this->errors->addFileName($filename);
         $this->errors->addToOutputBuffer($process->getErrors());
     }
     if ($process->hasFailures()) {
         $this->failures->addFileName($filename);
         $this->failures->addToOutputBuffer($process->getFailures());
     }
     if (in_array('S', $process->getTestResults())) {
         $this->skipped->addFileName($filename);
     }
     if (in_array('I', $process->getTestResults())) {
         $this->incomplete->addFileName($filename);
     }
 }