1
votes

Nothing within the environment has changed, nor has the test suite itself. The XML report generates correctly, but not the HTML. Please help!

Generating code coverage report, this may take a moment./tmp/hudson3472766550808527893.sh: line 3: 5237 Terminated
/usr/local/bin/phpunit --verbose -d memory_limit=1024M --log-junit ../../build/logs/phpunit.xml --coverage-clover ../../build/logs/coverage/clover.xml --coverage-html ../../build/logs/coverage-html/

Any help would be greatly appreciated. This is negatively affecting our dev. team. Below is the latest error message.

.......................................

Time: 34 seconds, Memory: 94.50Mb

[30;42m[2KOK (56 tests, 493 assertions) [0m[2K Writing code coverage data to XML file, this may take a moment. Fatal error: Out of memory (allocated 555483136) (tried to allocate 71 bytes) in /usr/local/lib/php/PHP/Token/Stream.php on line 155 /tmp/hudson1430922411819914240.sh: line 3: 26479 Terminated
/usr/local/bin/phpunit --verbose -d memory_limit=1024M --log-junit ../../build/logs/phpunit.xml --coverage-clover ../../build/logs/coverage/clover.xml --coverage-html ../../build/logs/coverage-html/

3

3 Answers

1
votes

Something terminates the PHP process before it completes, but it is not possible to tell the reason from this log. Check the syslog on the server, it may have some hints about what is going on.

0
votes

We had Problems with PHPUnit running out of Memory, when the Memory available on the Server was low ... just to give you a hint ... (we used apache to start the tests, and there would be arount 10 processes, each eating 2GB of memory ...) the tests started to fail randomly.

Another issue is that you might have with, is high Memory Usage ... this might be caused by phpunits restore global state functionality. If you disable it, you have to cleanup after your tests so they wont disturb the other ones, but you will use less memory.

0
votes

As the number of files being included for code coverage grew, the memory usage grew. This question is similar to, but not the same as, the link below.

PHPUnit code coverage generation causing memory exhaustion