]> granicus.if.org Git - php/commitdiff
Use CGI binary when CGI SAPI is there.
authorYasuo Ohgaki <yohgaki@php.net>
Tue, 12 Mar 2002 05:18:25 +0000 (05:18 +0000)
committerYasuo Ohgaki <yohgaki@php.net>
Tue, 12 Mar 2002 05:18:25 +0000 (05:18 +0000)
Make "php run-tests.php" work with cli SAPI.
# Anyone mind if I change spaces to tabs?
# Currently, it is using spaces and it's should use
# tabs just like C source.

run-tests.php

index 9f76c388bf89e0074d5fd1d33a68c4dca34900d6..ff8626fa75558d6269d5d8461137d01a2fe6b531 100755 (executable)
@@ -161,12 +161,14 @@ function initialize()
         }
     }
 
-    if (isset($_ENV["TOP_BUILDDIR"]) && @is_executable($_ENV["TOP_BUILDDIR"]."/sapi/cli/php{$ext}")) {
-        $php = $_ENV["TOP_BUILDDIR"]."/sapi/cli/php{$ext}";
-    } elseif (isset($_ENV["TOP_BUILDDIR"]) && @is_executable($_ENV["TOP_BUILDDIR"]."/php{$ext}")) {
+    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}")) {
+        $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}";
     }
     if (empty($php)) {
         $php = in_path("php", $windows_p);