run-tests.sh in core outputs a title of "Tests to be run:", but fails to list any tests after this. The script distributed with the D6 version of simpletest.module lists the tests correctly, but that fix apparently never made it to Drupal core.

The attached patch fixes this. To see the difference, here is an example of running the Block tests before and after the patch:

Before:

$ php run-tests.sh Block
Drupal test run
---------------
Tests to be run:
Test run started: Monday, August 29, 2011 - 17:44
Test summary:
-------------
Admin theme block admin accessibility 18 passes, 0 fails, 0 exceptions, and 6 debug messages
Block caching 233 passes, 0 fails, 0 exceptions, and 68 debug messages
Block HTML id 16 passes, 0 fails, 0 exceptions, and 5 debug messages
Block template suggestions 2 passes, 0 fails, and 0 exceptions
Block functionality 353 passes, 0 fails, 0 exceptions, and 117 debug messages
New default theme blocks 24 passes, 0 fails, 0 exceptions, and 2 debug messages
Non default theme admin 10 passes, 0 fails, 0 exceptions, and 3 debug messages
Test run duration: 6 min 49 sec
$

Notice the conspicuous blank after "Tests to be run:"

After:

$ php run-tests.sh Block
Drupal test run
---------------
Tests to be run:
- Admin theme block admin accessibility (BlockAdminThemeTestCase)
- Block caching (BlockCacheTestCase)
- Block HTML id (BlockHTMLIdTestCase)
- Block template suggestions (BlockTemplateSuggestionsUnitTest)
- Block functionality (BlockTestCase)
- New default theme blocks (NewDefaultThemeBlocks)
- Non default theme admin (NonDefaultBlockAdmin)
Test run started:
Monday, August 29, 2011 - 17:22
Test summary
------------
Admin theme block admin accessibility 18 passes, 0 fails, 0 exceptions, and 6 debug messages
Block caching 233 passes, 0 fails, 0 exceptions, and 68 debug messages
Block HTML id 16 passes, 0 fails, 0 exceptions, and 5 debug messages
Block template suggestions 2 passes, 0 fails, and 0 exceptions
Block functionality 353 passes, 0 fails, 0 exceptions, and 117 debug messages
New default theme blocks 24 passes, 0 fails, 0 exceptions, and 2 debug messages
Non default theme admin 10 passes, 0 fails, 0 exceptions, and 3 debug messages
Test run duration: 4 min 54 sec
$

This change was added to the D6 simpletest module on 2009/02/08 in commit bca8c23d647b6739fc7150fe5d73dc272eb5c275. This patch merely brings this into D7 and D8.

(Note I also added two line breaks and removed printing of a colon to make the output a little more uniform).

Files: 
CommentFileSizeAuthor
#1 1263912-run-tests.patch1001 bytesTR
PASSED: [[SimpleTest]]: [MySQL] 32,865 pass(es).
[ View ]

Comments

Status:Active» Needs review
StatusFileSize
new1001 bytes
PASSED: [[SimpleTest]]: [MySQL] 32,865 pass(es).
[ View ]

And here's the patch. It works for both D8 and D7.

Okay ... this was just a 'little' bit bizarre ... but I tried to reproduce on the testbots, and they already had the following line:

$test_list = simpletest_script_get_test_list();

This code was removed with the patch at http://drupalcode.org/project/drupal.git/commit/f4295f50246d3dadd4f3d5dd...

EDIT: To elaborate just a bit, this is a regression which occured between 7.2 works and the current 7.x branch, with the above patch.

Status:Needs review» Reviewed & tested by the community

Confirmed patch on local testbot.

Just for clarity ... tested and confirmed for both D7 and D8.

Status:Reviewed & tested by the community» Fixed

Committed to 7.x and 8.x. Thanks!

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