Merge pull request #590 from marc1706/ticket/584
[ticket/584] Make sure phpunit is available during build
This commit is contained in:
55
build.xml
55
build.xml
@@ -91,33 +91,50 @@
|
|||||||
</target>
|
</target>
|
||||||
|
|
||||||
<target name="test" depends="clean,composer,prepare-tests">
|
<target name="test" depends="clean,composer,prepare-tests">
|
||||||
<exec dir="${phpbb-root}"
|
|
||||||
command="phpBB/vendor/bin/phpunit
|
|
||||||
-c phpBB/ext/${vendor-name}/${extension-name}/ --coverage-clover=${clover-path} --coverage-html=${coverage-html-path}"
|
|
||||||
passthru="true" returnProperty="test.pass" />
|
|
||||||
<if>
|
<if>
|
||||||
<not>
|
<available property="phpunit-available" file="phpbb/phpBB/vendor/bin/phpunit" type="dir" />
|
||||||
<equals arg1="${test.pass}" arg2="0"/>
|
|
||||||
</not>
|
|
||||||
<then>
|
<then>
|
||||||
<fail msg="PHPUnit tests failed."/>
|
<exec dir="${phpbb-root}"
|
||||||
|
command="phpBB/vendor/bin/phpunit
|
||||||
|
-c phpBB/ext/${vendor-name}/${extension-name}/ --coverage-clover=${clover-path} --coverage-html=${coverage-html-path}"
|
||||||
|
passthru="true" returnProperty="test.pass" />
|
||||||
|
<if>
|
||||||
|
<not>
|
||||||
|
<equals arg1="${test.pass}" arg2="0"/>
|
||||||
|
</not>
|
||||||
|
<then>
|
||||||
|
<fail msg="PHPUnit tests failed."/>
|
||||||
|
</then>
|
||||||
|
</if>
|
||||||
</then>
|
</then>
|
||||||
|
<else>
|
||||||
|
<echo msg="PHPUnit couldn't be found." />
|
||||||
|
</else>
|
||||||
</if>
|
</if>
|
||||||
|
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<target name="test-slow" depends="clean,composer">
|
<target name="test-slow" depends="clean,composer">
|
||||||
<exec dir="${phpbb-root}"
|
|
||||||
command="phpBB/vendor/bin/phpunit
|
|
||||||
-c phpBB/ext/${vendor-name}/${extension-name}/
|
|
||||||
--group slow"
|
|
||||||
passthru="true" />
|
|
||||||
<if>
|
<if>
|
||||||
<not>
|
<available property="phpunit-available" file="phpbb/phpBB/vendor/bin/phpunit" type="dir" />
|
||||||
<equals arg1="${test.pass}" arg2="0"/>
|
<then>
|
||||||
</not>
|
<exec dir="${phpbb-root}"
|
||||||
<then>
|
command="phpBB/vendor/bin/phpunit
|
||||||
<fail msg="PHPUnit slow tests failed."/>
|
-c phpBB/ext/${vendor-name}/${extension-name}/
|
||||||
</then>
|
--group slow"
|
||||||
|
passthru="true" />
|
||||||
|
<if>
|
||||||
|
<not>
|
||||||
|
<equals arg1="${test.pass}" arg2="0"/>
|
||||||
|
</not>
|
||||||
|
<then>
|
||||||
|
<fail msg="PHPUnit slow tests failed."/>
|
||||||
|
</then>
|
||||||
|
</if>
|
||||||
|
</then>
|
||||||
|
<else>
|
||||||
|
<echo msg="PHPUnit couldn't be found." />
|
||||||
|
</else>
|
||||||
</if>
|
</if>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user