From 0184d1409c5ad919dd3bc0a6f51297a6cdcb212e Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Mon, 14 Jun 2021 12:25:14 +0200 Subject: [PATCH 1/7] AppVeyor: only load minimal set of exts; don't run unsupported test suites --- appveyor/test_task.bat | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/appveyor/test_task.bat b/appveyor/test_task.bat index 87eee6de8bd79..b1d0dad970fad 100644 --- a/appveyor/test_task.bat +++ b/appveyor/test_task.bat @@ -89,9 +89,20 @@ if not exist "%PHP_BUILD_CACHE_ENCHANT_DICT_DIR%\en_US.aff" ( mkdir %LOCALAPPDATA%\enchant\hunspell copy %PHP_BUILD_CACHE_ENCHANT_DICT_DIR%\* %LOCALAPPDATA%\enchant\hunspell -set TEST_PHPDBG_EXECUTABLE=%PHP_BUILD_OBJ_DIR%\Release -if "%THREAD_SAFE%" equ "1" set TEST_PHPDBG_EXECUTABLE=%TEST_PHPDBG_EXECUTABLE%_TS -set TEST_PHPDBG_EXECUTABLE=%TEST_PHPDBG_EXECUTABLE%\phpdbg.exe +set PHP_BUILD_DIR=%PHP_BUILD_OBJ_DIR%\Release +if "%THREAD_SAFE%" equ "1" set PHP_BUILD_DIR=%PHP_BUILD_DIR%_TS + +rem overwrite tmp-php.ini +echo extension_dir=%PHP_BUILD_DIR% > %PHP_BUILD_DIR%\tmp-php.ini +echo opcache.file_cache=%PHP_BUILD_DIR%\test_file_cache >> %PHP_BUILD_DIR%\tmp-php.ini +if "%OPCACHE%" equ "1" echo zend_extension=php_opcache.dll >> %PHP_BUILD_DIR%\tmp-php.ini + +rem remove ext dlls for which tests are not supported +for %%i in (imap ldap oci8_12c pdo_firebird pdo_oci snmp) do ( + del %PHP_BUILD_DIR%\php_%%i.dll +) + +set TEST_PHPDBG_EXECUTABLE=%PHP_BUILD_DIR%\phpdbg.exe mkdir c:\tests_tmp From 1a3ed4ce22157b6b71d0e5f1a2e3fe48723fcaf5 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Mon, 14 Jun 2021 15:26:04 +0200 Subject: [PATCH 2/7] always load openssl --- appveyor/test_task.bat | 1 + 1 file changed, 1 insertion(+) diff --git a/appveyor/test_task.bat b/appveyor/test_task.bat index b1d0dad970fad..f419f2d083153 100644 --- a/appveyor/test_task.bat +++ b/appveyor/test_task.bat @@ -96,6 +96,7 @@ rem overwrite tmp-php.ini echo extension_dir=%PHP_BUILD_DIR% > %PHP_BUILD_DIR%\tmp-php.ini echo opcache.file_cache=%PHP_BUILD_DIR%\test_file_cache >> %PHP_BUILD_DIR%\tmp-php.ini if "%OPCACHE%" equ "1" echo zend_extension=php_opcache.dll >> %PHP_BUILD_DIR%\tmp-php.ini +echo extension=php_openssl.dll >> %PHP_BUILD_DIR%\tmp-php.ini rem remove ext dlls for which tests are not supported for %%i in (imap ldap oci8_12c pdo_firebird pdo_oci snmp) do ( From 1e9363ff91c7852a1ebd60145f47b869546c4a77 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Mon, 14 Jun 2021 16:12:32 +0200 Subject: [PATCH 3/7] test needs mbstring --- ext/exif/tests/bug68547.phpt | 1 + 1 file changed, 1 insertion(+) diff --git a/ext/exif/tests/bug68547.phpt b/ext/exif/tests/bug68547.phpt index 27ed054bbed38..6a279394f9595 100644 --- a/ext/exif/tests/bug68547.phpt +++ b/ext/exif/tests/bug68547.phpt @@ -1,6 +1,7 @@ --TEST-- Bug #68547 (Exif Header component value check error) --EXTENSIONS-- +mbstring exif --FILE-- Date: Mon, 14 Jun 2021 16:42:00 +0200 Subject: [PATCH 4/7] fix failing com test --- ext/com_dotnet/tests/bug77578.phpt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/com_dotnet/tests/bug77578.phpt b/ext/com_dotnet/tests/bug77578.phpt index 2bf2cbf2c0303..abb68cc163f4f 100644 --- a/ext/com_dotnet/tests/bug77578.phpt +++ b/ext/com_dotnet/tests/bug77578.phpt @@ -9,7 +9,7 @@ com_dotnet $php = PHP_BINARY; $ini = php_ini_loaded_file(); $iniopt = $ini ? "-c $ini" : ''; -$command = "$php $iniopt -d com.autoregister_typelib=1 -r \"new COM('WbemScripting.SWbemLocator');\""; +$command = "$php $iniopt -d extension=com_dotnet -d com.autoregister_typelib=1 -r \"new COM('WbemScripting.SWbemLocator');\""; exec($command, $output, $status); var_dump($output, $status); ?> From 45224d2084e42b73022b382830a79ae8ba528a0a Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Mon, 14 Jun 2021 17:11:36 +0200 Subject: [PATCH 5/7] don't generate test php.ini in the first place --- appveyor/build_task.bat | 7 +------ appveyor/test_task.bat | 2 +- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/appveyor/build_task.bat b/appveyor/build_task.bat index ce199fa0f35a5..61e3042fadd28 100644 --- a/appveyor/build_task.bat +++ b/appveyor/build_task.bat @@ -51,11 +51,6 @@ if %errorlevel% neq 0 exit /b 3 if "%THREAD_SAFE%" equ "0" set ADD_CONF=%ADD_CONF% --disable-zts if "%INTRINSICS%" neq "" set ADD_CONF=%ADD_CONF% --enable-native-intrinsics=%INTRINSICS% -set EXT_EXCLUDE_FROM_TEST=snmp,oci8_12c,pdo_oci,pdo_firebird,ldap,imap -rem the following exts are tested via --EXTENSIONS--; update as necessary -set EXT_EXCLUDE_FROM_TEST=bz2,exif,fileinfo,ffi,ftp,gd,gmp,soap,sodium,sqlite3,tidy,%EXT_EXCLUDE_FROM_TEST% -if "%OPCACHE%" equ "0" set EXT_EXCLUDE_FROM_TEST=%EXT_EXCLUDE_FROM_TEST%,opcache - set CFLAGS=/W1 /WX cmd /c configure.bat ^ @@ -66,7 +61,7 @@ cmd /c configure.bat ^ --enable-object-out-dir=%PHP_BUILD_OBJ_DIR% ^ --with-php-build=%DEPS_DIR% ^ %ADD_CONF% ^ - --with-test-ini-ext-exclude=%EXT_EXCLUDE_FROM_TEST% + --disable-test-ini if %errorlevel% neq 0 exit /b 3 nmake /NOLOGO diff --git a/appveyor/test_task.bat b/appveyor/test_task.bat index f419f2d083153..468f2c8b773a8 100644 --- a/appveyor/test_task.bat +++ b/appveyor/test_task.bat @@ -92,7 +92,7 @@ copy %PHP_BUILD_CACHE_ENCHANT_DICT_DIR%\* %LOCALAPPDATA%\enchant\hunspell set PHP_BUILD_DIR=%PHP_BUILD_OBJ_DIR%\Release if "%THREAD_SAFE%" equ "1" set PHP_BUILD_DIR=%PHP_BUILD_DIR%_TS -rem overwrite tmp-php.ini +rem generate tmp-php.ini echo extension_dir=%PHP_BUILD_DIR% > %PHP_BUILD_DIR%\tmp-php.ini echo opcache.file_cache=%PHP_BUILD_DIR%\test_file_cache >> %PHP_BUILD_DIR%\tmp-php.ini if "%OPCACHE%" equ "1" echo zend_extension=php_opcache.dll >> %PHP_BUILD_DIR%\tmp-php.ini From 9ec09133bcb6aeff0de76ed2e8bf35eb392bf9e8 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Mon, 14 Jun 2021 17:36:59 +0200 Subject: [PATCH 6/7] rename tmp-php.ini to php.ini --- appveyor/test_task.bat | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/appveyor/test_task.bat b/appveyor/test_task.bat index 468f2c8b773a8..2a85f3081b557 100644 --- a/appveyor/test_task.bat +++ b/appveyor/test_task.bat @@ -92,11 +92,11 @@ copy %PHP_BUILD_CACHE_ENCHANT_DICT_DIR%\* %LOCALAPPDATA%\enchant\hunspell set PHP_BUILD_DIR=%PHP_BUILD_OBJ_DIR%\Release if "%THREAD_SAFE%" equ "1" set PHP_BUILD_DIR=%PHP_BUILD_DIR%_TS -rem generate tmp-php.ini -echo extension_dir=%PHP_BUILD_DIR% > %PHP_BUILD_DIR%\tmp-php.ini -echo opcache.file_cache=%PHP_BUILD_DIR%\test_file_cache >> %PHP_BUILD_DIR%\tmp-php.ini -if "%OPCACHE%" equ "1" echo zend_extension=php_opcache.dll >> %PHP_BUILD_DIR%\tmp-php.ini -echo extension=php_openssl.dll >> %PHP_BUILD_DIR%\tmp-php.ini +rem generate php.ini +echo extension_dir=%PHP_BUILD_DIR% > %PHP_BUILD_DIR%\php.ini +echo opcache.file_cache=%PHP_BUILD_DIR%\test_file_cache >> %PHP_BUILD_DIR%\php.ini +if "%OPCACHE%" equ "1" echo zend_extension=php_opcache.dll >> %PHP_BUILD_DIR%\php.ini +echo extension=php_openssl.dll >> %PHP_BUILD_DIR%\php.ini rem remove ext dlls for which tests are not supported for %%i in (imap ldap oci8_12c pdo_firebird pdo_oci snmp) do ( From 049a7412bb9e14f3beb911cff92c778fbb537cd8 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Mon, 14 Jun 2021 18:39:03 +0200 Subject: [PATCH 7/7] create file_cache folder --- appveyor/test_task.bat | 2 ++ 1 file changed, 2 insertions(+) diff --git a/appveyor/test_task.bat b/appveyor/test_task.bat index 2a85f3081b557..7c559daee95ba 100644 --- a/appveyor/test_task.bat +++ b/appveyor/test_task.bat @@ -92,10 +92,12 @@ copy %PHP_BUILD_CACHE_ENCHANT_DICT_DIR%\* %LOCALAPPDATA%\enchant\hunspell set PHP_BUILD_DIR=%PHP_BUILD_OBJ_DIR%\Release if "%THREAD_SAFE%" equ "1" set PHP_BUILD_DIR=%PHP_BUILD_DIR%_TS +mkdir %PHP_BUILD_DIR%\test_file_cache rem generate php.ini echo extension_dir=%PHP_BUILD_DIR% > %PHP_BUILD_DIR%\php.ini echo opcache.file_cache=%PHP_BUILD_DIR%\test_file_cache >> %PHP_BUILD_DIR%\php.ini if "%OPCACHE%" equ "1" echo zend_extension=php_opcache.dll >> %PHP_BUILD_DIR%\php.ini +rem work-around for some spawned PHP processes requiring OpenSSL echo extension=php_openssl.dll >> %PHP_BUILD_DIR%\php.ini rem remove ext dlls for which tests are not supported