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

Files: 
CommentFileSizeAuthor
simpletest_cli_exit_code.patch1.12 KBdlhubler

Comments

Rok Žlender’s picture

Status: Needs review » Reviewed & tested by the community

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

boombatower’s picture

Status: Reviewed & tested by the community » Fixed

Thanks for the patch and the review.

Anonymous’s picture

Status: Fixed » Closed (fixed)

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

pwolanin’s picture

Status: Closed (fixed) » 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

boombatower’s picture

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."

pwolanin’s picture

Version: » 6.x-1.x-dev

6.x is the problem, I think

boombatower’s picture

Status: 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.

pwolanin’s picture

Status: Patch (to be ported) » 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).
boombatower’s picture

Status: Needs review » Fixed

Ran a few tests and seems to work.

Committed.

Anonymous’s picture

Status: Fixed » Closed (fixed)

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