]> granicus.if.org Git - php/commitdiff
Implemented request #62055 (Make run-tests.php support --CGI-- sections)
authorChristoph M. Becker <cmbecker69@gmx.de>
Mon, 30 Oct 2017 20:04:59 +0000 (21:04 +0100)
committerChristoph M. Becker <cmbecker69@gmx.de>
Mon, 30 Oct 2017 20:04:59 +0000 (21:04 +0100)
Not regarding the CGI section might even been seen as a bug, and since
server-tests.php appears to broken, anway[1][2], we implement it for
run-tests.php in the way as described[3] for server-tests.php, i.e.
respective tests are skipped if no CGI executable is found.

[1] <https://github.com/php/php-src/pull/222#commitcomment-2064387>
[2] <https://github.com/php/php-src/pull/1811#issuecomment-256677997>
[3] <https://qa.php.net/phpt_details.php#cgi_section>

NEWS
run-tests.php

diff --git a/NEWS b/NEWS
index 6e95adb2a19914cf2cc45e212488931f22a1243e..7834c293d2a2fa2d2eceb26e7a416ba4c9f30daa 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -119,6 +119,10 @@ PHP                                                                        NEWS
   . Fixed unzserialize(), to disable creation of unsupported data structures
     through manually crafted strings. (Dmitry)
 
+- Testing:
+  . Implemented request #62055 (Make run-tests.php support --CGI-- sections).
+    (cmb)
+
 - Zlib:
   . Added zlib/level context option for compress.zlib wrapper. (Sara)
 
index 5694df9ff6ec803c329b86205a84f535732e068b..1742514b5db475f8795498bc934f3419490e57d8 100755 (executable)
@@ -1406,7 +1406,7 @@ TEST $file
        $tested = trim($section_text['TEST']);
 
        /* For GET/POST/PUT 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['GZIP_POST']) || !empty($section_text['DEFLATE_POST']) || !empty($section_text['POST_RAW']) || !empty($section_text['PUT']) || !empty($section_text['COOKIE']) || !empty($section_text['EXPECTHEADERS'])) {
+       if (array_key_exists('CGI', $section_text) || !empty($section_text['GET']) || !empty($section_text['POST']) || !empty($section_text['GZIP_POST']) || !empty($section_text['DEFLATE_POST']) || !empty($section_text['POST_RAW']) || !empty($section_text['PUT']) || !empty($section_text['COOKIE']) || !empty($section_text['EXPECTHEADERS'])) {
                if (isset($php_cgi)) {
                        $old_php = $php;
                        $php = $php_cgi . ' -C ';