Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Problem/Motivation
- If you have the minimal profile it is not possible to run
Drupal\standard\Tests\StandardTest
- If you have the standard profile it is not possible to run
Drupal\minimal\Tests\MinimalTest
- Currently testbots are not running
Drupal\minimal\Tests\MinimalTest
since the test running site has Standard installed
Proposed resolution
This was broken by #2188661: Extension System, Part II: ExtensionDiscovery. We have competing expectations of unused installation profile's module tests not appearing and being able to run tests contained within unused installation profiles. This patch ensures and tests that all tests are runnable with no dependency on the current installation profile.
Remaining tasks
Review
User interface changes
None
API changes
None
Comment | File | Size | Author |
---|---|---|---|
#7 | 2217781.7.patch | 4.15 KB | alexpott |
#7 | 5-7-interdiff.txt | 2.06 KB | alexpott |
#5 | 2217781.5.patch | 4.1 KB | alexpott |
#5 | 1-5-interdiff.txt | 3.66 KB | alexpott |
#1 | 2217781.1.patch | 2.31 KB | alexpott |
Comments
Comment #1
alexpottIf we set the profilesDirectory property to an empty array on the ExtensionListing object then it will scan all profiles.
Comment #2
sunWell-spotted! The added test assertion looks sufficient and good to me.
I already questioned this when I studied the code in the
ExtensionDiscovery
patch. But somehow, the previously existing code in HEAD was usingdrupal_system_listing()
— whereas that was a wrapper aroundSystemListingInfo
, which operated on the current list of installation profiles only.In other words, the
ExtensionDiscovery
patch performed a straight conversion of the existing test discovery code in simpletest.module. Looks like some other patch wrongly changed that code to useSystemListingInfo
in the past already.Comment #5
alexpottSo it looks like we have competing expectations.
OtherInstallationProfileModuleTestsTest
is testing that tests in unused installation profiles are not available. I think this expectation is incorrect. We should be able to run all available tests.The attached patch refactors
OtherInstallationProfileModuleTestsTest
to meet this expectation and renames itOtherInstallationProfileTestsTest
.Comment #6
sunHm, you're (at least consistently) using the term "uninstalled" in these comments, but the "install/uninstall" terminology does not really mesh so well with installation profiles.
In simpletest.module, let's change the wording to this:
"Ensure that tests in all profiles are discovered."
In the test, let's change the wording to this:
"Assert the existence of a test in a different installation profile than the current."
(or shorter, if you find a way to shorten it)
Comment #7
alexpottMakes sense.
Comment #8
sunThanks!
Comment #9
catchCommitted/pushed to 8.x, thanks!