Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
Not sure how this was missed or how we didn't discover this earlier. But it looks like we don't have Build added as a test type to bootstrap. See https://www.drupal.org/pift-ci-job/1428057
Proposed resolution
Remaining tasks
User interface changes
API changes
Data model changes
Release notes snippet
Comment | File | Size | Author |
---|---|---|---|
#12 | 3086373-12.patch | 1.4 KB | heddn |
Comments
Comment #2
heddnComment #3
heddnComment #4
MixologicThis is a sensible change - made me go looking for more things where all the test suites are enumerated but we didnt add to them:
core.api.php could use an update:
https://git.drupalcode.org/project/drupal/blob/8.8.x/core/core.api.php#L... for example.
Same with core/tests/README.md:
https://git.drupalcode.org/project/drupal/blob/8.8.x/core/tests/README.md
A test of phpunit isnt checking for build tests:
https://git.drupalcode.org/project/drupal/blob/8.8.x/core/tests/Drupal/T...
Not sure if thats a different followup, or could all be part of this issue.
Comment #5
Mile23+1
Comment #6
heddnre #4: I've added #3086532: Further document Build and in general improve testing docs for the docs and commented in #2984031: Create Build Tests For Composer and Drupal for the final phpunit test.
With those opened, is this good to go?
Comment #7
heddnAlso, bumping priority as this blocks adoption of the new build test type. Without it, we get things like:
PHP Fatal error: Class 'Drupal\Tests\automatic_updates\Build\UpdateTest' not found
Comment #8
Mile23Let's add the dataprovider for build suites here, from #4: https://git.drupalcode.org/project/drupal/blob/8.8.x/core/tests/Drupal/T...
The documentation can be in the followup.
Comment #9
heddnWe don't have any build tests yet that aren't in the component. So until one lands, there isn't any point, no?
Comment #10
heddnThis should address #8. Although once we add module level tests, we should re-visit. Because until then, we don't really have anything to test.
I also improved/fixed the existing tests by adding a
class_exists
call. Which then meant some other unrelated test types needed fixing. If we'd rather, I can move those to a follow-up.Comment #11
Mile23Yah, sorry, I should have been clearer. We don't want to assert whether the class exists, because we do want it to return FALSE on some of them (since a simpletest test shouldn't be in a suite).
So revert the rest of the test and then add a build class data set so we know we can get a 'Build' back from
TestDiscovery::getPhpunitTestSuite()
.Comment #12
heddnNo interdiff. I'm still confused though how these two things are related. They don't seem to be.
Comment #13
Mile23Thanks, @heddn.
Ok, let's rescope a little.
The patch looks good, but the tests haven't completed. RTBC, the testbot will unset it if there's a fail, though.
Comment #14
webchickWhoopsie. :P
Committed and pushed to 9.0.x; cherry-picked to 8.9.x and 8.8.x. Thanks!