Changeset 971

Show
Ignore:
Timestamp:
07/25/08 15:11:09 (3 months ago)
Author:
arnoschn
Message:

ci-tests: adding test output on commandline while xmlreporter is collecting data

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/arnoschn/cache/CiReportTask.php

    r966 r971  
    4848                $failures += (int)$attributes->failures; 
    4949                $errors += (int)$attributes->errors; 
    50                 $time += (int)$attributes->time; 
     50                $time += (float)$attributes->time; 
    5151            } 
    5252            $environment = array(); 
  • branches/arnoschn/cache/test/xinc-unit.php

    r914 r971  
    4444        $phpversion = isset($_SERVER['argv'][3])?$_SERVER['argv'][3]:'php5'; 
    4545        $backend = isset($_SERVER['argv'][4])?$_SERVER['argv'][4]:'mysql'; 
    46         ob_start(); 
    4746        $writeXml=true; 
    48         $run = $test->run(new XmlReporter('UTF-8',$phpversion,$backend)); 
     47        $reporter = new XmlReporter('UTF-8',$phpversion,$backend); 
     48        $run = $test->run($reporter); 
    4949    } else { 
    50         $run = $test->run(new TextReporter()); 
     50        $reporter = new TextReporter(); 
     51        $run = $test->run($reporter); 
    5152    } 
    5253     
    5354    if ($writeXml) { 
    54         $contents = ob_get_clean(); 
     55        $contents = $reporter->getXml(); 
    5556        file_put_contents($file,$contents); 
    5657    } 
  • branches/arnoschn/cache/vendor/simpletest-tools/xmlreporter.php

    r929 r971  
    11<?php 
    22require_once(AK_VENDOR_DIR.DS.'simpletest'.DS.'reporter.php'); 
    3 class XmlReporter extends SimpleReporter { 
     3class XmlReporter extends TextReporter { 
    44 
    55    var $group_tests = array(); 
     
    1313    var $phpversion; 
    1414    var $backend; 
     15    var $_outstring; 
    1516    function XmlReporter($character_set = 'ISO-8859-1', $phpversion='php5', $backend='mysql') { 
    1617        $this->SimpleReporter(); 
     
    160161        $this->group_depth++; 
    161162    } 
    162  
     163    function getXml() 
     164    { 
     165        return $this->_outstring; 
     166    } 
    163167    /** 
    164168     *    Paints the end of a group test. Will paint the page 
     
    176180            $phpversion='php5'; 
    177181            $backend="mysql"; 
    178             echo '<?xml version="1.0" encoding="'.$this->_character_set.'"?> 
     182            $this->_outstring='<?xml version="1.0" encoding="'.$this->_character_set.'"?> 
    179183<testsuites php-version="'.$this->phpversion.'" backend="'.$this->backend.'">'; 
    180184            //foreach ($this->output as $level=>$out) { 
    181             echo implode("\n",$this->output); 
     185            $this->_outstring.=implode("\n",$this->output); 
    182186            //} 
    183             echo '</testsuites>'; 
     187            $this->_outstring.='</testsuites>'; 
     188            unset($this->output); 
     189            $this->output=array(); 
     190            unset($this->_out); 
     191            $this->_out=array(); 
    184192        } else if ($this->group_depth==1) { 
    185193            $time = time()+microtime(true) - $this->_starttime;