Menu
  • HOME
  • TAGS

How to display total time per build target in Phing output

php,phing

It's quite straight forward. Create your logger class which extends phings DefaultLogger Use event listener method targetStarted to store start timestamp Use event listener method targetFinished to calculate elapsed time and print it to output stream Use the logger by using command line attribute -logger f.e. to use lib/loggers/MyLogger.php call:...

Phing can't see PHPUnit

php,jenkins,phpunit,phing

It looks like there are some actual issues with phing and the latest 4.x versions of PHPUnit: http://www.phing.info/trac/ticket/1091. So to fix the issue, I removed PHPUnit 4 and specified an older version: pear install phpunit/PHPUnit-3.7.35 Phing and PHPUnit worked immediately at this point....

Composer skips prompt in scripts

php,composer-php,phing

After some reverse engineering I found out why this happens. Composer internally uses a Symfony Process class to spawn a process when you use the command line for a script. This Process component grabs the in & output stream to redirect it to composer somehow. That doesn't allow user inputs,...

Linux sdiff command cut output text

linux,bash,debian,phing,sdiff

sdiff is splitting the output equally between two columns - the "-w" option gives the maximum width (default 130). Add "-w" with a wider limit to see more, e.g., "sdiff -w 512".

Graphical representation of test results of phpunit

phpunit,report,summary,phing

What you can do is to use PHPUnit and generate HTML report for test coverage. It's similar to junit log: phpunit --log-junit results/phpunit/junit.xml --coverage-html=results/phpunit/covegare -c tests/phpunit.xml Then you can use Jenkins - Post-build Actions Publish Junit test result report Publish HTML reports This way you will have tests results but...

Phing keeps building despite failures of CakePHP unit testing

unit-testing,cakephp,jenkins,phing

If your cake command outputs anything other than 0, it would be considered FAILURE by Jenkins, and the job will be marked accordingly. To answer your question for searching console log for keywords, there is Text-finder plugin that allows to search console log and/or any other file for a RegEx,...