]> granicus.if.org Git - php/commitdiff
Fix test runs with Opcache enabled PHP on top
authorAnatol Belski <ab@php.net>
Fri, 13 Jan 2017 13:37:37 +0000 (14:37 +0100)
committerAnatol Belski <ab@php.net>
Fri, 13 Jan 2017 13:37:37 +0000 (14:37 +0100)
Writing to the same file, while it's cached, is an issue.

run-tests.php

index 40162881c56ef9d9aa3947c0d91825105821cfde..d8d24cf5482db7f1bc66f50d3d7457f106ae540c 100755 (executable)
@@ -273,6 +273,9 @@ More .INIs  : " , (function_exists(\'php_ini_scanned_files\') ? str_replace("\n"
                $phpdbg_info = '';
        }
 
+       if (function_exists('opcache_invalidate')) {
+               opcache_invalidate($info_file, true);
+       }
        @unlink($info_file);
 
        // load list of enabled extensions
@@ -293,6 +296,9 @@ More .INIs  : " , (function_exists(\'php_ini_scanned_files\') ? str_replace("\n"
                }
        }
 
+       if (function_exists('opcache_invalidate')) {
+               opcache_invalidate($info_file, true);
+       }
        @unlink($info_file);
 
        // Write test context information.