Currently I've two instances of Drupal and in the 2nd one I want to make my environment very clean to test some things.
Currently Simpletest executing test files even the modules are disabled and I've Fatal error, even the modules are disabled.
See:

$ drush -vy test-run
Initialized Drupal 7.14 root directory at docroot                                                                                                                         [notice]
Initialized Drupal site aat-drupal at sites/aat-drupal                                                                                                                                            [notice]
Drush command terminated abnormally due to an unrecoverable error.                                                                                                                             [error]
Error: Class 'AATWebAPITestProvider' not found in sites/all/modules/custom/aat_soa/aat_soa.test, line 127
$ drush -vy pm-list | grep aat_soa
Initialized Drupal 7.14 root directory at docroot                                                                                                                         [notice]
Initialized Drupal site aat-drupal at sites/aat-drupal                                                                                                                                            [notice]     
 AAT SOA                         AAT Statement of Assessment (aat_soa)                                            Module  Not installed  7.x-1.0        
Command dispatch complete                                                                                                                                                                         [notice]

The class is defined in other module, which is disabled as well.
There is a similar issue: #1108098: On simpletest list I see test of disabled modules
Is there any way to make Simpletest to not parse test files of modules which are disabled?

CommentFileSizeAuthor
#4 simpletest-1592668.patch857 byteskenorb
#3 simpletest-1592668.patch920 byteskenorb

Comments

kenorb’s picture

BTW.
File where this class is defined in disabled module is specified by following line in the .info file :
files[] = test/aat_webapi.test.inc

kenorb’s picture

The problem happened again:

( ! ) Fatal error: Interface 'IAatJobProcessor' not found in aat_job_queue/aat_job_queue.test on line 237

Module aat_job is not even installed.

kenorb’s picture

Status: Active » Needs review
StatusFileSize
new920 bytes

Patch in the attachment.

kenorb’s picture

Issue summary: View changes

removed path

kenorb’s picture

StatusFileSize
new857 bytes

The issue is still on-going. I'm attaching the patch with corrected paths.

There is also suggestion to add additional argument to ./scripts/run-tests.sh similar to --all, but --enabled which will test all the enabled modules only.

alex.skrypnyk’s picture

Status: Needs review » Reviewed & tested by the community

Patched works as advertised!

drcolossos’s picture

This does indeed solve the problem and should be merged. I don't understand how others are not running into this issue?

br0ken’s picture

Status: Reviewed & tested by the community » Closed (works as designed)
drcolossos’s picture

Can you at leat say why this "works as designed"?

br0ken’s picture

drcolossos’s picture

Thank you for the link!