commit a50fdb56aabc4c303211b0d37bef1315db9f8b39 parent 55fe07cf90ad7fed17870c770d6bdc005a4caea0 Author: Felicitus <felicitus@felicitus.de> Date: Wed, 22 Sep 2010 09:26:00 +0200 Added code coverage Diffstat:
M | build.xml | | | 27 | +++++++++++++++++++++++++-- |
1 file changed, 25 insertions(+), 2 deletions(-)
diff --git a/build.xml b/build.xml @@ -105,11 +105,34 @@ </phpcpd> </target> - <target name="test"> + <target name="code-coverage"> + + <mkdir dir="reports/coverage/db"/> + + <coverage-setup database="reports/coverage/db/coverage.db"> + <fileset dir="src"> + <include name="**/*.php"/> + </fileset> + </coverage-setup> + + <phpunit bootstrap="tests/bootstrap.php" haltonfailure="false" codecoverage="true" printsummary="true"> + <batchtest> + <fileset dir="tests/"> + <include name="**/*Test.php" /> + </fileset> + </batchtest> + <formatter type="plain" usefile="false" /> + </phpunit> + <coverage-report outfile="reports/coverage/db/coverage.xml"> + <report todir="reports/coverage/"/> + </coverage-report> + </target> + + <target name="test"> <mkdir dir="reports/phpunit"/> - <phpunit bootstrap="tests/bootstrap.php" haltonfailure="true" haltonerror="true" codecoverage="false" printsummary="true"> + <phpunit bootstrap="tests/bootstrap.php" haltonfailure="false" haltonerror="true" codecoverage="false" printsummary="true"> <formatter todir="reports/phpunit/" type="xml"/> <batchtest> <fileset dir="tests/">