Ejemplo n.º 1
0
 /**
  * @param ProcessResultInterface $process
  *
  * @return bool True if chain should continue
  */
 public function parseAndContinue(ProcessResultInterface $process)
 {
     $results = $this->getResultsFromOutput($process->getOutput());
     if ($results != '') {
         $cleanResults = preg_replace('/[^FIESR.]+/', '', $results);
         $process->setTestResults(str_split($cleanResults));
     }
     return true;
 }
Ejemplo n.º 2
0
 /**
  * @param ProcessResultInterface $process
  *
  * @return bool True if chain should continue
  */
 public function parseAndContinue(ProcessResultInterface $process)
 {
     if ($process->isToBeRetried()) {
         $process->setTestResults(array('R'));
         return false;
     } else {
         return true;
     }
 }
Ejemplo n.º 3
0
 /**
  * @param ProcessResultInterface $process
  *
  * @return bool True if chain should continue
  */
 public function parseAndContinue(ProcessResultInterface $process)
 {
     $fatalError = array();
     preg_match(self::FATAL_ERROR_REGEX, $process->getOutput(), $fatalError);
     if (!empty($fatalError)) {
         $process->addFatalError($fatalError[0]);
         return false;
     } else {
         return true;
     }
 }
Ejemplo n.º 4
0
 /**
  * @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;
 }
Ejemplo n.º 5
0
 /**
  * @param ProcessResultInterface $process
  *
  * @return bool True if chain should continue
  */
 public function parseAndContinue(ProcessResultInterface $process)
 {
     $errorsBlob = array();
     preg_match(self::ERROR_REGEX, $process->getOutput(), $errorsBlob);
     if (isset($errorsBlob[1])) {
         $errors = preg_split('/^\\d+\\) /m', $errorsBlob[1]);
         // il primo è sempre vuoto a causa dello split
         unset($errors[0]);
         foreach ($errors as $singleError) {
             $process->addError(trim($singleError));
         }
     }
     return true;
 }
Ejemplo n.º 6
0
 /**
  * @param ProcessResultInterface $process
  *
  * @return bool True if chain should continue
  */
 public function parseAndContinue(ProcessResultInterface $process)
 {
     $failuresBlob = array();
     preg_match(self::FAILURE_REGEX, $process->getOutput(), $failuresBlob);
     if (isset($failuresBlob[1])) {
         $failures = preg_split('/^\\d+\\) /m', $failuresBlob[1]);
         // il primo è sempre vuoto a causa dello split
         unset($failures[0]);
         foreach ($failures as $singleFailure) {
             $process->addFailure(trim($singleFailure));
         }
     }
     return true;
 }
Ejemplo n.º 7
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);
     }
 }