Skip to content
Snippets Groups Projects
Commit 3b9102f9 authored by Demian Katz's avatar Demian Katz
Browse files

Added try..catch wrapper to ensure that test system shuts down even if there...

Added try..catch wrapper to ensure that test system shuts down even if there is a fatal error during testing.  Moved documentation task last; no point in generating docs for a broken build, and this lets CI find problems faster.
parent 94cc5198
No related merge requests found
......@@ -20,11 +20,32 @@
<!-- Main Target -->
<target name="main" description="main target">
<phingcall target="startup" />
<trycatch property="exceptionmsg">
<try>
<phingcall target="ci-tasks" />
</try>
<catch>
<phingcall target="shutdown" />
<fail>Unexpected error during continuous integration tasks -- ${exceptionmsg}</fail>
</catch>
</trycatch>
<phingcall target="shutdown" />
</target>
<!-- Continuous Integration Tasks -->
<target name="ci-tasks" description="continuous integration tasks">
<!-- Create dirs -->
<mkdir dir="${builddir}/reports"/>
<mkdir dir="${builddir}/reports/coverage"/>
<!-- PHP CodeSniffer -->
<exec command="phpcs --standard=PEAR --extensions=php --report=checkstyle ${srcdir}/module/VuFind/src &gt; ${builddir}/reports/checkstyle.xml" escape="false" />
<!-- PHPUnit -->
<exec dir="${srcdir}/tests" command="VUFIND_LOCAL_DIR=${srcdir}/local phpunit -dzend.enable_gc=0 --log-junit ${builddir}/reports/phpunit.xml --coverage-clover ${builddir}/reports/coverage/clover.xml --coverage-html ${builddir}/reports/coverage/" passthru="true" checkreturn="true" />
<!-- PHP API Documentation -->
<phpdoc title="API Documentation"
destdir="${builddir}/apidocs"
......@@ -36,12 +57,6 @@
</fileset>
</phpdoc>
<!-- PHP CodeSniffer -->
<exec command="phpcs --standard=PEAR --extensions=php --report=checkstyle ${srcdir}/module/VuFind/src &gt; ${builddir}/reports/checkstyle.xml" escape="false" />
<!-- PHPUnit -->
<exec dir="${srcdir}/tests" command="VUFIND_LOCAL_DIR=${srcdir}/local phpunit -dzend.enable_gc=0 --log-junit ${builddir}/reports/phpunit.xml --coverage-clover ${builddir}/reports/coverage/clover.xml --coverage-html ${builddir}/reports/coverage/" passthru="true" checkreturn="true" />
</target>
<!-- Install and Activate VuFind -->
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment