[ticket/584] Make sure phpunit is available during build

B3P-584
This commit is contained in:
Marc Alexander
2015-06-13 17:18:58 +02:00
parent adfdc0c817
commit ec68169445

View File

@@ -91,6 +91,9 @@
</target> </target>
<target name="test" depends="clean,composer,prepare-tests"> <target name="test" depends="clean,composer,prepare-tests">
<if>
<available property="phpunit-available" file="phpbb/phpBB/vendor/bin/phpunit" type="dir" />
<then>
<exec dir="${phpbb-root}" <exec dir="${phpbb-root}"
command="phpBB/vendor/bin/phpunit command="phpBB/vendor/bin/phpunit
-c phpBB/ext/${vendor-name}/${extension-name}/ --coverage-clover=${clover-path} --coverage-html=${coverage-html-path}" -c phpBB/ext/${vendor-name}/${extension-name}/ --coverage-clover=${clover-path} --coverage-html=${coverage-html-path}"
@@ -103,9 +106,18 @@
<fail msg="PHPUnit tests failed."/> <fail msg="PHPUnit tests failed."/>
</then> </then>
</if> </if>
</then>
<else>
<echo msg="PHPUnit couldn't be found." />
</else>
</if>
</target> </target>
<target name="test-slow" depends="clean,composer"> <target name="test-slow" depends="clean,composer">
<if>
<available property="phpunit-available" file="phpbb/phpBB/vendor/bin/phpunit" type="dir" />
<then>
<exec dir="${phpbb-root}" <exec dir="${phpbb-root}"
command="phpBB/vendor/bin/phpunit command="phpBB/vendor/bin/phpunit
-c phpBB/ext/${vendor-name}/${extension-name}/ -c phpBB/ext/${vendor-name}/${extension-name}/
@@ -119,6 +131,11 @@
<fail msg="PHPUnit slow tests failed."/> <fail msg="PHPUnit slow tests failed."/>
</then> </then>
</if> </if>
</then>
<else>
<echo msg="PHPUnit couldn't be found." />
</else>
</if>
</target> </target>
<!-- <!--