News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Volker Dusch's Blog:
Dealing with segfaults while PHPUnit code coverage generation for CI
April 14, 2011 @ 11:55:13

Volker Dusch has a new post to his blog looking at handling segfaults during code coverage generation that might come up during your continuous integration process (with PHPUnit flavor unit tests).

About half the "Build failed" mails I've gotten from Jenkins in the last two weeks where not due to me breaking the tests but just PHPUnit segfaulting. "Wait! I know PHPUnit can't segfault!", only PHP itself can. And it does, quite often. For some reason that probably has to do with using PHP 5.2.OLD it doesn't survive generate the clover.xml file or the HTML report about 20% of the times it's being run.

He finds a solution to keep this from happening - not correcting the segfault as much as running the testing again to get it to pass. He wraps the call to PHPUnit inside of a simple shell script that tries to execute the PHPUnit testing suite as long as a segfault isn't thrown. If something was seriously broken, this could cause all sorts of problems, but in theory it's a simple hack that gets the job done.

0 comments voice your opinion now!
jenkins phpunit build continuousintegration codecoverage segfault


blog comments powered by Disqus

Similar Posts

Sebastian Bergmann's Blog: PHPUnit 3.2.0RC1

Padraic Brady's Blog: The PHPSpec Zend Framework App Testing Manifesto: Preamble

Alexey Zakhlestins' Blog: Pake: PHP5 project build system

Michelangelo van Dam's Blog: Quality Assurance on PHP projects - PHPUnit part 1

Web Mozarts Blog: Easy Unit Testing


Community Events





Don't see your event here?
Let us know!


interview deployment framework code zendserver community release introduction voicesoftheelephpant tips podcast list language symfony bugfix laravel development conference api series

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework