]> granicus.if.org Git - php/commitdiff
Fixed CGI tests
authorDmitry Stogov <dmitry@php.net>
Fri, 29 Jun 2007 09:49:21 +0000 (09:49 +0000)
committerDmitry Stogov <dmitry@php.net>
Fri, 29 Jun 2007 09:49:21 +0000 (09:49 +0000)
run-tests.php

index b9a22ffb359cd0c3b9abad883d509374768805fd..647d337a1e9be36451c4bd301272cef85ccf73cd 100755 (executable)
@@ -1052,12 +1052,17 @@ TEST $file
                } elseif (!strncasecmp(PHP_OS, "win", 3) && file_exists(dirname($php) ."/php-cgi.exe")) {
                        $old_php = $php;
                        $php = realpath(dirname($php) ."/php-cgi.exe") .' -C ';
-               } elseif (file_exists("./sapi/cgi/php-cgi")) {
-                       $old_php = $php;
-                       $php = realpath("./sapi/cgi/php-cgi") . ' -C ';
                } else {
-                       show_result("SKIP", $tested, $tested_file, "reason: CGI not available");
-                       return 'SKIPPED';
+                       if (file_exists(dirname($php)."/../../sapi/cgi/php-cgi")) {
+                               $old_php = $php;
+                               $php = realpath(dirname($php)."/../../sapi/cgi/php-cgi") . ' -C ';
+                       } else if (file_exists("./sapi/cgi/php-cgi")) {
+                               $old_php = $php;
+                               $php = realpath("./sapi/cgi/php-cgi") . ' -C ';
+                       } else {
+                               show_result("SKIP", $tested, $tested_file, "reason: CGI not available");
+                               return 'SKIPPED';
+                       }
                }
        }