Try using the minimal install profile and run any test. You get a big hunk of failure because _system_rebuild_module_data() only includes the current-used profile as a module in {system}. It should be listing them all in the {system} table.

Comments

dave reid’s picture

Status: Active » Needs review
StatusFileSize
new1.43 KB

We should always list every install profile in _system_rebuild_module_data().

dave reid’s picture

StatusFileSize
new1.43 KB

Without tab character this time. I'm still trying to track down why we haven't been able to notice this before, aside from the fact that the testbot always uses the default profile and never minimal.

dave reid’s picture

The reason why this seems to happen is DWTC->setUp() calls drupal_install_system(), which performs system_rebuild_module_data(). But currently at that point we haven't yet done variable_set('install_profile', 'standard') in setUp(). So that system_rebuild_module_data() that populates {system} right before uses our cached install profile variable, which is 'minimal'.

webchick’s picture

Margh! :(

dave reid’s picture

Status: Needs review » Needs work

Arg, this makes install profiles show up on the modules page.

dave reid’s picture

Status: Needs work » Needs review
StatusFileSize
new881 bytes

Here's better solved from within the testing system. Fixes the problem of any variable_get() calls before $this->refreshVariables() not being 'clean'.

dave reid’s picture

StatusFileSize
new1.22 KB

Better one that uses 'proper' global declaring.

dave reid’s picture

Component: base system » simpletest.module
Assigned: Unassigned » dave reid
sun’s picture

Status: Needs review » Closed (duplicate)

Thanks for taking the time to report this issue.

However, marking as duplicate of #347959: modules_installed is broken during testing.
You can follow up on that issue to track its status instead. If any information from this issue is missing in the other issue, please make sure you provide it over there.

dave reid’s picture

Status: Closed (duplicate) » Needs review

It's actually not... :)

boombatower’s picture

Status: Needs review » Reviewed & tested by the community

Makes sense, and bot likes it.

sun’s picture

While I basically agree with this patch, I don't think we should commit this patch. Instead, we want to sure that the testing framework does _exactly_ the same as a regular install, which is what #347959: modules_installed is broken during testing is about.

webchick’s picture

Status: Reviewed & tested by the community » Fixed

I would like to pursue both.

Since the other patch includes this fix anyway, let's get this in for alpha 1, to stop the mega-critical bug, since it touches only SimpleTest and not module_enable() and friends... and then let's uncover the real bug at the other issue.

Committed to HEAD. Exxxxxxcellent. :)

Status: Fixed » Closed (fixed)
Issue tags: -webchick's D7 alpha hit list

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