Skip to content

Commit 139a73b

Browse files
committed
Improve performance of AppVeyor test runs
We only load a minimum set of extensions, and rely on dynamic loading of others due to `--EXTENSION--` triggers. We do not run the imap, ldap and snmp test suites, because most of the tests would be skipped after timeouts anyway. Closes GH-7150.
1 parent 859524c commit 139a73b

File tree

4 files changed

+20
-10
lines changed

4 files changed

+20
-10
lines changed

appveyor/build_task.bat

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,6 @@ if %errorlevel% neq 0 exit /b 3
5151
if "%THREAD_SAFE%" equ "0" set ADD_CONF=%ADD_CONF% --disable-zts
5252
if "%INTRINSICS%" neq "" set ADD_CONF=%ADD_CONF% --enable-native-intrinsics=%INTRINSICS%
5353

54-
set EXT_EXCLUDE_FROM_TEST=snmp,oci8_12c,pdo_oci,pdo_firebird,ldap,imap
55-
rem the following exts are tested via --EXTENSIONS--; update as necessary
56-
set EXT_EXCLUDE_FROM_TEST=bz2,exif,fileinfo,ffi,ftp,gd,gmp,soap,sodium,sqlite3,tidy,%EXT_EXCLUDE_FROM_TEST%
57-
if "%OPCACHE%" equ "0" set EXT_EXCLUDE_FROM_TEST=%EXT_EXCLUDE_FROM_TEST%,opcache
58-
5954
set CFLAGS=/W1 /WX
6055

6156
cmd /c configure.bat ^
@@ -66,7 +61,7 @@ cmd /c configure.bat ^
6661
--enable-object-out-dir=%PHP_BUILD_OBJ_DIR% ^
6762
--with-php-build=%DEPS_DIR% ^
6863
%ADD_CONF% ^
69-
--with-test-ini-ext-exclude=%EXT_EXCLUDE_FROM_TEST%
64+
--disable-test-ini
7065
if %errorlevel% neq 0 exit /b 3
7166

7267
nmake /NOLOGO

appveyor/test_task.bat

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,23 @@ if not exist "%PHP_BUILD_CACHE_ENCHANT_DICT_DIR%\en_US.aff" (
8989
mkdir %LOCALAPPDATA%\enchant\hunspell
9090
copy %PHP_BUILD_CACHE_ENCHANT_DICT_DIR%\* %LOCALAPPDATA%\enchant\hunspell
9191

92-
set TEST_PHPDBG_EXECUTABLE=%PHP_BUILD_OBJ_DIR%\Release
93-
if "%THREAD_SAFE%" equ "1" set TEST_PHPDBG_EXECUTABLE=%TEST_PHPDBG_EXECUTABLE%_TS
94-
set TEST_PHPDBG_EXECUTABLE=%TEST_PHPDBG_EXECUTABLE%\phpdbg.exe
92+
set PHP_BUILD_DIR=%PHP_BUILD_OBJ_DIR%\Release
93+
if "%THREAD_SAFE%" equ "1" set PHP_BUILD_DIR=%PHP_BUILD_DIR%_TS
94+
95+
mkdir %PHP_BUILD_DIR%\test_file_cache
96+
rem generate php.ini
97+
echo extension_dir=%PHP_BUILD_DIR% > %PHP_BUILD_DIR%\php.ini
98+
echo opcache.file_cache=%PHP_BUILD_DIR%\test_file_cache >> %PHP_BUILD_DIR%\php.ini
99+
if "%OPCACHE%" equ "1" echo zend_extension=php_opcache.dll >> %PHP_BUILD_DIR%\php.ini
100+
rem work-around for some spawned PHP processes requiring OpenSSL
101+
echo extension=php_openssl.dll >> %PHP_BUILD_DIR%\php.ini
102+
103+
rem remove ext dlls for which tests are not supported
104+
for %%i in (imap ldap oci8_12c pdo_firebird pdo_oci snmp) do (
105+
del %PHP_BUILD_DIR%\php_%%i.dll
106+
)
107+
108+
set TEST_PHPDBG_EXECUTABLE=%PHP_BUILD_DIR%\phpdbg.exe
95109

96110
mkdir c:\tests_tmp
97111

ext/com_dotnet/tests/bug77578.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ com_dotnet
99
$php = PHP_BINARY;
1010
$ini = php_ini_loaded_file();
1111
$iniopt = $ini ? "-c $ini" : '';
12-
$command = "$php $iniopt -d com.autoregister_typelib=1 -r \"new COM('WbemScripting.SWbemLocator');\"";
12+
$command = "$php $iniopt -d extension=com_dotnet -d com.autoregister_typelib=1 -r \"new COM('WbemScripting.SWbemLocator');\"";
1313
exec($command, $output, $status);
1414
var_dump($output, $status);
1515
?>

ext/exif/tests/bug68547.phpt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
--TEST--
22
Bug #68547 (Exif Header component value check error)
33
--EXTENSIONS--
4+
mbstring
45
exif
56
--FILE--
67
<?php

0 commit comments

Comments
 (0)