Changeset 965
- Timestamp:
- 07/25/08 10:52:32 (1 month ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/arnoschn/cache/CiReportTask.php
r948 r965 22 22 $files[]=$fs->getDir($this->project).DIRECTORY_SEPARATOR.$f; 23 23 } 24 var_dump($files);25 24 26 25 } 26 $environments = array(); 27 $summaryFile = $this->reportDir.DIRECTORY_SEPARATOR.'index.html'; 27 28 foreach($files as $file) 28 29 { … … 35 36 mkdir($dir,0777,true); 36 37 } 38 $xml = new SimpleXMLElement(file_get_contents($file)); 39 $suites=$xml->xpath("/testsuites/testsuite"); 40 $tests=0; 41 $failures=0; 42 $errors=0; 43 $time=0; 44 45 foreach($suites as $suite){ 46 $attributes = $suite->attributes(); 47 $tests += (int)$attributes->tests; 48 $failures += (int)$attributes->failures; 49 $errors += (int)$attributes->errors; 50 $time += (int)$attributes->time; 51 } 52 $environment = array(); 53 $environment['php']=$php; 54 $environment['class']=$failures>0?'failure':$errors>0?'error':''; 55 $environment['backend']=$backend; 56 $environment['tests']=$tests; 57 $environment['failures']=$failures; 58 $environment['errors']=$errors; 59 $environment['time']=$time; 60 $environment['details']=$dir.DIRECTORY_SEPARATOR.'phpunit2-noframes.html'; 61 $environments[]=$environment; 37 62 $this->setInFile($file); 38 63 $this->log("Report available in:\n\n".$dir.DIRECTORY_SEPARATOR."phpunit2-noframes.html"); 39 64 parent::main(); 40 65 } 66 ob_start(); 67 include_once(dirname(__FILE__).DIRECTORY_SEPARATOR.'resources'.DIRECTORY_SEPARATOR.'summary.php'); 68 $contents = ob_get_clean(); 69 70 file_put_contents($summaryFile, $contents); 41 71 } 42 72 /** branches/arnoschn/cache/test/unit/lib/AkActionController/_action_caching.php
r964 r965 16 16 $cacheDir = $settings['handler']['options']['cacheDir']; 17 17 } 18 chmod($cacheDir,0777);18 //chmod($cacheDir,0777); 19 19 $this->_flushCache('akelos.org'); 20 20 $this->_flushCache('www.akelos.org');
