cvs: php4 / run-tests.php
| From: | Stig Bakken | Date: | Mon, 27 Aug 2001 20:17:39 +0000 |
| Subject: | cvs: php4 / run-tests.php | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-7101@lists.php.net to get a copy of this message | ||
ssb Mon Aug 27 16:17:39 2001 EDT
Modified files:
/php4 run-tests.php
Log:
* Windows fix
Index: php4/run-tests.php
diff -u php4/run-tests.php:1.27 php4/run-tests.php:1.28
--- php4/run-tests.php:1.27 Mon Aug 27 12:39:49 2001
+++ php4/run-tests.php Mon Aug 27 16:17:36 2001
@@ -102,10 +102,10 @@
-function in_path($program)
+function in_path($program, $windows_p)
{
global $HTTP_ENV_VARS;
- if (substr(PHP_OS, 0, 3) == "WIN") {
+ if ($windows_p) {
$delim = ";";
$ext = ".exe";
} else {
@@ -114,6 +114,10 @@
}
$slash = DIRECTORY_SEPARATOR;
$path_components = explode($delim, $HTTP_ENV_VARS['PATH']);
+ if ($windows_p) {
+ $cwd = getcwd() . DIRECTORY_SEPARATOR;
+ array_unshift($path_components, "{$cwd}Release_TS_Inline",
"{$cwd}Release_TS");
+ }
foreach ($path_components as $path) {
$test = "{$path}{$slash}php{$ext}";
if (@is_executable($test)) {
@@ -156,7 +160,7 @@
$php = getcwd() . "/php{$ext}";
}
if (empty($php)) {
- $php = in_path("php");
+ $php = in_path("php", $windows_p);
}
if (empty($php)) {
dowriteln("Unable to find PHP executable (php{$ext}).");