summaryrefslogtreecommitdiffstats
path: root/uitest/vaadin-server.xml
diff options
context:
space:
mode:
authorArtur Signell <artur@vaadin.com>2012-08-30 17:24:36 +0300
committerArtur Signell <artur@vaadin.com>2012-08-30 17:24:36 +0300
commit7b25b3886ea95bc6495506fbe9472e45fcbde684 (patch)
tree0b93cb65dab437feb46720659a63b8f1ef48f7f4 /uitest/vaadin-server.xml
parent8941056349e302e687e40e94c13709e75f256d73 (diff)
downloadvaadin-framework-7b25b3886ea95bc6495506fbe9472e45fcbde684.tar.gz
vaadin-framework-7b25b3886ea95bc6495506fbe9472e45fcbde684.zip
Renamed tests -> uitest and tests/testbench -> uitest/src (#9299)
Diffstat (limited to 'uitest/vaadin-server.xml')
-rw-r--r--uitest/vaadin-server.xml55
1 files changed, 55 insertions, 0 deletions
diff --git a/uitest/vaadin-server.xml b/uitest/vaadin-server.xml
new file mode 100644
index 0000000000..d4d23581ec
--- /dev/null
+++ b/uitest/vaadin-server.xml
@@ -0,0 +1,55 @@
+<?xml version="1.0"?>
+<project xmlns:antcontrib="antlib:net.sf.antcontrib"
+ xmlns:ivy="antlib:org.apache.ivy.ant"
+ name="vaadin-server"
+ default="deploy-and-start" basedir=".">
+
+ <!-- Import common targets -->
+ <import file="../build/common.xml" />
+
+ <target name="check-params">
+ <fail unless="output-dir" message="The 'output-dir' (usually build/result/vaadin-xxx) should be given to test script." />
+ <fail unless="package.name" message="The 'package.name' property must be defined." />
+ <fail unless="package.filename" message="The 'package.filename' property must be defined." />
+ <fail unless="testing.testarea" message="The 'testing.testarea' property must be defined." />
+ <property name="webroot" value="${testing.testarea}/${package.name}/WebContent" />
+ </target>
+
+ <target name="prepare-testing-area" depends="check-params">
+ <echo> Package name: ${package.name}</echo>
+ <echo> Package filename: ${package.filename}</echo>
+ <echo> Testing area: ${testing.testarea}</echo>
+ <echo> test-output-dir: ${test-output-dir}</echo>
+
+ <delete dir="${testing.testarea}/${package.name}" />
+ <mkdir dir="${testing.testarea}/${package.name}/WebContent" />
+ <echo>Extracting Vaadin package ${package.filename} to testing area ${testing.testarea}</echo>
+ <unzip src="${package.filename}" dest="${testing.testarea}/${package.name}/WebContent" />
+ </target>
+
+ <target name="deploy-and-start" depends="init-deps, prepare-testing-area">
+ <property name="webroot" value="${testing.testarea}/${package.name}/WebContent"></property>
+
+ <ivy:resolve file="ivy.xml"/>
+ <ivy:cachepath pathid="server" conf="server" />
+ <java classname="com.vaadin.launcher.DemoLauncher" fork="yes" dir="${testing.testarea}/${package.name}" resultproperty="server.start.result">
+ <arg value="--nogui=1" />
+ <classpath>
+ <path location="${webroot}/WEB-INF/classes" />
+ <fileset dir="${webroot}/WEB-INF/lib/" includes="*.jar" />
+ <path refid="server" />
+ </classpath>
+ <jvmarg value="-Demma.coverage.out.file=${testing.testarea}/${package.name}/war.ec"/>
+ <jvmarg value="-Djava.awt.headless=true"/>
+ </java>
+ </target>
+
+ <target name="wait-for-startup">
+ <echo>Waiting for Servlet Container to start up.</echo>
+ <waitfor maxwait="60" maxwaitunit="second" checkevery="5" checkeveryunit="second" timeoutproperty="server.start.failed">
+ <http url="http://localhost:8888"/>
+ </waitfor>
+ <fail if="server.start.failed" message="Server startup failed" />
+ </target>
+
+</project>