Argh, our testing is failing again!

I've just pushed #2086047: Blocks don't seem to appear in the block UI (in two commits), and this is the only change in our repository since D8 testing was green, but it seems we have an unrelated error — https://qa.drupal.org/pifr/test/137984 says:

Test summary
------------

Devel Mail interface 3 passes, 0 fails, and 0 exceptions
Devel Generate 35 passes, 0 fails, and 0 exceptions

Test run duration: 24 sec].
[14:36:38] Command [/usr/bin/php ./core/scripts/run-tests.sh --php /usr/bin/php --url 'http://drupaltestbot953-mysql.osuosl.test/checkout' --file sites/default/modules/devel/lib/Drupal/devel/Tests/DevelMailTest.php,sites/default/modules/devel/devel_generate/lib/Drupal/devel_generate/Tests/DevelGenerateTest.php --list 2>&1] failed
Duration 3 seconds
Directory [/var/lib/drupaltestbot/sites/default/files/checkout]
Status [255]
Output: [Available test groups & classes
-------------------------------

PHP Fatal error: Class 'Drush_CommandTestCase' not found in /var/lib/drupaltestbot/sites/default/files/checkout/sites/default/modules/devel/develDrushTest.php on line 9

Fatal error: Class 'Drush_CommandTestCase' not found in /var/lib/drupaltestbot/sites/default/files/checkout/sites/default/modules/devel/develDrushTest.php on line 9].
[14:36:38] Encountered error on [review], details:
array (
'@reason' => 'failed attempting to get list of tests from run-tests.sh',
)
[14:36:38] Review complete. test_id=137984 result code=8 details=Array
(
[@reason] => failed attempting to get list of tests from run-tests.sh
)

devel/develDrushTest.php has been there for a long time and is unchanged.

@moshe: Do you have an idea about what is happening here?

CommentFileSizeAuthor
#5 2106943.patch1.78 KBamateescu
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

claudiu.cristea’s picture

Confirming. When going to admin/config/development/testing will get a WSOD and in the logs

PHP Fatal error: Class 'Drush_CommandTestCase' not found in /var/www/html/modules/devel/develDrushTest.php on line 9

Weird is that even I'm uninstalling Devel I still get this fatal error. Needs to be removed from filesystem to restore from error.

claudiu.cristea’s picture

REMOVED: Duplicates #1

salvis’s picture

Thanks for confirming.

Needs to be removed from filesystem to restore from error.

But it has always been there...

salvis’s picture

Hmm, local testing of Devel with D8 9ced9d5 did NOT produce any error for me, but the current 6207fe9 broke my D8 and time is running out for me just now.

amateescu’s picture

Status: Active » Needs review
FileSize
1.78 KB

This is caused by #2056607: /core/phpunit.xml.dist only finds top-level contrib modules. Until everything is properly figured out, the attached patch helps :)

moshe weitzman’s picture

Status: Needs review » Fixed

Moved the two drush files to a ./drush folder and adjusted docs accordingly.

neclimdul’s picture

Status: Fixed » Active

nope :( Probably a core bug though?

Fatal error: Class 'Drush_CommandTestCase' not found in /var/www/localhost/htdocs/d8/modules/devel/drush/develDrushTest.php on line 9
Call Stack

moshe weitzman’s picture

Status: Active » Fixed

Correct. Core's phpunit.xml needs a new exclude. I added that at #2056607-31: /core/phpunit.xml.dist only finds top-level contrib modules

Mile23’s picture

Status: Fixed » Needs work
+++ b/develDrushTest.php
@@ -6,20 +6,20 @@
  *   To run the tests, use phpunit --bootstrap=/path/to/drush/tests/drush_testcase.inc.

I don't know the whole story with this interaction between devel and drush, but it seems like this line is the real error.

If you can't be sure where Drush_CommandTestCase is, how can the autoloader know, and how can the testbot find out?

phpunit.xml.dist only tells PHPUnit where to start looking for tests. It operates independently of the autoloader.

moshe weitzman’s picture

Status: Needs work » Fixed

I edited that line a bit.

The goal here is to get Simpletest to ignore this file. This file is not meant for simpletest to run. At least for now. This test is meant to be run separately by the `phpunit` program (thats what run-tests-drush.sh does). This file uses the Drush unit testing framework, not Drupal's.

Mile23’s picture

Right, so you don't want a) for SimpleTest to find this test, or b) PHPUnit to find this test. You want it to run manually, or from drush's test script.

It's also likely true that other contrib modules will have drush tests, so this isn't an isolated thing, right?

Status: Fixed » Closed (fixed)

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