예제 #1
0
    }
    $e = error_reporting();
    error_reporting(0);
    require_once 'PEAR/Command/Test.php';
    require_once 'PEAR/Frontend/CLI.php';
    require_once 'PEAR/Config.php';
    $cli = new PEAR_Frontend_CLI();
    $config = @PEAR_Config::singleton();
    $test = new PEAR_Command_Test($cli, $config);
    error_reporting($e);
}
namespace Pyrus\Developer\CoverageAnalyzer {
    $codepath = realpath('../../../../../Pyrus/src');
    $testpath = realpath('../../../../../Pyrus/tests');
    $sqlite = new Sqlite($testpath . '/pear2coverage.db', $codepath, $testpath);
    $modified = $sqlite->getModifiedTests();
    if (!count($modified)) {
        if ($force) {
            goto dorender;
        }
        echo "No changes to coverage needed.  Bye!\n";
        exit;
    }
    $dir = getcwd();
    chdir($testpath);
    error_reporting(0);
    $test->doRunTests('run-tests', array('coverage' => true), $modified);
    error_reporting($e);
    chdir($dir);
    if (file_exists($testpath . '/run-tests.log')) {
        // tests failed