Created
October 21, 2014 13:11
-
-
Save anvyst/fb706dc4f59848c6cb47 to your computer and use it in GitHub Desktop.
Force Phing to Fail on CakePHP tests
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<target name="caketest-local" description="Run CakePHP unit tests with PHPUnit and print human readable output."> | |
<exec dir="${basedir}" executable="${basedir}/app/Console/cake" output="${logdir}/caketest.log" returnProperty="test_result"> | |
<arg line="test" /> | |
<arg line="--stderr"/> | |
<arg line="--configuration=${basedir}/phpunit-coverage-text.xml" /> | |
<arg line="app" /> | |
<arg line="AllTests" /> | |
</exec> | |
<if> | |
<not> | |
<equals arg1="${test_result}" arg2="0"/> | |
</not> | |
<then> | |
<fail msg="Build FAILED! Check caketest.log for details"/> | |
</then> | |
</if> | |
</target> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment