On Tue, Feb 16, 2016 at 7:48 PM, Gergo Tisza gtisza@wikimedia.org wrote:
Awesome, thanks Timo & Bryan!
On Tue, Feb 16, 2016 at 9:19 AM, Krinkle krinklemail@gmail.com wrote:
- PHPUnit is now loaded from $WORKSPACE/vendor instead of the frozen
legacy
copy at /srv/deployment/integration/phpunit.
How does that work for mwext-testextensions? Will each extension run with its own phpunit version, or the core one?
My statement "loaded from $WORKSPACE/vendor" was an oversimplification. In actuality, it triggers a composer fetch in the MediaWiki install directory – wherever it might be for that job ($MW_INSTALL_PATH, typically workspace or workspace/src).
PHPUnit is then naturally called at runtime via the autoloader.
As before, extensions cannot override which PHPUnit version is used. However, each build does fetch its own copy based on core's composer.json - for the branch/commit of mediawiki-core used for that extensions' build (so branches work as expected, e.g. upgrading PHPUnit in master doesn't affect core or extension jobs for older release branches).
This is similar to how generic npm and composer jobs for libraries worked already. Though unlike libraries, extensions are typically not standalone projects. That's why the test entry point is in core. The extension is registered with core. And core's test entry point is invoked with parameters to skip core's test suite ("php mediawiki/tests/phpunit.php --testsuite extensions")
-- Krinkle