diff options
| author | Wez Furlong <wez@php.net> | 2002-03-17 13:16:35 +0000 |
|---|---|---|
| committer | Wez Furlong <wez@php.net> | 2002-03-17 13:16:35 +0000 |
| commit | b98074ee86f1b3bc7d938f12a08fe715771f8445 (patch) | |
| tree | eaf3e244bef541f3b1bb678fab2a1a3f623b497e | |
| parent | 20f2e6328977c2086d6e9c03eb528f339004463b (diff) | |
| download | php-git-b98074ee86f1b3bc7d938f12a08fe715771f8445.tar.gz | |
fix problems with cgi/cli sapi when running tests
| -rwxr-xr-x | run-tests.php | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/run-tests.php b/run-tests.php index 0fd24ba2a7..a6797e283b 100755 --- a/run-tests.php +++ b/run-tests.php @@ -161,15 +161,21 @@ function initialize() } } - if (isset($_ENV["TOP_BUILDDIR"]) && @is_executable($_ENV["TOP_BUILDDIR"]."/php{$ext}")) { - $php = $_ENV["TOP_BUILDDIR"]."/php{$ext}"; - } elseif (isset($_ENV["TOP_BUILDDIR"]) && @is_executable($_ENV["TOP_BUILDDIR"]."/sapi/cli/php{$ext}")) { +/* Lets check for cli first, since the new build system runs the cli sapi, + and this script makes assumptions about the executeable based on things + it determines from *this* instance. If the sapis are not the same, tests + will fail due to silly things like headers not being ignored in the right + places */ + + if (isset($_ENV["TOP_BUILDDIR"]) && @is_executable($_ENV["TOP_BUILDDIR"]."/sapi/cli/php{$ext}")) { $php = $_ENV["TOP_BUILDDIR"]."/sapi/cli/php{$ext}"; - } elseif (@is_executable("./php{$ext}")) { - $php = getcwd() . "/php{$ext}"; } elseif (@is_executable("./sapi/cli/php{$ext}")) { $php = getcwd() . "/sapi/cli/php{$ext}"; - } + } elseif (isset($_ENV["TOP_BUILDDIR"]) && @is_executable($_ENV["TOP_BUILDDIR"]."/php{$ext}")) { + $php = $_ENV["TOP_BUILDDIR"]."/php{$ext}"; + } elseif (@is_executable("./php{$ext}")) { + $php = getcwd() . "/php{$ext}"; + } // Test result can be bogus, if we use php binary in path. - yohgaki@php.net // if (empty($php)) { // $php = in_path("php", $windows_p); |
