diff options
| author | Stig Bakken <ssb@php.net> | 2001-08-27 20:17:36 +0000 |
|---|---|---|
| committer | Stig Bakken <ssb@php.net> | 2001-08-27 20:17:36 +0000 |
| commit | d1d848c1712c2dd4b8eacda9be2968c05c29ead2 (patch) | |
| tree | 59aca18519e269ea090c249664c2ccc7c1d77832 | |
| parent | 1c6bfcaa33f1c3de47768736a04f63b5e3616c0a (diff) | |
| download | php-git-d1d848c1712c2dd4b8eacda9be2968c05c29ead2.tar.gz | |
* Windows fix
| -rwxr-xr-x | run-tests.php | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/run-tests.php b/run-tests.php index 40ceac9ecc..1cc4592c2b 100755 --- a/run-tests.php +++ b/run-tests.php @@ -102,10 +102,10 @@ function create_modules_2_test_list() { -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 @@ function in_path($program) } $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 @@ function initialize() $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})."); |
