<?xml version="1.0"?>\r
\r
-<project name="Vaadin Integration Tests" basedir="." default="integration-test-all">\r
+<project xmlns:antcontrib="antlib:net.sf.antcontrib"\r
+ name="Vaadin Integration Tests" basedir="." default="integration-test-all">\r
\r
<!-- Import common targets -->\r
<import file="../build/common.xml" />\r
\r
<!-- Upload war to deploy to ssh host -->\r
<target name="integration-test-upload-demo">\r
- <scp file="${demo.war}" todir="${user}@${test.integration.server}:integration-tests/servers/demo.war" keyfile="${sshkey.file}" passphrase="${passphrase}" />\r
+ <antcontrib:scp file="${demo.war}" todir="${user}@${test.integration.server}:integration-tests/servers/demo.war" keyfile="${sshkey.file}" passphrase="${passphrase}" />\r
</target>\r
\r
<!-- Run basic integration test test -->\r
<target name="integration-test-all" depends="common.init-deps">\r
\r
<parallel>\r
- <trycatch property="tried">\r
+ <antcontrib:trycatch property="tried">\r
<try>\r
<!-- Still running GAE test from the old server which requires its own lock -->\r
<echo message="Getting lock" />\r
<catch>\r
<echo message="Uploading of demo.war failed. ${tried}" />\r
</catch>\r
- </trycatch>\r
+ </antcontrib:trycatch>\r
\r
<antcall target="integration-test-liferay6" />\r
<antcall target="integration-test-liferay6ee" />\r
<property name="target-host" value="${target-server}.devnet.vaadin.com" />\r
<property name="target-port" value="8080" />\r
\r
- <if>\r
+ <antcontrib:if>\r
<isset property="startDelay" />\r
<then>\r
- <math result="sleepTime" datatype="int">\r
+ <antcontrib:math result="sleepTime" datatype="int">\r
<op op="rint">\r
<op op="*">\r
<num value="${startDelay}"/>\r
<op op="random"/>\r
</op>\r
</op>\r
- </math>\r
+ </antcontrib:math>\r
<echo>Delaying startup of ${target-server} with ${sleepTime} seconds</echo> \r
<sleep seconds="${sleepTime}" />\r
</then>\r
- </if>\r
+ </antcontrib:if>\r
\r
- <scp todir="${user}@${target-host}:." keyfile="${sshkey.file}" trust="yes" passphrase="${passphrase}" >\r
+ <antcontrib:scp todir="${user}@${target-host}:." keyfile="${sshkey.file}" trust="yes" passphrase="${passphrase}" >\r
<fileset dir="integration_base_files">\r
<include name="*" />\r
</fileset>\r
- </scp>\r
+ </antcontrib:scp>\r
\r
<!-- trycatch probably not needed any more as it just fails with the original message and doesn't do anything in the finally block -->\r
- <trycatch property="error_message">\r
+ <antcontrib:trycatch property="error_message">\r
<try>\r
<!-- timeout in one hour (remote end should timeout in 55 minutes) -->\r
<sshexec host="${target-host}" outputproperty="lock-output" timeout="3600000" username="${user}" keyfile="${sshkey.file}" trust="yes" command="chmod +x *.sh; ant -f deploy.xml get-lock" />\r
<param name="message" value="${lock-output}" />\r
</antcall>\r
\r
- <scp file="${demo.war}" todir="${user}@${target-host}:demo.war" keyfile="${sshkey.file}" trust="yes" passphrase="${passphrase}" />\r
+ <antcontrib:scp file="${demo.war}" todir="${user}@${target-host}:demo.war" keyfile="${sshkey.file}" trust="yes" passphrase="${passphrase}" />\r
\r
<!-- timeout in 15 minutes -->\r
<sshexec host="${target-host}" outputproperty="start-output" timeout="900000" username="${user}" keyfile="${sshkey.file}" trust="yes" command="ant -f deploy.xml startup-and-deploy" failonerror="false" />\r
<catch>\r
<fail message="${error_message}" />\r
</catch>\r
- </trycatch>\r
+ </antcontrib:trycatch>\r
</target>\r
\r
<target name="echo-prefix">\r
\r
<target name="run-generic-integration-test">\r
<concat>##teamcity[testStarted name='${target-server}' flowId='${target-server}']</concat>\r
- <trycatch property="tried">\r
+ <antcontrib:trycatch property="tried">\r
<try>\r
<antcall target="do-run-generic-test" />\r
</try>\r
<catch>\r
- <antcallback target="teamcity-escape" return="tried-escaped">\r
+ <antcontrib:antcallback target="teamcity-escape" return="tried-escaped">\r
<param name="returnTo" value="tried-escaped" />\r
<param name="message" value="${tried}" />\r
- </antcallback>\r
+ </antcontrib:antcallback>\r
<concat>##teamcity[testFailed name='${target-server}' flowId='${target-server}' message='Integration test for ${target-server} failed.' details='${tried-escaped}']</concat>\r
</catch>\r
- </trycatch>\r
+ </antcontrib:trycatch>\r
<concat>##teamcity[testFinished name='${target-server}' flowId='${target-server}']"</concat>\r
</target> \r
\r
\r
<!-- Should also perform other escaping (\u0085, \u2028 and \u2029) - see http://confluence.jetbrains.net/display/TCD65/Build+Script+Interaction+with+TeamCity -->\r
<!-- Immutable properties -> needs to create a new one every time -->\r
- <propertyregex property="details-escaped1" input="${message}" regexp="['|\[\]]" replace="|\0" global="true" defaultValue="${message}" />\r
- <propertyregex property="details-escaped2" input="${details-escaped1}" regexp="\n" replace="|n" global="true" defaultValue="${details-escaped1}" />\r
- <propertyregex property="details-escaped3" input="${details-escaped2}" regexp="\r" replace="|r" global="true" defaultValue="${details-escaped2}" />\r
+ <antcontrib:propertyregex property="details-escaped1" input="${message}" regexp="['|\[\]]" replace="|\0" global="true" defaultValue="${message}" />\r
+ <antcontrib:propertyregex property="details-escaped2" input="${details-escaped1}" regexp="\n" replace="|n" global="true" defaultValue="${details-escaped1}" />\r
+ <antcontrib:propertyregex property="details-escaped3" input="${details-escaped2}" regexp="\r" replace="|r" global="true" defaultValue="${details-escaped2}" />\r
\r
<property name="${returnTo}" value="${details-escaped3}" />\r
</target>\r
\r
<target name="run-integration-test">\r
<concat>##teamcity[testStarted name='${target-server}' flowId='${target-server}']</concat>\r
- <trycatch property="tried">\r
+ <antcontrib:trycatch property="tried">\r
<try>\r
<antcall target="integration-test-${target-server}" />\r
</try>\r
</antcallback>\r
<concat>##teamcity[testFailed name='${target-server}' flowId='${target-server}' message='Integration test for ${target-server} failed.' details='${tried-escaped}']"</concat>\r
</catch>\r
- </trycatch>\r
+ </antcontrib:trycatch>\r
<concat>##teamcity[testFinished name='${target-server}' flowId='${target-server}']"</concat>\r
</target>\r
\r