Testing results: https://qa.drupal.org/pifr/test/670403
Tested issue: #2134351: Simpletest on vanilla install gives undefined variable user notice
QA simpletest Project test: https://qa.drupal.org/pifr/test/18758

With(and without) my patched applied on a vanilla install I can enable simpletest just fine but the bot fails to enable it.

If you view the testbots status for the simpletest project you get the same error.

Comments

rfay’s picture

Has simpletest 7.x-2.x ever been tested before? I'm not sure what the consequences of having two simpletest modules is. PIFR attempts by default to enable the (stock) simpletest. Although simpletest in sites/default/modules *should* override, I'm not sure it does.

Note that branch testing for simpletest 7.x-2.x fails, https://qa.drupal.org/pifr/test/18758, so there is no way your patch can succeed.

tehbmar’s picture

I figured that my patch would autofail after I found that the whole simpletest 7.x-2.x branch fails. But I'm not too terribly sure if simpletest 2.x has ever ran successfully since today is my first time actually touching its code.

So would this still be considered a bug for testbot since it seems it fails with different module versions being on the same build.

I would also like to note again, using drush to install drupal 7 and simpletest 7.x-2.x, simpletest enabled perfectly fine.

rfay’s picture

I don't disagree that this is potentially a bug for the testbot, but since PIFR is fundamentally wired to do its own thing with simpletest (and relies on simpletest to *do* the test), I'm not sure it's ever going to be possible to test itself. We'll let @jthorson weigh in here.

jthorson’s picture

Hmmm ... just a guess, but I suspect that your test file definition enables simpletest, and then PIFR goes and tries to enable it afterwards; causing the error/failure. If that's correct, you may be able to trick things out by not enabling simpletest in your test file.

Also, the test page shows a branch of simpletest 7.x-2.0 instead of 7.x-2.x, which seems odd ... and 7.x-2.0 is a stub file instead of actual test, so I'm surprised its attempting to run at all!

We could potentially add some logic to check if simpletest is already enabled before attempting to enable it (in pifr_simpletest.client.inc), but I'm a bit overcommitted at the moment, and not likely to get to it for at least a few weeks.

tehbmar’s picture

@jthorson I don't have a test file, this issue came up from writing a patch for simpletest (simpletest 7.x-2.x was failing on a vanilla install #2134351) and having my patch autofail and when digging into it, it was actually simpletest failing. I don't think I know enough about PIFR to dig in and fix anything especially since it's on D6, but if there is anything I can do to help move this along let me know.

jthorson’s picture

Okay, in that case, PIFR probably enables the module under test during install ... and then PIFR_Simpletest enables simpletest seperately.

What is needed is logic somewhere in http://drupalcode.org/project/project_issue_file_review.git/blob/refs/he... which detects whether simpletest is already enabled, and if so, skip the enable simpletest step. The challenge is that we need to check the 'site under test' database, not the site actually executing this code, so a module_exists() call won't work.

This is all based on speculation, though, as I haven't actually verified that the problem is due to simpletest already being enabled ... that step should be fairly straightforward (I'll try to get that much done ... maybe by this weekend?)

tehbmar’s picture

There aren't any methods that allow you to call drupal functions on the site being tested? That could be an interesting feature similar to $b->drupalPost() but something like $b->drupalFunction('function_name', array('of', 'different', 'arguments')); But that is neither here nor there. Let me know if there is anything I can help with on this I would love to get this resolved as soon as we can. Especially given how long simpletest 7.x-2.x has been around and not passing testing. I'm no English major but I'm pretty sure that's ironic.

isntall’s picture

Project: Drupal.org Testbots » DrupalCI: Drupal.org Testing Infrastructure
Component: malfunctioning testbot » Code
isntall’s picture

Status: Active » Closed (won't fix)