From: Stig Bakken Date: Thu, 9 May 2002 12:45:29 +0000 (+0000) Subject: * add "pear run-tests" command X-Git-Tag: php-4.3.0dev-ZendEngine2-Preview1~174 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=fddbd155543d1bb1d2f9bf06773fb4db38bcb0bf;p=php * add "pear run-tests" command --- diff --git a/pear/PEAR/Command/Package.php b/pear/PEAR/Command/Package.php index e63b9cec91..344a91ac30 100644 --- a/pear/PEAR/Command/Package.php +++ b/pear/PEAR/Command/Package.php @@ -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;