Gavin wrote:
Buildbot does not give pretty graphs and other nice looking metrics or
reports out of the box - but maybe getting buildbot to run these other
tools, then the tools will provide those for us, I really I hadn't
investigated.
Metrics and Project Mess Detector (PMD) [1] data is extracted with
PHPUnit (--log-metrics and --log-pmd).
Graphs are created with phpUnderControl. (My setup is based on this
tutorial [2])
BTW those CodeSniffer warnings I think are a little bit over the top and
should be tweaked a bit better for log4php needs. (but that's for later I
guess.)
Yes, the PHP_CodeSniffer setup on my box is very basic and doesn't
provide polite data according to our coding standards. The problem was
that PHP_CodeSniffer isn't that quick to configure to your needs in an
easy way so I jumped onto other tasks. It's a job to look over it and
fix the target.
For the record here's my <cruisecontrol>/projects/log4php/build.xml file:
<?xml version="1.0" encoding="UTF-8"?>
<project name="log4php" default="build" basedir=".">
<target name="build" depends="checkout,doc,codesniffer,test"/>
<target name="checkout">
<exec executable="svn" dir="${basedir}/source">
<arg line="up" />
</exec>
</target>
<target name="doc">
<exec executable="phpdoc" dir="${basedir}/source" logerror="on">
<arg line="--title '${ant.project.name}' -ue on -t
${basedir}/build/api -d src/main/php -tb
'/usr/share/php/data/phpUnderControl/data/phpdoc' -o HTML:Phpuc:phpuc"/>
</exec>
</target>
<target name="codesniffer">
<mkdir dir="build/logs"/>
<exec executable="phpcs" dir="${basedir}/source/src/main/php"
output="${basedir}/build/logs/checkstyle.xml"
error="/tmp/checkstyle.error.log">
<arg line="--report=checkstyle --tab-width=4 ."/>
</exec>
</target>
<target name="test">
<exec executable="phpunit" dir="${basedir}/source/src/test/php"
failonerror="on">
<arg line=" --log-xml ${basedir}/build/logs/phpunit.xml --log-pmd
${basedir}/build/logs/phpunit.pmd.xml --coverage-xml
${basedir}/build/logs/phpunit.coverage.xml --coverage-html
${basedir}/build/coverage"/>
</exec>
</target>
</project>
Knut
[1]
http://sebastian-bergmann.de/archives/690-PHPUnit-as-a-Project-Mess-Detector.html
[2]
http://techportal.ibuildings.com/2009/03/03/getting-started-with-phpundercontrol/