]> granicus.if.org Git - php/commitdiff
MFH:- Made tests that require CGI skipped if it is not available
authorfoobar <sniper@php.net>
Wed, 7 Dec 2005 11:28:58 +0000 (11:28 +0000)
committerfoobar <sniper@php.net>
Wed, 7 Dec 2005 11:28:58 +0000 (11:28 +0000)
run-tests.php

index 3678ff8121d7360c6d7709e062bfa345b8bf6689..b67d6dc1775d2cf05e1bf4a3da562194344638ea 100755 (executable)
@@ -814,6 +814,7 @@ TEST $file
                'TEST'   => '',
                'SKIPIF' => '',
                'GET'    => '',
+               'POST'   => '',
                'ARGS'   => '',
        );
 
@@ -883,17 +884,20 @@ TEST $file
                return 'BORKED';
        }
 
+       $shortname = str_replace($cwd.'/', '', $file);
+       $tested = trim($section_text['TEST'])." [$shortname]";
+
        /* 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']))) {
                if (file_exists("./sapi/cgi/php")) {
                        $old_php = $php;
                        $php = realpath("./sapi/cgi/php") . ' -C ';
+               } else {
+                       show_result("SKIP", $tested, $file, "reason: CGI not available");
+                       return 'SKIPPED';
                }
        }
 
-       $shortname = str_replace($cwd.'/', '', $file);
-       $tested = trim($section_text['TEST'])." [$shortname]";
-
        show_test($test_idx, $shortname);
 
        if (is_array($IN_REDIRECT)) {