Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
60 lines (51 sloc) 2.09 KB
<?xml version="1.0" ?>
<!--
This is a phing build file, used to run unit tests and build the documentation
$> pear channel-discover pear.phing.info
$> pear install phing/phing
-->
<project name="pChart-PHP5" default="test">
<property name="tests.dir" value="tests"/>
<property name="reports.dir" value="reports"/>
<property name="documentation.dir" value="docs"/>
<target name="clean">
<delete>
<fileset dir="${reports.dir}">
<include name="**/*"/>
<exclude name="**/.gitignore"/>
</fileset>
<fileset dir="${documentation.dir}">
<include name="**/*"/>
<exclude name="**/.gitignore"/>
</fileset>
</delete>
</target>
<target name="test" description="Run PHPUnit Tests">
<mkdir dir="${reports.dir}/phpunit"/>
<mkdir dir="${tests.dir}/action_logs"/>
<phpunit haltonerror="true" haltonfailure="true" printsummary="true">
<batchtest>
<fileset dir="${tests.dir}">
<include name="**/*Test.php"/>
</fileset>
</batchtest>
<formatter type="plain" usefile="false"/>
<formatter type="xml" usefile="true" todir="${reports.dir}/phpunit" outfile="test-results.xml"/>
</phpunit>
</target>
<target name="testreport" description="Run PHPUnit Report">
<phpunitreport
infile="${reports.dir}/phpunit/test-results.xml"
format="frames"
todir="${reports.dir}/phpunit" />
</target>
<target name="documentation">
<exec command="phpdoc -t ${project.basedir}/docs -ti 'pChart' -ue on -s -d ./"
dir="${project.basedir}/lib"/>
</target>
<target name="phpmd">
<mkdir dir="${reports.dir}/phpmd"/>
<exec command="phpmd lib xml unusedcode --reportfile ${reports.dir}/phpmd/unusedcode.xml"/>
<exec command="phpmd lib/CSVImporter.php,lib/pData.php,lib/Color.php,lib/Point.php xml codesize --reportfile ${reports.dir}/phpmd/codesize.xml"/>
</target>
</project>