cvs: php-src(PHP_4_3) /pear/PEAR/Command Package.php
| From: | Greg Beaver | Date: | Thu, 19 Feb 2004 15:55:37 +0000 |
| Subject: | cvs: php-src(PHP_4_3) /pear/PEAR/Command Package.php | ||
| Groups: | php.pear.cvs php.pear.core | ||
| Request: | Send a blank email to pear-core+get-105@lists.php.net to get a copy of this message | ||
cellog Thu Feb 19 10:55:37 2004 EDT
Modified files: (Branch: PHP_4_3)
/php-src/pear/PEAR/Command Package.php
Log:
MFH
http://cvs.php.net/diff.php/php-src/pear/PEAR/Command/Package.php?r1=1.42.2.15&r2=1.42.2.16&ty=u
Index: php-src/pear/PEAR/Command/Package.php
diff -u php-src/pear/PEAR/Command/Package.php:1.42.2.15
php-src/pear/PEAR/Command/Package.php:1.42.2.16
--- php-src/pear/PEAR/Command/Package.php:1.42.2.15 Sun Jan 25 18:19:59 2004
+++ php-src/pear/PEAR/Command/Package.php Thu Feb 19 10:55:37 2004
@@ -17,7 +17,7 @@
// | Martin Jansen <mj@php.net> |
// +----------------------------------------------------------------------+
//
-// $Id: Package.php,v 1.42.2.15 2004/01/25 23:19:59 pajoye Exp $
+// $Id: Package.php,v 1.42.2.16 2004/02/19 15:55:37 cellog Exp $
require_once 'PEAR/Common.php';
require_once 'PEAR/Command/Common.php';
@@ -435,8 +435,10 @@
function doRunTests($command, $options, $params)
{
$cwd = getcwd();
- $php = PHP_BINDIR . '/php' . (OS_WINDOWS ? '.exe' : '');
+ $php = $this->config->get('php_bin');
putenv("TEST_PHP_EXECUTABLE=$php");
+ // all core PEAR tests use this constant to determine whether they should be run or not
+ putenv("PHP_PEAR_RUNTESTS=1");
$ip = ini_get("include_path");
$ps = OS_WINDOWS ? ';' : ':';
$run_tests = $rtsts = $this->config->get('php_dir') . DIRECTORY_SEPARATOR .
'run-tests.php';
@@ -447,9 +449,19 @@
"file from the sources of your PHP
distribution to $rtsts");
}
}
- $plist = implode(" ", $params);
- $cmd = "$php -C -d include_path=$cwd$ps$ip -f $run_tests -- $plist";
- system($cmd);
+ if (OS_WINDOWS) {
+ // note, this requires a slightly modified version of run-tests.php
+ // for some setups
+ // unofficial download location is in the pear-dev archives
+ $argv = $params;
+ array_unshift($argv, $run_tests);
+ $argc = count($argv);
+ include $run_tests;
+ } else {
+ $plist = implode(' ', $params);
+ $cmd = "$php -d include_path=$cwd$ps$ip -f $run_tests -- $plist";
+ system($cmd);
+ }
return true;
}