Closed (duplicate)
Project:
Drupal core
Version:
9.3.x-dev
Component:
phpunit
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
26 Apr 2019 at 01:01 UTC
Updated:
16 Jul 2021 at 00:24 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
larowlanBefore: Time to boostrap class-loader: 11826.57 ms
After: Time to boostrap class-loader: 526.51 ms
Before/after: 694 directories
Comment #3
dawehnerThis certainly brings phpunit a bit nearer to what
\Drupal\simpletest\TestDiscovery::registerTestNamespacesis doing: Using our own extension discovery. I'm wondering conceptually, is it okay to have tests relying on code which will be tested by it? I think it is worth, given the huge speed difference! I think for running on the testbot it won't make a lot of difference right now, as this all still goes throughrun-tests.sh, but for the local development this method brings huge benefits.@larowlan
It feels like this is not really a bug, rather a task, any reasoning for this?
Should there be a
@see \Drupal\Core\Extension\ExtensionDiscovery::scanDirectorymaybe? Is there a reason we don't pass along all the flags?I wonder, do we need to call
realpathon these files, like previously?Comment #4
lendudeWas just scanning if we have any test coverage for this and looks like we don't, see comment in \Drupal\Tests\Core\Test\StubTestSuiteBase::findExtensionDirectories
So manual testing for this I guess
Comment #5
lendudeComment #6
larowlanyep, you're right
Will address the reviews
Comment #7
mxr576Comment #8
mxr576FYI, I am working on a patch in #2943172 that uses
ExtensionDiscoveryto discover test files.This comment describes the motivation why
ExtensionDiscoveryshould be used instead ofRecursiveExtensionFilterIterator: https://www.drupal.org/project/drupal/issues/2943172#comment-13210705Maybe this issue could be closed as a duplicate if you agree with the approach in the other issue.
Comment #13
larowlanClosing in favour of #3223881: Speed up test discovery with \RecursiveCallbackFilterIterator which doesn't bring the 'tests relying on code they're testing' issue