]> granicus.if.org Git - php/commitdiff
Don't use Opcache with the master test process
authorAnatol Belski <ab@php.net>
Sun, 10 Mar 2019 12:56:32 +0000 (13:56 +0100)
committerAnatol Belski <ab@php.net>
Sun, 10 Mar 2019 12:56:32 +0000 (13:56 +0100)
Additionally, enable opcache.file_cache to mitigate possible reattach
failures in the tests.

win32/build/Makefile
win32/build/confutils.js

index 233f38c03766224cb62d7f8c55d5514b12545d5a..26b73b625ac678ac85367d6745c1bd4c4dacff76 100644 (file)
@@ -193,7 +193,7 @@ run: set-tmp-env
        $(DEBUGGER_CMD) $(DEBUGGER_ARGS) "$(BUILD_DIR)\php.exe" $(ARGS)
 !else
 test: set-tmp-env
-       $(DEBUGGER_CMD) $(DEBUGGER_ARGS) "$(BUILD_DIR)\php.exe" -n -c $(PHP_TEST_INI_PATH) -d open_basedir= -d output_buffering=0 -d memory_limit=-1 run-tests.php -p "$(BUILD_DIR)\php.exe" -n -c $(PHP_TEST_INI_PATH) $(TESTS)
+       $(DEBUGGER_CMD) $(DEBUGGER_ARGS) "$(BUILD_DIR)\php.exe" -n -d open_basedir= -d output_buffering=0 -d memory_limit=-1 run-tests.php -p "$(BUILD_DIR)\php.exe" -n -c $(PHP_TEST_INI_PATH) $(TESTS)
 
 run: set-tmp-env
        $(DEBUGGER_CMD) $(DEBUGGER_ARGS) "$(BUILD_DIR)\php.exe" -n -c $(PHP_TEST_INI_PATH) $(ARGS)
index 384cbde140f444e2384c5151ac6a34c276223508..bf1a4b7cccdd219124559abe9b1ecd8b943dedfc 100644 (file)
@@ -2044,6 +2044,19 @@ function generate_tmp_php_ini()
 
                if (!is_on_exclude_list_for_test_ini(ext_list, ext_name)) {
                        INI.WriteLine(directive + "=php_" + ext_name + ".dll");
+
+                       if ("opcache" == ext_name) {
+                               var dir = get_define("BUILD_DIR") + "\\" + "test_file_cache";
+                               if (FSO.FolderExists(dir)) {
+                                       STDOUT.Write(execute("powershell -Command Remove-Item -path \"\\\\?\\" + dir + "\" -recurse"));
+                               }
+                               FSO.CreateFolder(dir);
+
+                               /* Fallback is implied, if filecache is enabled. */
+                               INI.WriteLine("opcache.file_cache=" + dir);
+                               INI.WriteLine("opcache.enable=1");
+                               INI.WriteLine("opcache.enable_cli=1");
+                       }
                }
        }