Do not call exit in simpletest module for CLI

dlhubler - April 2, 2008 - 20:44
Project:SimpleTest
Version:6.x-1.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:closed
Description

Sometimes there is a need to do things after the tests run. Great example, running code coverage. Simpletest module calls exit on all reporters except DrupalReporter and so I cannot run my code coverage report.

Also, DrupalTestSuite eats the test results from it's parent TestSuite for no particular reason.

patch to fix all this is attached

AttachmentSize
simpletest_cli_exit_code.patch1.12 KB

#1

Rok Žlender - April 3, 2008 - 11:59
Status:patch (code needs review)» patch (reviewed & tested by the community)

Looks good to me and also makes sense not to exit I agree.

#2

boombatower - April 3, 2008 - 19:57
Status:patch (reviewed & tested by the community)» fixed

Thanks for the patch and the review.

#3

Anonymous (not verified) - April 17, 2008 - 20:14
Status:fixed» closed

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

#4

pwolanin - June 10, 2008 - 20:21
Status:closed» patch (reviewed & tested by the community)

It doesn't seem like this patch was committed? at least not the portion for simpletest.module.

Also, this should be backported to 6.x

#5

boombatower - June 16, 2008 - 21:02

Hmmm... If this is still an issue for 7.x it should be moved to the core issue queue where the 7.x branch is being developed. If this just needs to be back-ported then change the version and mark it as "to be ported."

#6

pwolanin - June 16, 2008 - 23:56
Version:7.x-1.x-dev» 6.x-1.x-dev

6.x is the problem, I think

#7

boombatower - June 17, 2008 - 00:05
Status:patch (reviewed & tested by the community)» patch (to be ported)

So this needs to be committed to 6.x then...all check that out in a bit.

#8

pwolanin - June 17, 2008 - 18:54
Status:patch (to be ported)» patch (code needs review)

patch applies to 6.x with offset:

patch -p4 < simpletest_cli_exit_code.patch
patching file simpletest.module
Hunk #1 succeeded at 340 (offset 108 lines).
patching file drupal_unit_tests.php
Hunk #1 succeeded at 115 (offset 7 lines).
Hunk #2 succeeded at 123 (offset 7 lines).

#9

boombatower - June 17, 2008 - 22:26
Status:patch (code needs review)» fixed

Ran a few tests and seems to work.

Committed.

#10

Anonymous (not verified) - July 1, 2008 - 22:32
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.