Running tests from the command-line off the latest backport is generating a large volume of exceptions related to db_query(). I'm not seeing these if I run the test from admin/build/testing.
It appears to be an issue around db_prefixing during the setUp function. I'm seeing things like:
Table 'drupal.simpletest805887system' doesn't exist
query: SELECT * FROM simpletest805887system WHERE type = 'theme'
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | 576256-theme-init.patch | 2.09 KB | boombatower |
| #4 | simpletest-webtestcase-runtests-sh.patch | 1.03 KB | joshk |
Comments
Comment #1
joshk commentedIsolated this to the file_check_directory() call in setUp for DrupalWebTestCase. Tracing.
Comment #2
joshk commentedTraced to the success message, and it's calling of t(), I think:
t() calles theme('placeholder'), which inits the theme layer prior to the initialization of the rest of the system. I'm unsure why this only causes problems when run from the CLI, but suspect it's because web-triggered test cases already have themes initialized?
Comment #3
joshk commentedOk, a quick and harmless, though slightly kludgy fix is to add an earlier call that will init the theme layer's static vars. So, for instance, right after we set up the $db_prefix_new, if we add:
Our exceptions go away. Will leave it to wiser heads to figure out if this is a good solution or not.
Comment #4
joshk commentedJust in case you like this idea, here's a patch against the current DRUPAL-6--2 branch.
Comment #5
boombatower commentedGood job tracking that down. One side effect is that is causes simpletest.test to fail. Fixed in patch.
Comment #6
boombatower commentedCommitted.