dmitry Fri Jun 29 09:49:40 2007 UTC Modified files: /php-src run-tests.php Log: Fixed CGI tests http://cvs.php.net/viewvc.cgi/php-src/run-tests.php?r1=1.326&r2=1.327&diff_format=u Index: php-src/run-tests.php diff -u php-src/run-tests.php:1.326 php-src/run-tests.php:1.327 --- php-src/run-tests.php:1.326 Tue Jun 5 11:33:09 2007 +++ php-src/run-tests.php Fri Jun 29 09:49:40 2007 @@ -24,7 +24,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: run-tests.php,v 1.326 2007/06/05 11:33:09 tony2001 Exp $ */ +/* $Id: run-tests.php,v 1.327 2007/06/29 09:49:40 dmitry Exp $ */ /* Sanity check to ensure that pcre extension needed by this script is available. * In the event it is not, print a nice error message indicating that this script will @@ -407,7 +407,7 @@ $html_output = is_resource($html_file); break; case '--version': - echo '$Revision: 1.326 $'."\n"; + echo '$Revision: 1.327 $'."\n"; exit(1); default: echo "Illegal switch specified!\n"; @@ -1076,15 +1076,23 @@ /* 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'; + } } }
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php