From fddbd155543d1bb1d2f9bf06773fb4db38bcb0bf Mon Sep 17 00:00:00 2001 From: Stig Bakken Date: Thu, 9 May 2002 12:45:29 +0000 Subject: [PATCH] * add "pear run-tests" command --- pear/PEAR/Command/Package.php | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) 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; -- 2.50.1