updateTestLogs($cli_directory, $test); $working_copy = dirname(__FILE__)."/working-copies/simpletest"; $binary = "svn"; $integration->updateSvnLog($working_copy, $binary); /** * SimpleIntegration class * @package SimpleTest */ class SimpleIntegration { public $target_directory; function __construct($target_directory="") { $this->target_directory = $target_directory; } function updateTestLogs($cli_directory, $test_file) { foreach(new DirectoryIterator($cli_directory) as $node) { if ($node->isDir() and !$node->isDot()) { $bin = $node->getPathname()."/bin/php"; $result = shell_exec($bin." ".$test_file); $result_file = $this->target_directory."/simpletest.".$node->getFilename().".log"; file_put_contents($result_file, $result); } } } function updateSvnLog($working_copy, $binary="svn") { $start = date("Y-m-d", strtotime('-1year')); $command = $binary." log --xml --revision {".$start."}:HEAD ".$working_copy." > ".$this->target_directory."/svn.xml"; return exec($command); } } ?>