summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@php.net>2007-06-29 09:49:40 +0000
committerDmitry Stogov <dmitry@php.net>2007-06-29 09:49:40 +0000
commitb17b8ea3c11b5bcfa5f898a9560d92f353996a02 (patch)
treeb5cb6976c89580a9ea96e45c19cf9969ab16168a
parent57108894d09ac70c218a8cbe7c28e5193f606e6c (diff)
downloadphp-git-b17b8ea3c11b5bcfa5f898a9560d92f353996a02.tar.gz
Fixed CGI tests
-rwxr-xr-xrun-tests.php20
1 files 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';
+ }
}
}