Skip to content

Commit dcaa00e

Browse files
author
Philipp Frischmuth
committed
Adjust build.xml configuration
- Now supports unit and integration tests - .gitignore adapted to ignore all build folder contents except of some configuration files
1 parent 7ca93de commit dcaa00e

File tree

2 files changed

+26
-9
lines changed

2 files changed

+26
-9
lines changed

.gitignore

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ config.ini
1010
nbproject
1111
Erfurt/libraries/Zend/
1212
cache.properties
13-
build/api
14-
build/code-browser
15-
build/coverage
16-
build/logs
17-
build/pdepend
1813
library/Zend
19-
cache.sqlite
14+
cache.sqlite
15+
16+
# build stuff
17+
build/
18+
!build/phpcs.xml
19+
!build/phpcmd.xml

build.xml

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,18 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22

33
<project name="Erfurt" default="build">
4-
<target name="build" depends="prepare,lint,phploc,pdepend,phpmd-ci,phpcs-ci,phpcpd,phpdoc,phpunit,phpcb"/>
4+
5+
<target name="build-unit" depends="prepare,lint,phpunit,phpdoc" />
6+
<target name="build-integration" depends="prepare,lint,phpunit-integration,phpdoc" />
7+
<target name="build-full" depends="prepare,lint,phploc,pdepend,phpmd-ci,phpcs-ci,phpcpd,phpdoc,phpunit-integration,phpcb" />
8+
9+
<target name="build" depends="build-integration"/>
510

611
<target name="clean" description="Cleanup build artifacts">
712
<delete dir="${basedir}/build/api"/>
813
<delete dir="${basedir}/build/code-browser"/>
914
<delete dir="${basedir}/build/coverage"/>
15+
<delete dir="${basedir}/build/coverage-integration"/>
1016
<delete dir="${basedir}/build/logs"/>
1117
<delete dir="${basedir}/build/pdepend"/>
1218
</target>
@@ -15,6 +21,7 @@
1521
<mkdir dir="${basedir}/build/api"/>
1622
<mkdir dir="${basedir}/build/code-browser"/>
1723
<mkdir dir="${basedir}/build/coverage"/>
24+
<mkdir dir="${basedir}/build/coverage-integration"/>
1825
<mkdir dir="${basedir}/build/logs"/>
1926
<mkdir dir="${basedir}/build/pdepend"/>
2027
</target>
@@ -101,9 +108,19 @@
101108
<arg path="${basedir}/build/api" />
102109
</exec>
103110
</target>
111+
112+
<target name="directories">
113+
<exec executable="make">
114+
<arg value="directories" />
115+
</exec>
116+
</target>
104117

105-
<target name="phpunit" description="Run unit tests with PHPUnit">
106-
<exec executable="phpunit" failonerror="true"/>
118+
<target name="phpunit" depends="directories" description="Run unit tests with PHPUnit">
119+
<exec dir="${basedir}/tests/unit/" executable="phpunit" failonerror="true" />
120+
</target>
121+
122+
<target name="phpunit-integration" depends="phpunit" description="Run unit tests with PHPUnit">
123+
<exec dir="${basedir}/tests/integration/" executable="phpunit" failonerror="true" />
107124
</target>
108125

109126
<target name="phpcb" description="Aggregate tool output with PHP_CodeBrowser">

0 commit comments

Comments
 (0)