Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

137 lines (113 sloc) 5.239 kb
<?xml version="1.0" encoding="UTF-8"?>
<project name="bms-whitelabel-tests" default="build" basedir=".">
<target name="build" depends="clean,lint,parallelTasks,phpunit"/>
<target name="build-nounit" depends="clean,lint,parallelTasks"/>
<target name="build-unit" depends="clean,lint,parallelTasks,phpunit-unit"/>
<target name="clean" depends="lncfg">
<!-- Clean up -->
<delete dir="build"/>
<!-- Create build directories -->
<mkdir dir="${basedir}/build/api"/>
<mkdir dir="${basedir}/build/yiiapi"/>
<mkdir dir="${basedir}/build/yiiapion"/>
<mkdir dir="${basedir}/build/code-browser"/>
<mkdir dir="${basedir}/build/coverage"/>
<mkdir dir="${basedir}/build/graph" />
<mkdir dir="${basedir}/build/logs"/>
<mkdir dir="${basedir}/build/pdepend"/>
<mkdir dir="${basedir}/application/runtime" />
<mkdir dir="${basedir}/application/tests/report" />
</target>
<target name="lncfg">
<exec executable="ln"><arg line="-sf -T /opt/yii yii" /></exec>
</target>
<!-- Run pdepend, phpmd, phpcpd, and phpcs in parallel -->
<target name="parallelTasks">
<parallel>
<antcall target="pdepend"/>
<antcall target="phpmd"/>
<antcall target="phpcpd"/>
<antcall target="phpcs"/>
<!--antcall target="phpdoc"/-->
</parallel>
</target>
<!-- Generate jdepend.xml and software metrics charts -->
<target name="pdepend">
<exec executable="pdepend">
<arg line="--jdepend-xml=${basedir}/build/logs/jdepend.xml
--jdepend-chart=${basedir}/build/pdepend/dependencies.svg
--overview-pyramid=${basedir}/build/pdepend/overview-pyramid.svg
--ignore=extensions,vendors,sites,migrations,messages,guidelines
app" />
</exec>
</target>
<!-- Generate pmd.xml -->
<target name="phpmd">
<exec executable="phpmd">
<arg line=". xml codesize,unusedcode
--reportfile ${basedir}/build/logs/pmd.xml
--exclude yii,extensions,vendors,sites,migrations,messages,guidelines" />
</exec>
</target>
<!-- Generate pmd-cpd.xml -->
<target name="phpcpd">
<exec executable="phpcpd">
<arg line="--log-pmd ${basedir}/build/logs/pmd-cpd.xml ." />
</exec>
</target>
<!-- Generate checkstyle.xml -->
<target name="phpcs">
<exec executable="phpcs">
<arg line="-v --report=checkstyle
--report-file=${basedir}/build/logs/checkstyle.xml
--standard=${basedir}/app/tests/guidelines
--ignore=extensions,vendors,sites,migrations,messages,guidelines,yiic.php
--extensions=php
app" />
</exec>
</target>
<!-- phpcs -v - -report=checkstyle - -report-file=build/logs/checkstyle.xml - -standard=application/resources/Guidelines.xml - -ignore=extensions,vendors,sites - -extensions=php application customer-->
<!-- Generate API documentation -->
<target name="phpdoc">
<exec executable="phpdoc">
<arg line="-ct type -ue on -t ${basedir}/build/api -tb application/vendors/phpuc/data/phpdoc -o HTML:Phpuc:phpuc -i extensions/,vendors/,sites/,migrations/,messages/,CSaveRelationsBehavior.php,TimeZoneCommand.php,yiic.php,Sniffs/ -d application"/>
</exec>
</target>
<target name="yiidoc">
<exec executable="${basedir}/application/yiic">
<arg line="api build/yiiapi"/>
</exec>
</target>
<target name="yiidocon">
<exec executable="${basedir}/application/yiic">
<arg line="api build/yiiapion online"/>
</exec>
</target>
<target name="lint" depends="clean">
<apply executable="php" dir="${basedir}" failonerror="on" logerror="on">
<arg line="-l"/>
<fileset dir="${basedir}">
<include name="**/*.php"/>
<exclude name="yii/**"/>
<exclude name="vendors/**"/>
</fileset>
</apply>
</target>
<target name="sloccount">
<exec executable="/opt/sloccount-2.26/sloccount" output="${basedir}/build/logs/sloccount.sc">
<env key="PATH" path="${env.PATH}:/sbin:/bin:/usr/sbin:/usr/bin:/opt/sloccount-2.26" />
<arg line="--duplicates --wide --details app/commands/testRunner"/>
</exec>
</target>
<target name="phpunit" depends="phpunit-unit,phpunit-functional" />
<target name="phpunit-unit" depends="lint">
<exec executable="phpunit" dir="${basedir}/application/tests" failonerror="on">
<arg line=" --log-junit ${basedir}/build/logs/junit.xml --coverage-clover ${basedir}/build/logs/clover.xml --coverage-html ${basedir}/build/coverage unit"/>
</exec>
</target>
<target name="phpunit-functional" depends="lint">
<exec executable="phpunit" dir="${basedir}/application/tests" failonerror="on">
<arg line=" --log-junit ${basedir}/build/logs/junit.xml --coverage-clover ${basedir}/build/logs/clover.xml --coverage-html ${basedir}/build/coverage functional"/>
</exec>
</target>
</project>
Jump to Line
Something went wrong with that request. Please try again.