From b17b8ea3c11b5bcfa5f898a9560d92f353996a02 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Fri, 29 Jun 2007 09:49:40 +0000 Subject: [PATCH] Fixed CGI tests --- run-tests.php | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/run-tests.php b/run-tests.php index 5e0ed363fe..37301870b1 100755 --- a/run-tests.php +++ b/run-tests.php @@ -1076,15 +1076,23 @@ TEST $file /* For GET/POST tests, check if cgi sapi is available and if it is, use it. */ if (!empty($section_text['GET']) || !empty($section_text['POST']) || !empty($section_text['POST_RAW']) || !empty($section_text['COOKIE'])) { - if (!strncasecmp(PHP_OS, "win", 3) && file_exists(dirname($php) ."/php-cgi.exe")) { + if (isset($php_cgi)) { $old_php = $php; - $php = realpath(dirname($php) ."/php-cgi.exe") .' -C '; - } elseif (file_exists("./sapi/cgi/php-cgi")) { + $php = $php_cgi .' -C '; + } else if (!strncasecmp(PHP_OS, "win", 3) && file_exists(dirname($php) ."/php-cgi.exe")) { $old_php = $php; - $php = realpath("./sapi/cgi/php-cgi") . ' -C '; + $php = realpath(dirname($php) ."/php-cgi.exe") .' -C '; } else { - show_result("SKIP", $tested, $tested_file, $unicode_semantics, "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'; + } } } -- 2.40.0