Skip to content

Commit

Permalink
fix phpuni build dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
seebi committed Jun 20, 2013
1 parent 41571ee commit aaad9e2
Showing 1 changed file with 21 additions and 15 deletions.
36 changes: 21 additions & 15 deletions build.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>

<project name="OntoWiki" default="build">
<project name="OntoWiki" default="build">
<target name="build-unit" depends="prepare,lint,phpunit,phpdoc,phpcb" />
<target name="build-ci" depends="prepare,lint,phpcs-ci,phpunit-integration-virtuoso,phpunit-integration-mysql,phpdoc,pdepend,phpmd-ci,phpcpd,phploc,phpcb" />

Expand All @@ -13,15 +13,15 @@
<delete dir="${basedir}/build/logs"/>
<delete dir="${basedir}/build/pdepend"/>
</target>
<target name="prepare" depends="clean" description="Prepare for build">

<target name="prepare" depends="clean" description="Prepare for build">
<mkdir dir="${basedir}/build/api"/>
<mkdir dir="${basedir}/build/code-browser"/>
<mkdir dir="${basedir}/build/coverage"/>
<mkdir dir="${basedir}/build/logs"/>
<mkdir dir="${basedir}/build/pdepend"/>
</target>

<target name="lint" description="Perform syntax check of sourcecode files">
<apply executable="php" failonerror="true">
<arg value="-l" />
Expand All @@ -30,14 +30,14 @@
<include name="**/*.php" />
<modified />
</fileset>

<fileset dir="${basedir}/extensions">
<include name="**/*.php" />
<modified />
</fileset>
</apply>
</target>

<target name="phploc" description="Measure project size using PHPLOC">
<exec executable="phploc">
<arg value="--log-csv" />
Expand All @@ -46,7 +46,7 @@
<arg path="${basedir}/extensions" />
</exec>
</target>

<target name="pdepend" description="Calculate software metrics using PHP_Depend">
<exec executable="pdepend">
<arg value="--jdepend-xml=${basedir}/build/logs/jdepend.xml" />
Expand All @@ -55,7 +55,7 @@
<arg path="${basedir}/application,${basedir}/extensions" />
</exec>
</target>

<target name="phpmd"
description="Perform project mess detection using PHPMD and print human readable output. Intended for usage on the command line before committing.">
<exec executable="phpmd">
Expand All @@ -64,7 +64,7 @@
<arg value="${basedir}/build/phpmd.xml" />
</exec>
</target>

<target name="phpmd-ci"
description="Perform project mess detection using PHPMD creating a log file for the continuous integration server">
<exec executable="phpmd">
Expand All @@ -75,7 +75,7 @@
<arg value="${basedir}/build/logs/pmd.xml" />
</exec>
</target>

<target name="phpcs"
description="Find coding standard violations using PHP_CodeSniffer and print human readable output. Intended for usage on the command line before committing.">
<exec executable="phpcs">
Expand All @@ -89,7 +89,7 @@
</exec>
</target>

<target name="phpcs-ci"
<target name="phpcs-ci"
description="Find coding standard violations using PHP_CodeSniffer creating a log file for the continuous integration server">
<exec executable="phpcs">
<arg value="--standard=${basedir}/application/tests/CodeSniffer/Standards/Ontowiki/ruleset.xml" />
Expand All @@ -114,17 +114,23 @@

<target name="phpdoc" description="Create API doc using DocCreator">
<exec dir="/opt/DocCreator/" executable="php">
<arg value="/opt/DocCreator/create.php5" />
<arg value="/opt/DocCreator/create.php5" />
<arg value="--config-file=/opt/DocCreator/config/doc.ontowiki.xml" />
<arg value="--source-folder=${basedir}/application/" />
<arg value="--target-folder=${basedir}/build/api/" />
</exec>
</target>
</target>

<target name="directories">
<exec executable="make">
<arg value="test-directories" />
</exec>
</target>

<target name="phpunit" description="Run unit tests with PHPUnit">
<target name="phpunit" depends="directories" description="Run unit tests with PHPUnit">
<exec dir="${basedir}/application/tests/unit/" executable="phpunit" failonerror="true" />
</target>

<target name="phpunit-integration-mysql" depends="phpunit" description="Run unit tests with PHPUnit">
<exec dir="${basedir}/application/tests/integration/" executable="phpunit" failonerror="true">
<env key="EF_STORE_ADAPTER" value="zenddb" />
Expand Down

0 comments on commit aaad9e2

Please sign in to comment.