- .v-button {\r
- padding: 1px;\r
- border: none;\r
- background: transparent;\r
- }\r
- \r
- .v-button:focus {\r
- outline: none;\r
- }\r
- \r
- .v-button:focus .v-button-wrap {\r
- border-color: #57a7ed;\r
- border-top-color: #60aef1;\r
- border-bottom-color: #4c9adf;\r
- -webkit-box-shadow: 0 0 2px #57a7ed;\r
- -moz-box-shadow: 0 0 2px #57a7ed;\r
- }\r
- \r
- .v-button:active .v-button-wrap,\r
- .v-button.v-pressed .v-button-wrap {\r
- background-position: 0 -79px;\r
- background-color: #e7e9e9;\r
- border-color: #b8bdbe;\r
- border-top-color: #9da1a2;\r
- border-bottom-color: #babfc0;\r
- border-color: rgba(146,151,152,.9);\r
- border-top-color: rgba(146,151,152,1);\r
- -webkit-box-shadow: 0 1px 2px rgba(0,0,0,.4) inset;\r
- -moz-box-shadow: 0 1px 2px rgba(0,0,0,.4) inset;;\r
- text-shadow: none;\r
- }\r
- \r
- .v-button .v-button-wrap,\r
- .v-disabled.v-button .v-button-wrap {\r
- display: block;\r
- font-size: 12px;\r
- border: 1px solid #bdc1c2;\r
- border-top-color: #cbcfd0;\r
- border-bottom-color: #b6bbbb;\r
- border-color: rgba(146,151,152,.8);\r
- border-top-color: rgba(146,151,152,.6);\r
- background: #e6e8e8 url(img/bg.png) repeat-x;\r
- -webkit-background-origin: padding;\r
- -moz-background-origin: padding;\r
- padding: 3px 15px;\r
- -webkit-border-radius: 11px;\r
- -moz-border-radius: 11px;\r
- border-radius: 11px;\r
- line-height: 14px;\r
- min-height: 14px;\r
- -webkit-box-shadow: 0 1px 0 rgba(0,0,0,.15);\r
- -moz-box-shadow: 0 1px 0 rgba(0,0,0,.15);\r
- text-shadow: 0 1px 0 #fff;\r
- color: #464f52;\r
- overflow: hidden;\r
- text-overflow: ellipsis;\r
- }\r
- \r
- /* Small style */\r
- .v-button-small .v-button-wrap,\r
- .v-disabled.v-button-small .v-button-wrap {\r
- font-size: 11px;\r
- line-height: 13px;\r
- padding: 1px 12px;\r
- min-height: 13px;\r
- }\r
- \r
- \r
- /* Big style */\r
- .v-button-big .v-button-wrap,\r
- .v-disabled.v-button-big .v-button-wrap {\r
- font-size: 15px;\r
- line-height: 18px;\r
- padding: 4px 18px;\r
- min-height: 18px;\r
- -webkit-border-radius: 14px;\r
- -moz-border-radius: 14px;\r
- border-radius: 14px;\r
- }\r
- \r
- \r
- \r
- /* Default style */\r
- .v-button-default:focus .v-button-wrap {\r
- background-color: #60839a;\r
- background-position: 0 -158px;\r
- text-shadow: 0 -1px 0 #657883;\r
- }\r
- \r
- .v-button-default:active .v-button-wrap,\r
- .v-button-default.v-pressed .v-button-wrap {\r
- background-position: 0 -79px;\r
- background-color: #8f9898;\r
- border-color: #737e81;\r
- border-top-color: #576063;\r
- border-bottom-color: #747f82;\r
- color: #f0f2f2;\r
- text-shadow: 0 -1px 0 #5d6969;\r
- -webkit-box-shadow: 0 1px 2px rgba(0,0,0,.4) inset;;\r
- -moz-box-shadow: 0 1px 2px rgba(0,0,0,.4) inset;;\r
- }\r
- \r
- .v-button-default .v-button-wrap,\r
- .v-disabled.v-button-default .v-button-wrap {\r
- border-color: #899395;\r
- border-top-color: #a4abae;\r
- border-bottom-color: #727b7d;\r
- background: #869090 url(img/bg-default.png) repeat-x;\r
- text-shadow: 0 -1px 0 #797e7e;\r
- color: #fff;\r
- font-weight: bold;\r
- -webkit-box-shadow: 0 1px 0 rgba(0,0,0,.22);\r
- -moz-box-shadow: 0 1px 0 rgba(0,0,0,.22);\r
- }\r
- \r
- \r
- \r
- \r
- /* Link style */\r
- .v-button-link,\r
- .v-disabled.v-button-link {\r
- padding: 0;\r
- }\r
- \r
- .v-button-link .v-button-wrap,\r
- .v-disabled.v-button-link .v-button-wrap,\r
- .v-button-link:active .v-button-wrap,\r
- .v-disabled.v-button-pressedv-button-link .v-button-wrap {\r
- border: none;\r
- background: transparent;\r
- padding: 0;\r
- font-size: 13px;\r
- -webkit-box-shadow: none;\r
- -mox-box-shadow: none;\r
- -webkit-border-radius: 0;\r
- -moz-border-radius: 0;\r
- border-radius: 0;\r
- text-shadow: none;\r
- }\r
- \r
- .v-button-link:focus {\r
- outline: 1px dotted #4897dc;\r
- }\r
- \r
- .v-button-link:focus .v-button-wrap {\r
- -webkit-box-shadow: none;\r
- -moz-box-shadow: none;\r
- }\r
- \r
- \r
- \r
- \r
- /* Checkbox styles */\r
- .v-checkbox .v-errorindicator {\r
- padding-left: 10px;\r
+ .v-button {
+ padding: 1px;
+ border: none;
+ background: transparent;
+ }
+
+ .v-button:focus {
+ outline: none;
+ }
+
+ .v-button:focus .v-button-wrap {
+ border-color: #57a7ed;
+ border-top-color: #60aef1;
+ border-bottom-color: #4c9adf;
+ -webkit-box-shadow: 0 0 2px #57a7ed;
+ -moz-box-shadow: 0 0 2px #57a7ed;
+ }
+
+ .v-button:active .v-button-wrap,
+ .v-button.v-pressed .v-button-wrap {
+ background-position: 0 -79px;
+ background-color: #e7e9e9;
+ border-color: #b8bdbe;
+ border-top-color: #9da1a2;
+ border-bottom-color: #babfc0;
+ border-color: rgba(146,151,152,.9);
+ border-top-color: rgba(146,151,152,1);
+ -webkit-box-shadow: 0 1px 2px rgba(0,0,0,.4) inset;
+ -moz-box-shadow: 0 1px 2px rgba(0,0,0,.4) inset;;
+ text-shadow: none;
+ }
+
+ .v-button .v-button-wrap,
+ .v-disabled.v-button .v-button-wrap {
+ display: block;
+ font-size: 12px;
+ border: 1px solid #bdc1c2;
+ border-top-color: #cbcfd0;
+ border-bottom-color: #b6bbbb;
+ border-color: rgba(146,151,152,.8);
+ border-top-color: rgba(146,151,152,.6);
+ background: #e6e8e8 url(img/bg.png) repeat-x;
+ -webkit-background-origin: padding;
+ -moz-background-origin: padding;
+ padding: 3px 15px;
+ -webkit-border-radius: 11px;
+ -moz-border-radius: 11px;
+ border-radius: 11px;
+ line-height: 14px;
+ min-height: 14px;
+ -webkit-box-shadow: 0 1px 0 rgba(0,0,0,.15);
+ -moz-box-shadow: 0 1px 0 rgba(0,0,0,.15);
+ text-shadow: 0 1px 0 #fff;
+ color: #464f52;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ }
+
-.v-ie7 .v-button .v-button-wrap {
- overflow: visible;
-}
-
-
-
+ /* Small style */
+ .v-button-small .v-button-wrap,
+ .v-disabled.v-button-small .v-button-wrap {
+ font-size: 11px;
+ line-height: 13px;
+ padding: 1px 12px;
+ min-height: 13px;
+ }
+
+
+ /* Big style */
+ .v-button-big .v-button-wrap,
+ .v-disabled.v-button-big .v-button-wrap {
+ font-size: 15px;
+ line-height: 18px;
+ padding: 4px 18px;
+ min-height: 18px;
+ -webkit-border-radius: 14px;
+ -moz-border-radius: 14px;
+ border-radius: 14px;
+ }
+
+
+
+ /* Default style */
+ .v-button-default:focus .v-button-wrap {
+ background-color: #60839a;
+ background-position: 0 -158px;
+ text-shadow: 0 -1px 0 #657883;
+ }
+
+ .v-button-default:active .v-button-wrap,
+ .v-button-default.v-pressed .v-button-wrap {
+ background-position: 0 -79px;
+ background-color: #8f9898;
+ border-color: #737e81;
+ border-top-color: #576063;
+ border-bottom-color: #747f82;
+ color: #f0f2f2;
+ text-shadow: 0 -1px 0 #5d6969;
+ -webkit-box-shadow: 0 1px 2px rgba(0,0,0,.4) inset;;
+ -moz-box-shadow: 0 1px 2px rgba(0,0,0,.4) inset;;
+ }
+
+ .v-button-default .v-button-wrap,
+ .v-disabled.v-button-default .v-button-wrap {
+ border-color: #899395;
+ border-top-color: #a4abae;
+ border-bottom-color: #727b7d;
+ background: #869090 url(img/bg-default.png) repeat-x;
+ text-shadow: 0 -1px 0 #797e7e;
+ color: #fff;
+ font-weight: bold;
+ -webkit-box-shadow: 0 1px 0 rgba(0,0,0,.22);
+ -moz-box-shadow: 0 1px 0 rgba(0,0,0,.22);
+ }
+
+
+
+
+ /* Link style */
+ .v-button-link,
+ .v-disabled.v-button-link {
+ padding: 0;
+ }
+
+ .v-button-link .v-button-wrap,
+ .v-disabled.v-button-link .v-button-wrap,
+ .v-button-link:active .v-button-wrap,
+ .v-disabled.v-button-pressedv-button-link .v-button-wrap {
+ border: none;
+ background: transparent;
+ padding: 0;
+ font-size: 13px;
+ -webkit-box-shadow: none;
+ -mox-box-shadow: none;
+ -webkit-border-radius: 0;
+ -moz-border-radius: 0;
+ border-radius: 0;
+ text-shadow: none;
+ }
+
+ .v-button-link:focus {
+ outline: 1px dotted #4897dc;
+ }
+
+ .v-button-link:focus .v-button-wrap {
+ -webkit-box-shadow: none;
+ -moz-box-shadow: none;
+ }
+
+
+
+
+ /* Checkbox styles */
+ .v-checkbox .v-errorindicator {
+ padding-left: 10px;
}
-.v-ie6 .v-checkbox .v-errorindicator {
- padding-right: 4px;
- }
-.v-ie7 .v-checkbox .v-errorindicator {
- padding-right: 7px;
- }
-.v-ie6 .v-button .v-errorindicator,
-.v-ie7 .v-button .v-errorindicator {
- padding-right: 5px;
- }
- <?xml version="1.0"?>\r
- \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
- <!-- Target deploying demo.war -->\r
- <fail unless="test.integration.server" message="test.integration.server must be set for integration tests to run" />\r
- \r
- <fail unless="test.integration.user" message="test.integration.user must be set for integration tests to run" />\r
- <fail unless="test.integration.antfile" message="test.integration.antfile must be set for integration tests to run" />\r
- \r
- <!-- Test with these browsers -->\r
- <property name="test_browsers" value="winxp-firefox9" />\r
- \r
- <!-- Path to key file. Default value -->\r
- <property name="sshkey.file" value="id_dsa" />\r
- \r
- <!-- path and name for demo.war to be deployed -->\r
- <property name="demo.war" value="demo.war" />\r
- \r
- <!-- Host running Testbench RC or Testbench Hub. Default value -->\r
- <property name="com.vaadin.testbench.tester.host" value="127.0.0.1" />\r
- \r
- <!-- Base url where the testable application is deployed -->\r
- <property name="deployment.url" value="http://${test.integration.server}:8080" />\r
- \r
- <!-- ssh host values -->\r
- <property name="ant.hub" value="${test.integration.antfile}" />\r
- <property name="user" value="${test.integration.user}" />\r
- <property name="passphrase" value="" />\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
- </target>\r
- \r
- <!-- Run basic integration test test -->\r
- <target name="integration-test-servlet">\r
- <fileset dir="integration-testscripts" id="html-test-files" includes="integration-test-${server-name}-servlet.html" />\r
- <pathconvert pathsep=" " property="testfiles" refid="html-test-files" />\r
- <subant target="run-tests" failonerror="false" antfile="test.xml">\r
- <property name="com.vaadin.testbench.lib.dir" value="${com.vaadin.testbench.lib.dir}" />\r
- <property name="com.vaadin.testbench.tester.host" value="${com.vaadin.testbench.tester.host}" />\r
- <property name="com.vaadin.testbench.deployment.url" value="${deployment.url}" />\r
- <property name="server.start.succeeded" value="1" />\r
- <property name="browsers" value="${test_browsers}" />\r
- <property name="testfiles" value="${testfiles}" />\r
- <property name="test-output-dir" value="../build/integration-test-output/${server-name}" />\r
- <property name="retries" value="0" />\r
- \r
- <fileset dir="." includes="test.xml" />\r
- </subant>\r
- </target>\r
- \r
- <target name="integration-test-theme">\r
- <subant target="run-tests" failonerror="false" antfile="test.xml">\r
- <property name="com.vaadin.testbench.lib.dir" value="${com.vaadin.testbench.lib.dir}" />\r
- <property name="com.vaadin.testbench.tester.host" value="${com.vaadin.testbench.tester.host}" />\r
- <property name="com.vaadin.testbench.deployment.url" value="${deployment.url}" />\r
- <property name="server.start.succeeded" value="1" />\r
- <property name="testfiles" value="${testfiles-theme}" />\r
- <property name="test-output-dir" value="../build/integration-test-output/${server-name}" />\r
- \r
- <fileset dir="." includes="test.xml" />\r
- </subant>\r
- </target>\r
- \r
- <!-- Run integration test on GAE -->\r
- <target name="integration-test-test-GAE">\r
- <fileset dir="integration-testscripts" id="html-test-files" includes="GoogleAppEngine/integration-test-GAE.html" />\r
- <pathconvert pathsep=" " property="test-GAE" refid="html-test-files" />\r
- \r
- <subant target="run-tests" failonerror="false" antfile="test.xml">\r
- <property name="com.vaadin.testbench.lib.dir" value="${com.vaadin.testbench.lib.dir}" />\r
- <property name="com.vaadin.testbench.tester.host" value="${com.vaadin.testbench.tester.host}" />\r
- <property name="com.vaadin.testbench.deployment.url" value="http://vaadin-integration-test.appspot.com/" />\r
- <property name="server.start.succeeded" value="1" />\r
- <property name="browsers" value="${test_browsers}" />\r
- <property name="testfiles" value="${test-GAE}" />\r
- <property name="test-output-dir" value="../build/integration-test-gae-output" />\r
- \r
- <fileset dir="." includes="test.xml" />\r
- </subant>\r
- </target>\r
- \r
- <target name="integration-test-deploy-to-GAE">\r
- <sshexec host="${test.integration.server}" username="${user}" keyfile="${sshkey.file}" command="ant -f ${ant.hub} deploy-to-GAE" />\r
- </target>\r
- \r
- \r
- <target name="integration-test-tomcat7">\r
- <antcall target="run-generic-integration-test">\r
- <param name="startDelay" value="10" />\r
- <param name="target-server" value="tomcat7" />\r
- </antcall>\r
- </target>\r
- <target name="integration-test-tomcat5">\r
- <antcall target="run-generic-integration-test">\r
- <param name="startDelay" value="10" />\r
- <param name="target-server" value="tomcat5" />\r
- </antcall>\r
- </target>\r
- \r
- <target name="integration-test-tomcat6">\r
- <antcall target="run-generic-integration-test">\r
- <param name="startDelay" value="10" />\r
- <param name="target-server" value="tomcat6" />\r
- </antcall>\r
- </target>\r
- \r
- <target name="integration-test-jetty5">\r
- <antcall target="run-generic-integration-test">\r
- <param name="target-server" value="jetty5" />\r
- </antcall>\r
- </target>\r
- \r
- <target name="integration-test-jetty6">\r
- <antcall target="run-generic-integration-test">\r
- <param name="target-server" value="jetty6" />\r
- </antcall>\r
- </target>\r
- \r
- <target name="integration-test-jetty7">\r
- <antcall target="run-generic-integration-test">\r
- <param name="target-server" value="jetty7" />\r
- </antcall>\r
- </target>\r
- \r
- <target name="integration-test-jetty8">\r
- <antcall target="run-generic-integration-test">\r
- <param name="startDelay" value="300" />\r
- <param name="target-server" value="jetty8" />\r
- </antcall>\r
- </target>\r
- \r
- <target name="integration-test-jboss4">\r
- <antcall target="run-generic-integration-test">\r
- <param name="startDelay" value="10" />\r
- <param name="target-server" value="jboss4" />\r
- </antcall>\r
- </target>\r
- \r
- <target name="integration-test-jboss5">\r
- <antcall target="run-generic-integration-test">\r
- <param name="startDelay" value="10" />\r
- <param name="target-server" value="jboss5" />\r
- </antcall>\r
- </target>\r
- \r
- <target name="integration-test-jboss6">\r
- <antcall target="run-generic-integration-test">\r
- <param name="startDelay" value="10" />\r
- <param name="target-server" value="jboss6" />\r
- </antcall>\r
- </target>\r
- \r
- <target name="integration-test-jboss7">\r
- <antcall target="run-generic-integration-test">\r
- <param name="startDelay" value="10" />\r
- <param name="target-server" value="jboss7" />\r
- </antcall>\r
- </target>\r
- \r
- <target name="integration-test-glassfish2">\r
- <antcall target="run-generic-integration-test">\r
- <param name="startDelay" value="10" />\r
- <param name="target-server" value="glassfish2" />\r
- </antcall>\r
- </target>\r
- \r
- <target name="integration-test-glassfish3">\r
- <antcall target="run-generic-integration-test">\r
- <param name="startDelay" value="10" />\r
- <param name="target-server" value="glassfish3" />\r
- </antcall>\r
- </target>\r
- \r
- \r
- <target name="integration-test-liferay6">\r
- <fileset dir="integration-testscripts" id="html-test-files" includes="Liferay-6/integration-test-liferay-6.0.5.html" />\r
- <pathconvert pathsep=" " property="testfiles" refid="html-test-files" />\r
- \r
- <fileset dir="integration-testscripts" id="html-theme-files" includes="Liferay-6/Liferay6-theme.html" />\r
- <pathconvert pathsep=" " property="testfiles-theme" refid="html-theme-files" />\r
- \r
- \r
- <antcall target="run-generic-integration-test">\r
- <param name="startDelay" value="600" />\r
- <param name="target-server" value="liferay6" />\r
- </antcall>\r
- </target>\r
- \r
- <target name="integration-test-liferay5">\r
- <fileset dir="integration-testscripts" id="html-test-files" includes="Liferay-5/integration-test-liferay-5.2.3-portlet2.html" />\r
- <pathconvert pathsep=" " property="testfiles" refid="html-test-files" />\r
- \r
- <antcall target="run-generic-integration-test">\r
- <param name="startDelay" value="600" />\r
- <param name="target-server" value="liferay5" />\r
- </antcall>\r
- </target>\r
- \r
- <target name="integration-test-liferay6ee">\r
- <fileset dir="integration-testscripts" id="html-test-files" includes="Liferay-6EE/integration-test-liferay-6ee.html" />\r
- <pathconvert pathsep=" " property="testfiles" refid="html-test-files" />\r
- \r
- <fileset dir="integration-testscripts" id="html-theme-files" includes="Liferay-6EE/Liferay6EE-theme.html" />\r
- <pathconvert pathsep=" " property="testfiles-theme" refid="html-theme-files" />\r
- \r
- <antcall target="run-generic-integration-test">\r
- <param name="startDelay" value="600" />\r
- <param name="target-server" value="liferay6ee" />\r
- </antcall>\r
- </target>\r
- \r
- <target name="integration-test-gatein3">\r
- <fileset dir="integration-testscripts" id="html-test-files" includes="GateIn-3/integration-test-GateIn-3.1.0-portlet2.html" />\r
- <pathconvert pathsep=" " property="testfiles" refid="html-test-files" />\r
- <antcall target="run-generic-integration-test">\r
- <param name="startDelay" value="600" />\r
- <param name="test_browsers" value="winxp-firefox36" />\r
- <param name="target-server" value="gatein3" />\r
- </antcall>\r
- </target>\r
- \r
- <target name="integration-test-exo3">\r
- <fileset dir="integration-testscripts" id="html-test-files" includes="eXo-3/integration-test-eXo-3.0.3-portlet2.html" />\r
- <pathconvert pathsep=" " property="testfiles" refid="html-test-files" />\r
- <antcall target="run-generic-integration-test">\r
- <param name="startDelay" value="600" />\r
- <param name="test_browsers" value="winxp-firefox36" />\r
- <param name="target-server" value="exo3" />\r
- </antcall>\r
- </target>\r
- \r
- <target name="integration-test-weblogic9">\r
- <antcall target="run-generic-integration-test">\r
- <param name="startDelay" value="600" />\r
- <param name="target-port" value="7001" />\r
- <param name="target-server" value="weblogic9" />\r
- </antcall>\r
- </target>\r
- \r
- <target name="integration-test-weblogic10">\r
- <antcall target="run-generic-integration-test">\r
- <param name="startDelay" value="600" />\r
- <param name="target-port" value="7001" />\r
- <param name="target-server" value="weblogic10" />\r
- </antcall>\r
- </target>\r
- \r
- <target name="integration-test-weblogic12">\r
- <antcall target="run-generic-integration-test">\r
- <param name="startDelay" value="600" />\r
- <param name="target-port" value="7001" />\r
- <param name="target-server" value="weblogic12" />\r
- </antcall>\r
- </target>\r
- \r
- \r
- <target name="integration-test-weblogicPortal">\r
- <fileset dir="integration-testscripts" id="html-test-files" includes="weblogic-portal/integration-test-WebLogic-Portal-10.3.2-portlet2.html" />\r
- <pathconvert pathsep=" " property="testfiles" refid="html-test-files" />\r
- <antcall target="run-generic-integration-test">\r
- <param name="startDelay" value="600" />\r
- <param name="target-port" value="7001" />\r
- <param name="target-server" value="weblogicportal" />\r
- </antcall>\r
- </target>\r
- \r
- <target name="integration-test-GAE">\r
- <antcall target="integration-test-deploy-to-GAE" />\r
- <antcall target="integration-test-test-GAE" />\r
- </target>\r
- \r
- <!-- Upload demo, clean error screenshots and test deployment on all servers -->\r
- <target name="integration-test-all" depends="common.init-deps">\r
- <parallel>\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
- <antcall target="integration-test-get-lock" />\r
- <echo message="Got lock" />\r
- <antcall target="integration-test-upload-demo" />\r
- \r
- <antcall target="run-integration-test">\r
- <param name="target-server" value="GAE" />\r
- </antcall>\r
- \r
- <antcall target="integration-test-clean" />\r
- <echo message="Getting lock" />\r
- <antcall target="integration-test-release-lock" />\r
- <echo message="Lock released" />\r
- \r
- </try>\r
- <catch>\r
- <echo message="Uploading of demo.war failed. ${tried}" />\r
- </catch>\r
- </antcontrib:trycatch>\r
- <antcall target="integration-test-liferay6" />\r
- <antcall target="integration-test-liferay6ee" />\r
- <antcall target="integration-test-exo3" />\r
- <antcall target="integration-test-weblogicPortal" />\r
- <antcall target="integration-test-liferay5" />\r
- <antcall target="integration-test-weblogic9" />\r
- <antcall target="integration-test-weblogic10" />\r
- <antcall target="integration-test-weblogic12" />\r
- <antcall target="integration-test-gatein3" />\r
- <antcall target="integration-test-glassfish2" />\r
- <antcall target="integration-test-glassfish3" />\r
- <antcall target="integration-test-jboss4" />\r
- <antcall target="integration-test-jboss5" />\r
- <antcall target="integration-test-jboss6" />\r
- <antcall target="integration-test-jboss7" />\r
- <antcall target="integration-test-jetty5" />\r
- <antcall target="integration-test-jetty6" />\r
- <antcall target="integration-test-jetty7" />\r
- <antcall target="integration-test-jetty8" />\r
- <antcall target="integration-test-tomcat5" />\r
- <antcall target="integration-test-tomcat6" />\r
- <antcall target="integration-test-tomcat7" />\r
- \r
- </parallel>\r
- \r
- </target>\r
- \r
- <target name="do-run-generic-test">\r
- <property name="target-host" value="${target-server}.devnet.vaadin.com" />\r
- <property name="target-port" value="8080" />\r
- <antcontrib:if>\r
- <isset property="startDelay" />\r
- <then>\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
- </antcontrib:math>\r
- <echo>Delaying startup of ${target-server} with ${sleepTime} seconds</echo> \r
- <sleep seconds="${sleepTime}" />\r
- </then>\r
- </antcontrib:if>\r
- \r
- <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
- \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
- <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
- <antcall target="echo-prefix">\r
- <param name="prefix" value="${target-server}: " />\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
- \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
- <antcall target="echo-prefix">\r
- <param name="prefix" value="${target-server}: " />\r
- <param name="message" value="${start-output}" />\r
- </antcall>\r
- \r
- <fail message="${start-output}">\r
- <condition>\r
- <not>\r
- <contains string="${start-output}" substring="Demo deployed successfully" />\r
- </not>\r
- </condition>\r
- </fail>\r
- \r
- <copy file="integration-testscripts/common/integration_test.tpl" tofile="integration-testscripts/integration-test-${target-server}-servlet.html" overwrite="true" />\r
- <antcall target="integration-test-servlet">\r
- <param name="server-name" value="${target-server}" />\r
- <param name="deployment.url" value="http://${target-host}:${target-port}" />\r
- </antcall>\r
- \r
- <!-- Run theme tests in all browsers if there's a property with the test files -->\r
- <antcontrib:if>\r
- <isset property="testfiles-theme" />\r
- <antcontrib:then>\r
- <antcall target="integration-test-theme">\r
- <param name="server-name" value="${target-server}" />\r
- <param name="deployment.url" value="http://${target-host}:${target-port}" />\r
- </antcall>\r
- </antcontrib:then>\r
- </antcontrib:if>\r
- \r
- <!-- timeout in five minutes -->\r
- <sshexec host="${target-host}" outputproperty="stop-output" timeout="600000" username="${user}" keyfile="${sshkey.file}" trust="yes" command="ant -f deploy.xml shutdown-and-cleanup" failonerror="false" />\r
- <antcall target="echo-prefix">\r
- <param name="prefix" value="${target-server}: " />\r
- <param name="message" value="${stop-output}" />\r
- </antcall>\r
- </try>\r
- <catch>\r
- <fail message="${error_message}" />\r
- </catch>\r
- </antcontrib:trycatch>\r
- </target>\r
- \r
- <target name="echo-prefix">\r
- <antcontrib:propertyregex property="message-prefixed" input="${prefix}${message}" regexp="\n" replace="\0${prefix}" global="true" defaultValue="${prefix}${message}" />\r
- <echo message="${message-prefixed}" />\r
- </target>\r
- \r
- <target name="run-generic-integration-test">\r
- <concat>##teamcity[testStarted name='${target-server}' flowId='${target-server}']</concat>\r
- <antcontrib:trycatch property="tried">\r
- <try>\r
- <antcall target="do-run-generic-test" />\r
- </try>\r
- <catch>\r
- <antcontrib:antcallback target="teamcity-escape" return="tried-escaped">\r
- <param name="returnTo" value="tried-escaped" />\r
- <param name="message" value="${tried}" />\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
- </antcontrib:trycatch>\r
- <concat>##teamcity[testFinished name='${target-server}' flowId='${target-server}']"</concat>\r
- </target>\r
- \r
- <target name="teamcity-escape">\r
- <property name="returnTo" value="return" />\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
- <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
- <antcontrib:trycatch property="tried">\r
- <try>\r
- <antcall target="integration-test-${target-server}" />\r
- </try>\r
- <catch>\r
- <antcallback target="teamcity-escape" return="tried-escaped">\r
- <param name="returnTo" value="tried-escaped" />\r
- <param name="message" value="${tried}" />\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
- </antcontrib:trycatch>\r
- <concat>##teamcity[testFinished name='${target-server}' flowId='${target-server}']"</concat>\r
- </target>\r
- \r
- <target name="integration-test-get-lock">\r
- <sshexec host="${test.integration.server}" username="${user}" keyfile="${sshkey.file}" command="ant -f ${ant.hub} get-lock" />\r
- </target>\r
- \r
- <target name="integration-test-release-lock">\r
- <sshexec host="${test.integration.server}" username="${user}" keyfile="${sshkey.file}" command="ant -f ${ant.hub} release-lock" />\r
- </target>\r
- \r
- <!-- Remove demo.war -->\r
- <target name="integration-test-clean">\r
- <sshexec host="${test.integration.server}" username="${user}" keyfile="${sshkey.file}" command="ant -f ${ant.hub} clean" />\r
- </target>\r
+ <?xml version="1.0"?>
+
-<project name="Vaadin Integration Tests" basedir="." default="integration-test-all">
++<project xmlns:antcontrib="antlib:net.sf.antcontrib"
++ name="Vaadin Integration Tests" basedir="." default="integration-test-all">
++
++ <!-- Import common targets -->
++ <import file="../build/common.xml" />
+
+ <!-- Target deploying demo.war -->
+ <fail unless="test.integration.server" message="test.integration.server must be set for integration tests to run" />
+
+ <fail unless="test.integration.user" message="test.integration.user must be set for integration tests to run" />
+ <fail unless="test.integration.antfile" message="test.integration.antfile must be set for integration tests to run" />
+
+ <!-- Test with these browsers -->
+ <property name="test_browsers" value="winxp-firefox9" />
+
+ <!-- Path to key file. Default value -->
+ <property name="sshkey.file" value="id_dsa" />
+
+ <!-- path and name for demo.war to be deployed -->
+ <property name="demo.war" value="demo.war" />
+
+ <!-- Host running Testbench RC or Testbench Hub. Default value -->
+ <property name="com.vaadin.testbench.tester.host" value="127.0.0.1" />
+
+ <!-- Base url where the testable application is deployed -->
+ <property name="deployment.url" value="http://${test.integration.server}:8080" />
+
+ <!-- ssh host values -->
+ <property name="ant.hub" value="${test.integration.antfile}" />
+ <property name="user" value="${test.integration.user}" />
+ <property name="passphrase" value="" />
+
- <!-- add ant contrib -->
- <taskdef resource="net/sf/antcontrib/antcontrib.properties">
- <classpath>
- <pathelement location="../build/lib/ant-contrib-1.0b3.jar" />
- </classpath>
- </taskdef>
-
+ <!-- Upload war to deploy to ssh host -->
+ <target name="integration-test-upload-demo">
+ <scp file="${demo.war}" todir="${user}@${test.integration.server}:integration-tests/servers/demo.war" keyfile="${sshkey.file}" passphrase="${passphrase}" />
+ </target>
+
+ <!-- Run basic integration test test -->
+ <target name="integration-test-servlet">
+ <fileset dir="integration-testscripts" id="html-test-files" includes="integration-test-${server-name}-servlet.html" />
+ <pathconvert pathsep=" " property="testfiles" refid="html-test-files" />
+ <subant target="run-tests" failonerror="false" antfile="test.xml">
+ <property name="com.vaadin.testbench.lib.dir" value="${com.vaadin.testbench.lib.dir}" />
+ <property name="com.vaadin.testbench.tester.host" value="${com.vaadin.testbench.tester.host}" />
+ <property name="com.vaadin.testbench.deployment.url" value="${deployment.url}" />
+ <property name="server.start.succeeded" value="1" />
+ <property name="browsers" value="${test_browsers}" />
+ <property name="testfiles" value="${testfiles}" />
+ <property name="test-output-dir" value="../build/integration-test-output/${server-name}" />
+ <property name="retries" value="0" />
+
+ <fileset dir="." includes="test.xml" />
+ </subant>
+ </target>
+
+ <target name="integration-test-theme">
+ <subant target="run-tests" failonerror="false" antfile="test.xml">
+ <property name="com.vaadin.testbench.lib.dir" value="${com.vaadin.testbench.lib.dir}" />
+ <property name="com.vaadin.testbench.tester.host" value="${com.vaadin.testbench.tester.host}" />
+ <property name="com.vaadin.testbench.deployment.url" value="${deployment.url}" />
+ <property name="server.start.succeeded" value="1" />
+ <property name="testfiles" value="${testfiles-theme}" />
+ <property name="test-output-dir" value="../build/integration-test-output/${server-name}" />
+
+ <fileset dir="." includes="test.xml" />
+ </subant>
+ </target>
+
+ <!-- Run integration test on GAE -->
+ <target name="integration-test-test-GAE">
+ <fileset dir="integration-testscripts" id="html-test-files" includes="GoogleAppEngine/integration-test-GAE.html" />
+ <pathconvert pathsep=" " property="test-GAE" refid="html-test-files" />
+
+ <subant target="run-tests" failonerror="false" antfile="test.xml">
+ <property name="com.vaadin.testbench.lib.dir" value="${com.vaadin.testbench.lib.dir}" />
+ <property name="com.vaadin.testbench.tester.host" value="${com.vaadin.testbench.tester.host}" />
+ <property name="com.vaadin.testbench.deployment.url" value="http://vaadin-integration-test.appspot.com/" />
+ <property name="server.start.succeeded" value="1" />
+ <property name="browsers" value="${test_browsers}" />
+ <property name="testfiles" value="${test-GAE}" />
+ <property name="test-output-dir" value="../build/integration-test-gae-output" />
+
+ <fileset dir="." includes="test.xml" />
+ </subant>
+ </target>
+
+ <target name="integration-test-deploy-to-GAE">
+ <sshexec host="${test.integration.server}" username="${user}" keyfile="${sshkey.file}" command="ant -f ${ant.hub} deploy-to-GAE" />
+ </target>
+
+
+ <target name="integration-test-tomcat7">
+ <antcall target="run-generic-integration-test">
+ <param name="startDelay" value="10" />
+ <param name="target-server" value="tomcat7" />
+ </antcall>
+ </target>
-
- <target name="integration-test-tomcat4">
- <antcall target="run-generic-integration-test">
- <param name="startDelay" value="10" />
- <param name="target-server" value="tomcat4" />
- </antcall>
- </target>
-
+ <target name="integration-test-tomcat5">
+ <antcall target="run-generic-integration-test">
+ <param name="startDelay" value="10" />
+ <param name="target-server" value="tomcat5" />
+ </antcall>
+ </target>
+
+ <target name="integration-test-tomcat6">
+ <antcall target="run-generic-integration-test">
+ <param name="startDelay" value="10" />
+ <param name="target-server" value="tomcat6" />
+ </antcall>
+ </target>
+
+ <target name="integration-test-jetty5">
+ <antcall target="run-generic-integration-test">
+ <param name="target-server" value="jetty5" />
+ </antcall>
+ </target>
+
+ <target name="integration-test-jetty6">
+ <antcall target="run-generic-integration-test">
+ <param name="target-server" value="jetty6" />
+ </antcall>
+ </target>
+
+ <target name="integration-test-jetty7">
+ <antcall target="run-generic-integration-test">
+ <param name="target-server" value="jetty7" />
+ </antcall>
+ </target>
+
+ <target name="integration-test-jetty8">
+ <antcall target="run-generic-integration-test">
++ <param name="startDelay" value="300" />
+ <param name="target-server" value="jetty8" />
+ </antcall>
+ </target>
+
- <target name="integration-test-jboss3">
- <antcall target="run-generic-integration-test">
- <param name="startDelay" value="10" />
- <param name="target-server" value="jboss3" />
- </antcall>
- </target>
-
+ <target name="integration-test-jboss4">
+ <antcall target="run-generic-integration-test">
+ <param name="startDelay" value="10" />
+ <param name="target-server" value="jboss4" />
+ </antcall>
+ </target>
+
+ <target name="integration-test-jboss5">
+ <antcall target="run-generic-integration-test">
+ <param name="startDelay" value="10" />
+ <param name="target-server" value="jboss5" />
+ </antcall>
+ </target>
+
+ <target name="integration-test-jboss6">
+ <antcall target="run-generic-integration-test">
+ <param name="startDelay" value="10" />
+ <param name="target-server" value="jboss6" />
+ </antcall>
+ </target>
+
+ <target name="integration-test-jboss7">
+ <antcall target="run-generic-integration-test">
+ <param name="startDelay" value="10" />
+ <param name="target-server" value="jboss7" />
+ </antcall>
+ </target>
+
+ <target name="integration-test-glassfish2">
+ <antcall target="run-generic-integration-test">
+ <param name="startDelay" value="10" />
+ <param name="target-server" value="glassfish2" />
+ </antcall>
+ </target>
+
+ <target name="integration-test-glassfish3">
+ <antcall target="run-generic-integration-test">
+ <param name="startDelay" value="10" />
+ <param name="target-server" value="glassfish3" />
+ </antcall>
+ </target>
+
+
+ <target name="integration-test-liferay6">
+ <fileset dir="integration-testscripts" id="html-test-files" includes="Liferay-6/integration-test-liferay-6.0.5.html" />
+ <pathconvert pathsep=" " property="testfiles" refid="html-test-files" />
+
+ <fileset dir="integration-testscripts" id="html-theme-files" includes="Liferay-6/Liferay6-theme.html" />
+ <pathconvert pathsep=" " property="testfiles-theme" refid="html-theme-files" />
+
+
+ <antcall target="run-generic-integration-test">
+ <param name="startDelay" value="600" />
+ <param name="target-server" value="liferay6" />
+ </antcall>
+ </target>
+
+ <target name="integration-test-liferay5">
+ <fileset dir="integration-testscripts" id="html-test-files" includes="Liferay-5/integration-test-liferay-5.2.3-portlet2.html" />
+ <pathconvert pathsep=" " property="testfiles" refid="html-test-files" />
+
+ <antcall target="run-generic-integration-test">
+ <param name="startDelay" value="600" />
+ <param name="target-server" value="liferay5" />
+ </antcall>
+ </target>
+
+ <target name="integration-test-liferay6ee">
+ <fileset dir="integration-testscripts" id="html-test-files" includes="Liferay-6EE/integration-test-liferay-6ee.html" />
+ <pathconvert pathsep=" " property="testfiles" refid="html-test-files" />
+
+ <fileset dir="integration-testscripts" id="html-theme-files" includes="Liferay-6EE/Liferay6EE-theme.html" />
+ <pathconvert pathsep=" " property="testfiles-theme" refid="html-theme-files" />
+
+ <antcall target="run-generic-integration-test">
+ <param name="startDelay" value="600" />
+ <param name="target-server" value="liferay6ee" />
+ </antcall>
+ </target>
+
+ <target name="integration-test-gatein3">
+ <fileset dir="integration-testscripts" id="html-test-files" includes="GateIn-3/integration-test-GateIn-3.1.0-portlet2.html" />
+ <pathconvert pathsep=" " property="testfiles" refid="html-test-files" />
+ <antcall target="run-generic-integration-test">
+ <param name="startDelay" value="600" />
+ <param name="test_browsers" value="winxp-firefox36" />
+ <param name="target-server" value="gatein3" />
+ </antcall>
+ </target>
+
+ <target name="integration-test-exo3">
+ <fileset dir="integration-testscripts" id="html-test-files" includes="eXo-3/integration-test-eXo-3.0.3-portlet2.html" />
+ <pathconvert pathsep=" " property="testfiles" refid="html-test-files" />
+ <antcall target="run-generic-integration-test">
+ <param name="startDelay" value="600" />
+ <param name="test_browsers" value="winxp-firefox36" />
+ <param name="target-server" value="exo3" />
+ </antcall>
+ </target>
+
+ <target name="integration-test-weblogic9">
+ <antcall target="run-generic-integration-test">
+ <param name="startDelay" value="600" />
+ <param name="target-port" value="7001" />
+ <param name="target-server" value="weblogic9" />
+ </antcall>
+ </target>
+
+ <target name="integration-test-weblogic10">
+ <antcall target="run-generic-integration-test">
+ <param name="startDelay" value="600" />
+ <param name="target-port" value="7001" />
+ <param name="target-server" value="weblogic10" />
+ </antcall>
+ </target>
+
+ <target name="integration-test-weblogic12">
+ <antcall target="run-generic-integration-test">
+ <param name="startDelay" value="600" />
+ <param name="target-port" value="7001" />
+ <param name="target-server" value="weblogic12" />
+ </antcall>
+ </target>
+
+
+ <target name="integration-test-weblogicPortal">
+ <fileset dir="integration-testscripts" id="html-test-files" includes="weblogic-portal/integration-test-WebLogic-Portal-10.3.2-portlet2.html" />
+ <pathconvert pathsep=" " property="testfiles" refid="html-test-files" />
+ <antcall target="run-generic-integration-test">
+ <param name="startDelay" value="600" />
+ <param name="target-port" value="7001" />
+ <param name="target-server" value="weblogicportal" />
+ </antcall>
+ </target>
+
+ <target name="integration-test-GAE">
+ <antcall target="integration-test-deploy-to-GAE" />
+ <antcall target="integration-test-test-GAE" />
+ </target>
+
+ <!-- Upload demo, clean error screenshots and test deployment on all servers -->
- <target name="integration-test-all">
-
++ <target name="integration-test-all" depends="common.init-deps">
+ <parallel>
- <trycatch property="tried">
++ <antcontrib:trycatch property="tried">
+ <try>
+ <!-- Still running GAE test from the old server which requires its own lock -->
+ <echo message="Getting lock" />
+ <antcall target="integration-test-get-lock" />
+ <echo message="Got lock" />
+ <antcall target="integration-test-upload-demo" />
+
+ <antcall target="run-integration-test">
+ <param name="target-server" value="GAE" />
+ </antcall>
+
+ <antcall target="integration-test-clean" />
+ <echo message="Getting lock" />
+ <antcall target="integration-test-release-lock" />
+ <echo message="Lock released" />
+
+ </try>
+ <catch>
+ <echo message="Uploading of demo.war failed. ${tried}" />
+ </catch>
- </trycatch>
-
++ </antcontrib:trycatch>
+ <antcall target="integration-test-liferay6" />
+ <antcall target="integration-test-liferay6ee" />
+ <antcall target="integration-test-exo3" />
+ <antcall target="integration-test-weblogicPortal" />
+ <antcall target="integration-test-liferay5" />
+ <antcall target="integration-test-weblogic9" />
+ <antcall target="integration-test-weblogic10" />
+ <antcall target="integration-test-weblogic12" />
+ <antcall target="integration-test-gatein3" />
+ <antcall target="integration-test-glassfish2" />
+ <antcall target="integration-test-glassfish3" />
- <antcall target="integration-test-jboss3" />
+ <antcall target="integration-test-jboss4" />
+ <antcall target="integration-test-jboss5" />
+ <antcall target="integration-test-jboss6" />
+ <antcall target="integration-test-jboss7" />
+ <antcall target="integration-test-jetty5" />
+ <antcall target="integration-test-jetty6" />
+ <antcall target="integration-test-jetty7" />
+ <antcall target="integration-test-jetty8" />
- <antcall target="integration-test-tomcat4" />
+ <antcall target="integration-test-tomcat5" />
+ <antcall target="integration-test-tomcat6" />
+ <antcall target="integration-test-tomcat7" />
+
+ </parallel>
+
+ </target>
+
+ <target name="do-run-generic-test">
+ <property name="target-host" value="${target-server}.devnet.vaadin.com" />
+ <property name="target-port" value="8080" />
-
- <if>
++ <antcontrib:if>
+ <isset property="startDelay" />
+ <then>
- <math result="sleepTime" datatype="int">
++ <antcontrib:math result="sleepTime" datatype="int">
+ <op op="rint">
+ <op op="*">
+ <num value="${startDelay}" />
+ <op op="random" />
+ </op>
+ </op>
- </math>
- <echo>Delaying startup of ${target-server} with ${sleepTime} seconds</echo>
++ </antcontrib:math>
++ <echo>Delaying startup of ${target-server} with ${sleepTime} seconds</echo>
+ <sleep seconds="${sleepTime}" />
+ </then>
- </if>
-
- <scp todir="${user}@${target-host}:." keyfile="${sshkey.file}" trust="yes" passphrase="${passphrase}">
++ </antcontrib:if>
++
++ <scp todir="${user}@${target-host}:." keyfile="${sshkey.file}" trust="yes" passphrase="${passphrase}" >
+ <fileset dir="integration_base_files">
+ <include name="*" />
+ </fileset>
+ </scp>
+
+ <!-- trycatch probably not needed any more as it just fails with the original message and doesn't do anything in the finally block -->
- <trycatch property="error_message">
++ <antcontrib:trycatch property="error_message">
+ <try>
+ <!-- timeout in one hour (remote end should timeout in 55 minutes) -->
+ <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" />
+ <antcall target="echo-prefix">
+ <param name="prefix" value="${target-server}: " />
+ <param name="message" value="${lock-output}" />
+ </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" failonerror="false" />
+ <antcall target="echo-prefix">
+ <param name="prefix" value="${target-server}: " />
+ <param name="message" value="${start-output}" />
+ </antcall>
+
+ <fail message="${start-output}">
+ <condition>
+ <not>
+ <contains string="${start-output}" substring="Demo deployed successfully" />
+ </not>
+ </condition>
+ </fail>
+
+ <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>
++ <antcontrib:if>
+ <isset property="testfiles-theme" />
- <then>
++ <antcontrib: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>
-
++ </antcontrib:then>
++ </antcontrib:if>
++
+ <!-- timeout in five minutes -->
+ <sshexec host="${target-host}" outputproperty="stop-output" timeout="600000" username="${user}" keyfile="${sshkey.file}" trust="yes" command="ant -f deploy.xml shutdown-and-cleanup" failonerror="false" />
+ <antcall target="echo-prefix">
+ <param name="prefix" value="${target-server}: " />
+ <param name="message" value="${stop-output}" />
+ </antcall>
+ </try>
+ <catch>
+ <fail message="${error_message}" />
+ </catch>
- </trycatch>
++ </antcontrib:trycatch>
+ </target>
+
+ <target name="echo-prefix">
- <propertyregex property="message-prefixed" input="${prefix}${message}" regexp="\n" replace="\0${prefix}" global="true" defaultValue="${prefix}${message}" />
++ <antcontrib:propertyregex property="message-prefixed" input="${prefix}${message}" regexp="\n" replace="\0${prefix}" global="true" defaultValue="${prefix}${message}" />
+ <echo message="${message-prefixed}" />
+ </target>
+
+ <target name="run-generic-integration-test">
+ <concat>##teamcity[testStarted name='${target-server}' flowId='${target-server}']</concat>
- <trycatch property="tried">
++ <antcontrib:trycatch property="tried">
+ <try>
+ <antcall target="do-run-generic-test" />
+ </try>
+ <catch>
- <antcallback target="teamcity-escape" return="tried-escaped">
++ <antcontrib:antcallback target="teamcity-escape" return="tried-escaped">
+ <param name="returnTo" value="tried-escaped" />
+ <param name="message" value="${tried}" />
- </antcallback>
++ </antcontrib:antcallback>
+ <concat>##teamcity[testFailed name='${target-server}' flowId='${target-server}' message='Integration test for ${target-server} failed.' details='${tried-escaped}']</concat>
+ </catch>
- </trycatch>
++ </antcontrib:trycatch>
+ <concat>##teamcity[testFinished name='${target-server}' flowId='${target-server}']"</concat>
+ </target>
+
+ <target name="teamcity-escape">
+ <property name="returnTo" value="return" />
+
+ <!-- Should also perform other escaping (\u0085, \u2028 and \u2029) - see http://confluence.jetbrains.net/display/TCD65/Build+Script+Interaction+with+TeamCity -->
+ <!-- Immutable properties -> needs to create a new one every time -->
- <propertyregex property="details-escaped1" input="${message}" regexp="['|\[\]]" replace="|\0" global="true" defaultValue="${message}" />
- <propertyregex property="details-escaped2" input="${details-escaped1}" regexp="\n" replace="|n" global="true" defaultValue="${details-escaped1}" />
- <propertyregex property="details-escaped3" input="${details-escaped2}" regexp="\r" replace="|r" global="true" defaultValue="${details-escaped2}" />
++ <antcontrib:propertyregex property="details-escaped1" input="${message}" regexp="['|\[\]]" replace="|\0" global="true" defaultValue="${message}" />
++ <antcontrib:propertyregex property="details-escaped2" input="${details-escaped1}" regexp="\n" replace="|n" global="true" defaultValue="${details-escaped1}" />
++ <antcontrib:propertyregex property="details-escaped3" input="${details-escaped2}" regexp="\r" replace="|r" global="true" defaultValue="${details-escaped2}" />
+
+ <property name="${returnTo}" value="${details-escaped3}" />
+ </target>
+
+ <target name="run-integration-test">
+ <concat>##teamcity[testStarted name='${target-server}' flowId='${target-server}']</concat>
- <trycatch property="tried">
++ <antcontrib:trycatch property="tried">
+ <try>
+ <antcall target="integration-test-${target-server}" />
+ </try>
+ <catch>
+ <antcallback target="teamcity-escape" return="tried-escaped">
+ <param name="returnTo" value="tried-escaped" />
+ <param name="message" value="${tried}" />
+ </antcallback>
+ <concat>##teamcity[testFailed name='${target-server}' flowId='${target-server}' message='Integration test for ${target-server} failed.' details='${tried-escaped}']"</concat>
+ </catch>
- </trycatch>
++ </antcontrib:trycatch>
+ <concat>##teamcity[testFinished name='${target-server}' flowId='${target-server}']"</concat>
+ </target>
+
+ <target name="integration-test-get-lock">
+ <sshexec host="${test.integration.server}" username="${user}" keyfile="${sshkey.file}" command="ant -f ${ant.hub} get-lock" />
+ </target>
+
+ <target name="integration-test-release-lock">
+ <sshexec host="${test.integration.server}" username="${user}" keyfile="${sshkey.file}" command="ant -f ${ant.hub} release-lock" />
+ </target>
+
+ <!-- Remove demo.war -->
+ <target name="integration-test-clean">
+ <sshexec host="${test.integration.server}" username="${user}" keyfile="${sshkey.file}" command="ant -f ${ant.hub} clean" />
+ </target>
-</project>
+</project>