]> granicus.if.org Git - php/commitdiff
Delete temporary .post files of run-tests.php
authorChristoph M. Becker <cmbecker69@gmx.de>
Mon, 7 Oct 2019 10:13:02 +0000 (12:13 +0200)
committerChristoph M. Becker <cmbecker69@gmx.de>
Mon, 7 Oct 2019 10:17:41 +0000 (12:17 +0200)
Commit 5649267[1] changed run-tests.php to only delete .post files for
passing tests.  However, that code wouldn't be exercised at all, since
`run_test()` already returned, so we move the deletion upwards.

[1]
<http://git.php.net/?p=php-src.git;a=commit;h=5649267b257c78e46a934434c0bff894e0b5b694>

run-tests.php

index 89525f518b240d79171cd0583db488f2f96f25e0..909a8ea9b7b9f44450c0a2b6f5507bfb917455da 100755 (executable)
@@ -2624,6 +2624,7 @@ COMMAND $cmd
                        if (!$cfg['keep']['php']) {
                                @unlink($test_file);
                        }
+                       @unlink($tmp_post);
 
                        if (!$leaked && !$failed_headers) {
                                if (isset($section_text['XFAIL'])) {
@@ -2653,6 +2654,7 @@ COMMAND $cmd
                        if (!$cfg['keep']['php']) {
                                @unlink($test_file);
                        }
+                       @unlink($tmp_post);
 
                        if (!$leaked && !$failed_headers) {
                                if (isset($section_text['XFAIL'])) {
@@ -2692,10 +2694,6 @@ COMMAND $cmd
                $restype[] = 'WARN';
        }
 
-       if ($passed) {
-               @unlink($tmp_post);
-       }
-
        if (!$passed) {
                if (isset($section_text['XFAIL'])) {
                        $restype[] = 'XFAIL';