Tests cannot be filtered by @group when running with _phpunit_concurrent=1
Problem/Motivation
Changes in #3384581: Improve concurrency: replace experimental package with core script mean that when running a phpunit step with _PHPUNIT_CONCURRENT=1 the tests are executed using core's run-tests.sh script instead of a direct call to phpunit. This has created (at least) two separate side-effects
- Arguments passed via
_PHPUNIT_EXTRAare not necessarily common between the two scripts. Switching between _PHPUNIT_CONCURRENT=0 and _PHPUNIT_CONCURRENT=1 is no longer a simple toggle, and the value of _PHPUNIT_EXTRA may need to differ - The set of tests to be run can no longer be filtered. This used to be possible by passing
--group something
A temporary solution for contib maintainers is to leave _PHPUNIT_CONCURRENT=0 to preserve existing behavior.
Steps to reproduce
Proposed resolution
Add a new template variable _PHPUNIT_TESTGROUPS which can take three types of value:
-
--allto execute all tests (this is the pre-filled default) - a comma-separated list of test @group(s) to execute
- no value (empty) - if the test groups are provided by other customisations, such as running via a parallel job matrix
Remaining tasks
User interface changes
API changes
Data model changes
Related issue: Issue #3384581
Edited by drupalbot