Problem/Motivation

After #3577785: Use the minimal install profile in package_manager tests this will be the slowest build test. There are several test methods that are very repetitive that we can consolidate.

Steps to reproduce

Proposed resolution

Remaining tasks

Includes commits from #3577785: Use the minimal install profile in package_manager tests to enable seeing the effect on the job as a whole, so soft-postponed on that issue.

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

Issue fork drupal-3577840

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

catch created an issue. See original summary.

catch’s picture

Status: Active » Needs review
catch’s picture

Issue summary: View changes
catch’s picture

Issue tags: +Test suite performance

Very, very variable test runs on build tests, but I think this latest one is the quickest I've seen since package manager got added.

I bumped the concurrency a bit since there are several not-slow tests that can still take 30s or more so this ensures they don't run past the actually slow tests.

https://git.drupalcode.org/project/drupal/-/jobs/8827454

edit: the entire pipeline took 4m20s which is a new record! https://git.drupalcode.org/project/drupal/-/pipelines/763712

smustgrave’s picture

Good way to see the difference in gitlab? Could run locally but feel that may not count.

catch’s picture

Running before/after locally is probably a better comparison than gitlab, because local is a single environment whereas gitlab runs can differ between jobs. The absolute numbers will be completely different to gitlab but if it's consistently relatively faster it should also be faster on gitlab.

smustgrave’s picture

Okay I ran locally on my phpstorm 2025.2.4, Macbook Pro with M3 Max Chip, running ddev v1.25.1

Testing started at 1:38 PM ...
PHPUnit 11.5.50 by Sebastian Bergmann and contributors.

Runtime:       PHP 8.5.3
Configuration: /var/www/html/core/phpunit.xml
Time: 17:20.272, Memory: 14.00 MB

OK (18 tests, 92 assertions)

With the MR

Testing started at 1:58 PM ...
PHPUnit 11.5.50 by Sebastian Bergmann and contributors.

Runtime:       PHP 8.5.3
Configuration: /var/www/html/core/phpunit.xml
Time: 11:33.500, Memory: 14.00 MB

OK (13 tests, 92 assertions)

Process finished with exit code 0

net gain of almost 6 minutes with 5 less tests.

Before I mark why was the bigPipe change needed?

catch’s picture

Big pipe regression test was a commit for a different issue, which is already committed I think. Might need to spin that out to a separate follow-up.

smustgrave’s picture

I rebased and that change is still there want to revert?

smustgrave’s picture

Status: Needs review » Needs work

For the big pipe reverts. If I'm understanding correctly.

catch’s picture

Status: Needs work » Needs review

Managed to open a duplicate of this at #3590224: Speed up GenerateThemeTest but fortunately was looking at different test methods, closed that one and cherry-picked the changes over here.

On my local this takes 10 minutes to run locally. Latest version has it down to 6 minutes

10:08.402 vs. 06:38.742

On gitlab it's down to just under 80s on the latest run, this is from about 180s and sometimes more.

79.742s Drupal\BuildTests\Command\GenerateThemeTest 12 passed
https://git.drupalcode.org/project/drupal/-/jobs/9834719

smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

LGTM now, #8 wasn't too long ago.

  • longwave committed f18d77fe on 11.4.x
    test: #3577840 Consolidate test methods in GenerateThemeTest
    
    By: catch...

  • longwave committed 43f0e2de on 11.x
    test: #3577840 Consolidate test methods in GenerateThemeTest
    
    By: catch...

  • longwave committed 3a2d8705 on main
    test: #3577840 Consolidate test methods in GenerateThemeTest
    
    By: catch...
longwave’s picture

Version: main » 11.4.x-dev
Status: Reviewed & tested by the community » Fixed

Backported to keep things in sync and help with test runs in 11.x still.

Committed and pushed 3a2d8705b21 to main and 43f0e2dec95 to 11.x and f18d77fe00e to 11.4.x. Thanks!

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.