Skip to content

Commit 7ae7132

Browse files
committed
Apply opcache config to extension tests
1 parent bd34163 commit 7ae7132

5 files changed

Lines changed: 11 additions & 4 deletions

File tree

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
opcache.enable=1
2+
opcache.enable_cli=1
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
opcache.enable=1
2+
opcache.enable_cli=1

php/BuildPhp/config/ini/opcache-x64.ini renamed to php/BuildPhp/config/ini/opcache-php-x64.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ opcache.file_cache_fallback=1
1212
opcache.protect_memory=1
1313
opcache.jit_buffer_size=64M
1414
opcache.jit=tracing
15-
opcache.record_warnings=1
15+
opcache.record_warnings=1
File renamed without changes.

php/BuildPhp/private/Set-PhpIniForTests.ps1

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,12 @@ function Set-PhpIniForTests {
3636
Copy-Item $iniTemplate $ini -Force
3737
Add-Content $ini "extension_dir=$BuildDirectory\phpbin\ext"
3838

39-
if ($Opcache -eq "opcache" -and $TestType -eq "php") {
40-
New-Item "$BuildDirectory/file_cache" -ItemType "directory" > $null 2>&1
41-
$opcacheIni = Get-Content "$PSScriptRoot\..\config\ini\opcache-$Arch.ini" -Raw
39+
if ($Opcache -eq "opcache") {
40+
if ($TestType -eq "php") {
41+
New-Item "$BuildDirectory/file_cache" -ItemType "directory" -Force > $null 2>&1
42+
}
43+
$opcacheIniPath = "$PSScriptRoot\..\config\ini\opcache-$TestType-$Arch.ini"
44+
$opcacheIni = Get-Content $opcacheIniPath -Raw -ErrorAction Stop
4245
$opcacheIni = $opcacheIni.Replace("OPCACHE_ERROR_LOG_PATH", "$BuildDirectory\opcache_error.log")
4346
$opcacheIni = $opcacheIni.Replace("OPCACHE_FILE_CACHE_PATH", "$BuildDirectory\file_cache")
4447
Add-Content $ini $opcacheIni

0 commit comments

Comments
 (0)