Skip to content

Load extensions on demand for AppVeyor CI #6993

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from

Conversation

cmb69
Copy link
Member

@cmb69 cmb69 commented May 16, 2021

This is so far only possible for a few extensions.

cmb69 added 2 commits May 16, 2021 16:55
PR php#6787 changed the behavior of the `--EXTENSIONS--` section, so that
not yet loaded extensions are dynamically loaded if possible.  However,
when no tests are specified for the runner, only tests for already
loaded extensions are run, what defeats the purpose of the improvement
of the `--EXTENSIONS--` behavior.  We cater to that by detecting
loadable extensions, and also run their tests.
Several extension test suites have already been changed to rely on the
new behavior of `--EXTENSIONS--` section, i.e. to dynamically load
required extensions on demand.  Thus, there is no need to load these
extensions always, which should improve the performance of executing
the tests.
@@ -51,7 +51,7 @@ 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,ftp
set EXT_EXCLUDE_FROM_TEST=bz2,exif,fileinfo,ffi,ftp,gmp,imap,ldap,oci8_12c,pdo_firebird,pdo_oci,snmp,soap,sodium,sqlite3,tidy
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be possible to convert this into a whitelist rather than a blacklist? I think that will make more sense going forward.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This value is passed to the config option --with-test-ini-ext-exclude where blacklisting generally makes sense (it's only used if --enable-snapshot-build is also given, and usually you want to work with all available extensions).

For the test runner on AppVeyor, whitelisting would make more sense in the long run; would be trivial to change if it wasn't batch sctipting. I'll try to have a look.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whitelist would be nice going forward, but I think we can land this as-is. Maybe add a comment that (most of) these are actually tested, just loaded via --EXTENSIONS--.

@@ -51,7 +51,7 @@ 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,ftp
set EXT_EXCLUDE_FROM_TEST=bz2,exif,fileinfo,ffi,ftp,gmp,imap,ldap,oci8_12c,pdo_firebird,pdo_oci,snmp,soap,sodium,sqlite3,tidy
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whitelist would be nice going forward, but I think we can land this as-is. Maybe add a comment that (most of) these are actually tested, just loaded via --EXTENSIONS--.

@krakjoe
Copy link
Member

krakjoe commented May 27, 2021

@cmb69 poke for landing :)

@cmb69
Copy link
Member Author

cmb69 commented May 27, 2021

Applied as 6f89da7 and ae6c1b0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants