From: <es...@fh...> - 2010-10-25 11:55:34
|
Author: commana Date: Mon Oct 25 13:55:20 2010 New Revision: 5714 Log: Differentiate between phpunit on unix/mac and windows Modified: trunk/build.xml Modified: trunk/build.xml ============================================================================== --- trunk/build.xml (original) +++ trunk/build.xml Mon Oct 25 13:55:20 2010 @@ -13,10 +13,23 @@ <mkdir dir="${workspace}/reports" /> <mkdir dir="${workspace}/reports/coverage" /> <mkdir dir="${workspace}/reports/phpunit" /> + + <condition property="phpunit.script" value="phpunit"> + <or> + <os family="unix" /> + <os family="mac" /> + </or> + </condition> + + <condition property="phpunit.script" value="phpunit.bat"> + <os family="windows" /> + </condition> + + <fail unless="phpunit.script" message="Your operating system is not supported. :-(" /> </target> - <target name="unit-tests" description="Führt die Unit Tests aus"> - <exec executable="phpunit" dir="unit-tests"> + <target name="unit-tests" description="Führt die Unit Tests aus" depends="init"> + <exec executable="${phpunit.script}" dir="unit-tests"> <arg line="--log-junit ${workspace}/reports/phpunit.xml --coverage-clover ${workspace}/reports/coverage/ut_clover.xml AllTests.php" /> @@ -49,7 +62,7 @@ </target> <target name="db:tests" depends="db:create" description="Führt die Datenbanktests aus"> - <exec executable="phpunit" dir="unit-tests" failonerror="true"> + <exec executable="${phpunit.script}" dir="unit-tests" failonerror="true"> <arg line="--bootstrap registerphar.inc.php --no-globals-backup --coverage-clover ${workspace}/reports/coverage/db_clover.xml --coverage-html ${workspace}/reports/coverage/ |