diff options
author | Leif Åstrand <leif@vaadin.com> | 2011-10-20 07:42:53 +0000 |
---|---|---|
committer | Leif Åstrand <leif@vaadin.com> | 2011-10-20 07:42:53 +0000 |
commit | f1f87c150edcae337c1dee2abc3c32bab0e29b4d (patch) | |
tree | f57e9f0c3e6295e8c2a7a23c0ba6ee74f74b25a1 /tests | |
parent | 26a969ecadc126936b5886cc45751b83e67e8175 (diff) | |
download | vaadin-framework-f1f87c150edcae337c1dee2abc3c32bab0e29b4d.tar.gz vaadin-framework-f1f87c150edcae337c1dee2abc3c32bab0e29b4d.zip |
Improved error handling for integration tests
svn changeset:21756/svn branch:6.7
Diffstat (limited to 'tests')
-rw-r--r-- | tests/integration_tests.xml | 60 |
1 files changed, 35 insertions, 25 deletions
diff --git a/tests/integration_tests.xml b/tests/integration_tests.xml index 675e17019d..9ea94b9648 100644 --- a/tests/integration_tests.xml +++ b/tests/integration_tests.xml @@ -343,35 +343,45 @@ </antcall>
<scp file="${demo.war}" todir="${user}@${target-host}:demo.war" keyfile="${sshkey.file}" trust="yes" passphrase="${passphrase}" />
- <!-- timeout in 15 minutes -->
- <sshexec host="${target-host}" outputproperty="start-output" timeout="900000" username="${user}" keyfile="${sshkey.file}" trust="yes" command="ant -f deploy.xml startup-and-deploy" />
- <antcall target="echo-prefix">
- <param name="prefix" value="${target-server}: " />
- <param name="message" value="${start-output}" />
- </antcall>
-
- <copy file="integration-testscripts/common/integration_test.tpl" tofile="integration-testscripts/integration-test-${target-server}-servlet.html" overwrite="true" />
- <antcall target="integration-test-servlet">
- <param name="server-name" value="${target-server}" />
- <param name="deployment.url" value="http://${target-host}:${target-port}" />
- </antcall>
- <!-- Run theme tests in all browsers if there's a property with the test files -->
- <if>
- <isset property="testfiles-theme" />
- <then>
- <antcall target="integration-test-theme">
+ <trycatch property="error_message">
+ <try>
+ <!-- timeout in 15 minutes -->
+ <sshexec host="${target-host}" outputproperty="start-output" timeout="900000" username="${user}" keyfile="${sshkey.file}" trust="yes" command="ant -f deploy.xml startup-and-deploy" />
+ <antcall target="echo-prefix">
+ <param name="prefix" value="${target-server}: " />
+ <param name="message" value="${start-output}" />
+ </antcall>
+
+ <copy file="integration-testscripts/common/integration_test.tpl" tofile="integration-testscripts/integration-test-${target-server}-servlet.html" overwrite="true" />
+ <antcall target="integration-test-servlet">
<param name="server-name" value="${target-server}" />
<param name="deployment.url" value="http://${target-host}:${target-port}" />
</antcall>
- </then>
- </if>
- <!-- timeout in five minutes -->
- <sshexec host="${target-host}" outputproperty="stop-output" timeout="300000" username="${user}" keyfile="${sshkey.file}" trust="yes" command="ant -f deploy.xml shutdown-and-cleanup" />
- <antcall target="echo-prefix">
- <param name="prefix" value="${target-server}: " />
- <param name="message" value="${stop-output}" />
- </antcall>
+
+ <!-- Run theme tests in all browsers if there's a property with the test files -->
+ <if>
+ <isset property="testfiles-theme" />
+ <then>
+ <antcall target="integration-test-theme">
+ <param name="server-name" value="${target-server}" />
+ <param name="deployment.url" value="http://${target-host}:${target-port}" />
+ </antcall>
+ </then>
+ </if>
+ </try>
+ <catch>
+ <fail message="${error_message}" />
+ </catch>
+ <finally>
+ <!-- timeout in five minutes -->
+ <sshexec host="${target-host}" outputproperty="stop-output" timeout="300000" username="${user}" keyfile="${sshkey.file}" trust="yes" command="ant -f deploy.xml shutdown-and-cleanup" />
+ <antcall target="echo-prefix">
+ <param name="prefix" value="${target-server}: " />
+ <param name="message" value="${stop-output}" />
+ </antcall>
+ </finally>
+ </trycatch>
</target>
<target name="echo-prefix">
|