summaryrefslogtreecommitdiffstats
path: root/uitest/build.xml
diff options
context:
space:
mode:
authorArtur Signell <artur@vaadin.com>2012-08-31 13:54:26 +0300
committerArtur Signell <artur@vaadin.com>2012-09-09 11:23:04 +0300
commitd8a5f96b36946ed315dcf48cc32701e0435bdfaa (patch)
treef7fcf075a47430a9f45cfda652d91f576e32c98c /uitest/build.xml
parenteef56b04b46c6ad202beef58c342dbb5ea0e4f5d (diff)
downloadvaadin-framework-d8a5f96b36946ed315dcf48cc32701e0435bdfaa.tar.gz
vaadin-framework-d8a5f96b36946ed315dcf48cc32701e0435bdfaa.zip
Support running JUnit tests (#9299)
Diffstat (limited to 'uitest/build.xml')
-rw-r--r--uitest/build.xml87
1 files changed, 87 insertions, 0 deletions
diff --git a/uitest/build.xml b/uitest/build.xml
new file mode 100644
index 0000000000..6b8a6934c3
--- /dev/null
+++ b/uitest/build.xml
@@ -0,0 +1,87 @@
+<?xml version="1.0"?>
+
+<project name="vaadin-uitest" basedir="." default="publish-local" xmlns:ivy="antlib:org.apache.ivy.ant">
+ <description>
+ Provides a uitest WAR containing Vaadin UI tests
+ </description>
+ <include file="../common.xml" as="common" />
+ <include file="../build.xml" as="vaadin" />
+
+ <!-- global properties -->
+ <property name="module.name" value="vaadin-uitest" />
+ <property name="result.dir" value="result" />
+
+ <path id="classpath.compile.custom">
+ </path>
+
+ <target name="dependencies">
+ <!-- This is copied from common.xml to be able to add server.tests.source to the source path -->
+
+ <ivy:resolve resolveid="common" conf="build, build-provided" />
+ <ivy:cachepath pathid="classpath.compile.dependencies" conf="build, build-provided" />
+ </target>
+
+ <target name="compile" description="Compiles the module" depends="dependencies">
+
+ <fail unless="module.name" message="No module name given" />
+ <property name="result.dir" location="result" />
+ <property name="src" location="${result.dir}/../src" />
+ <property name="classes" location="${result.dir}/classes" />
+ <property name="server.tests.sources" location="${result.dir}/../../server/tests/src" />
+ <mkdir dir="${classes}" />
+
+ <!-- TODO: Get rid of this -->
+ <javac destdir="${classes}" source="${vaadin.java.version}" target="${vaadin.java.version}" debug="true" encoding="UTF-8" includeantruntime="false">
+ <src path="${server.tests.sources}" />
+ <include name="com/vaadin/tests/data/bean/**" />
+ <include name="com/vaadin/tests/VaadinClasses.java" />
+ <include name="com/vaadin/data/util/sqlcontainer/SQLTestsConstants.java" />
+ <classpath refid="classpath.compile.dependencies" />
+ <classpath refid="classpath.compile.custom" />
+ </javac>
+
+ <javac destdir="${classes}" source="${vaadin.java.version}" target="${vaadin.java.version}" debug="true" encoding="UTF-8" includeantruntime="false">
+ <src path="${src}" />
+ <classpath location="${classes}" />
+ <classpath refid="classpath.compile.dependencies" />
+ <classpath refid="classpath.compile.custom" />
+ </javac>
+ </target>
+
+ <target name="war" depends="compile, dependencies">
+ <property name="result.dir" location="result" />
+ <property name="classes" location="${result.dir}/classes" />
+ <property name="result.war" location="${result.dir}/lib/${module.name}-${vaadin.version}.war" />
+ <property name="WebContent.dir" location="${vaadin.basedir}/WebContent" />
+ <property name="deps.dir" location="${result.dir}/deps" />
+
+
+ <mkdir dir="${deps.dir}" />
+ <copy todir="${deps.dir}" flatten="true">
+ <path refid="classpath.compile.dependencies" />
+ </copy>
+
+ <war destfile="${result.war}" duplicate="fail" index="true">
+ <fileset refid="common.files.for.all.jars" />
+ <fileset dir="${WebContent.dir}">
+ <include name="statictestfiles/**" />
+ <include name="WEB-INF/*.xml" />
+ </fileset>
+ <classes dir="${classes}" />
+ <lib dir="${deps.dir}" />
+ </war>
+
+ </target>
+
+ <target name="publish-local" depends="war">
+ <antcall target="common.publish-local" />
+ </target>
+
+ <target name="clean">
+ <antcall target="common.clean" />
+ </target>
+ <target name="tests">
+ <!--<antcall target="common.tests.run" />-->
+ <echo>WHAT? No JUnit tests for ${module.name}!</echo>
+ </target>
+</project> \ No newline at end of file