mirror of
https://github.com/php/php-src.git
synced 2026-04-25 17:08:14 +02:00
* add "pear run-tests" command
This commit is contained in:
@@ -71,7 +71,8 @@ class PEAR_Command_Package extends PEAR_Command_Common
|
||||
'package-info' => 'Show Package Info',
|
||||
'package-list' => 'List Files in Package',
|
||||
'package-validate' => 'Validate Package',
|
||||
'cvstag' => 'Set CVS Release Tag');
|
||||
'cvstag' => 'Set CVS Release Tag',
|
||||
'run-tests' => 'Run Regression Tests');
|
||||
}
|
||||
|
||||
// }}}
|
||||
@@ -389,6 +390,24 @@ class PEAR_Command_Package extends PEAR_Command_Common
|
||||
break;
|
||||
}
|
||||
|
||||
// }}}
|
||||
// {{{ run-tests
|
||||
|
||||
case 'run-tests': {
|
||||
$cwd = getcwd();
|
||||
$php = PHP_BINDIR . '/php' . (OS_WINDOWS ? '.exe' : '');
|
||||
$ip = ini_get("include_path");
|
||||
$ps = OS_WINDOWS ? ';' : ':';
|
||||
$run_tests = $this->config->get('php_dir') . DIRECTORY_SEPARATOR . 'run-tests.php';
|
||||
if (!file_exists($run_tests)) {
|
||||
$run_tests = PEAR_INSTALL_DIR . DIRECTORY_SEPARATOR . 'run-tests.php';
|
||||
}
|
||||
$plist = implode(" ", $params);
|
||||
$cmd = "$php -d include_path=$cwd$ps$ip $run_tests $plist";
|
||||
system($cmd);
|
||||
break;
|
||||
}
|
||||
|
||||
// }}}
|
||||
default: {
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user