Problem/Motivation
BuildTestBase assumes that DRUPAL_ROOT and the APP_ROOT are the same. If you're using gitlabci for a contrib project this is not the case as it uses drupal/core-recommended where DRUPAL_ROOT is in a sub directory called docroot.
Proposed resolution
BuildTestBase should find the root composer.json and work out the APP ROOT and DRUPAL_ROOT from there.
Remaining tasks
User interface changes
API changes
Data model changes
Release notes snippet
Issue fork drupal-3403382
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
Comment #2
wim leersThis blocks #3394413: Enable GitLab CI, and use it to build out a core code base with Automatic Updates and Package Manager as core modules, which slows down the Automatic Updates initiative.
Comment #4
alexpottComment #5
alexpottThis is working in https://git.drupalcode.org/project/locale_deploy/-/tree/1.0.x/tests/src/... see #3403891: Fix build test on gitlabci
Comment #6
wim leersOnly one failure:
Which is extra special, because it's a test for the build test infrastructure, and it uses VFS. It's the only build test test using VFS.
I think the problem is that the build test infra in the MR is using
Composer\InstalledVersions, but in the VFS mock, there's nothing composer-related?Comment #7
wim leersI wonder if it would be simpler to not use VFS? 🤔
Comment #8
alexpottI've addressed @Wim Leers's review.
Comment #9
wim leersLooks perfect now! 🚀
Comment #11
catchCommitted/pushed to 11.x (which will also be 10.3.x once it's branched), thanks!
I think we could probably backport this to 10.2.x since it's test only, but can't get my head around whether there's any bc implications for contrib/custom build tests at all - feels like there are not, but leaving PTBP for a bit.
Comment #12
alexpottContrib build tests running on DrupalCI are completely broken atm. I wrote this MR to fix the 1 contrib module I know that has a build test. I think this is worth backporting. As you can see from the MR none of the core build tests have had to change due to this MR - it's only the tests of the build tests that have.
Comment #14
catchFair enough. Cherry-picked to 10.2.x.