Occasionally in testing logs, we'll see something like this:


[13:59:04] Invoking operation [syntax]...
[13:59:04] Checked [0 of 3] relevant file(s) for syntax.

Digging a little deeper, it appears that this is due to the module directory prefix being prepended to the filenames within the syntax_files() calls. The first call goes to the syntax_files() function inside of pifr_drupal.client.inc, which in turn calls parent::syntax_files() to execute the function inside of client.inc - and both versions prefix the module directory. As a result, the files can't be found, and don't get syntax checked.

I suspect that this could be happinging for any patches to contrib projects which contain tests (though I haven't dug through any logs or are run through sample tests to confirm this suspicion).

Where this might get interesting is that syntax_files() is also called from pifr_simpletest.client.inc, inside the test_list() function ... if the same issue is happening here, this MIGHT explain why a full suite of tests are being executed for contrib projects! *fingers crossed*

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jthorson’s picture

Status: Active » Needs review
FileSize
727 bytes

No luck on the full tests front. :(

I didn't want to remove the code completely, in case there may be some other underlying dependencies I'm not aware of ... but the attached patch does a string compare to see if the module directory already exists in $file before prefixing the module directory.

Not the most robust fix ... this could potentially fail if it ran into a 'sites/default/modules/sites/default/modules' directory (or similarily doubled up module directory name) and this code actually needed to be executed ... but TBH, I think that's enough of a longshot that this approach is workable.

jthorson’s picture

Title: syntax_files() prepends the module directory twice for simpletest files » syntax_files() prepends the module directory twice for simpletest files (contrib patch tests only?)
jthorson’s picture

Status: Needs review » Fixed

Committed to 6.x-2.x (9f3328e) so that it can be deployed to scratchtestbot and fully validated during the upcoming testing of the project_dependency fixes.

jthorson’s picture

Status: Fixed » Reviewed & tested by the community

Moving to rtbc until testing and validation complete.

jthorson’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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