Browse Source

Fixed CGI tests

PHAR_1_2
Dmitry Stogov 19 years ago
parent
commit
b17b8ea3c1
  1. 20
      run-tests.php

20
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';
}
}
}

Loading…
Cancel
Save