cvs: php4 /pear/PEAR/Command Package.php
| From: | Stig Bakken | Date: | Thu, 09 May 2002 12:45:29 +0000 |
| Subject: | cvs: php4 /pear/PEAR/Command Package.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-3724@lists.php.net to get a copy of this message | ||
ssb Thu May 9 08:45:29 2002 EDT
Modified files:
/php4/pear/PEAR/Command Package.php
Log:
* add "pear run-tests" command
Index: php4/pear/PEAR/Command/Package.php
diff -u php4/pear/PEAR/Command/Package.php:1.22 php4/pear/PEAR/Command/Package.php:1.23
--- php4/pear/PEAR/Command/Package.php:1.22 Wed May 8 22:31:36 2002
+++ php4/pear/PEAR/Command/Package.php Thu May 9 08:45:29 2002
@@ -16,7 +16,7 @@
// | Author: Stig Bakken <ssb@fast.no> |
// +----------------------------------------------------------------------+
//
-// $Id: Package.php,v 1.22 2002/05/09 02:31:36 ssb Exp $
+// $Id: Package.php,v 1.23 2002/05/09 12:45:29 ssb Exp $
require_once 'PEAR/Command/Common.php';
require_once 'PEAR/Packager.php';
@@ -71,7 +71,8 @@
'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');
}
// }}}
@@ -386,6 +387,24 @@
}
pclose($fp);
}
+ 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;
}