]> source.dussan.org Git - vaadin-framework.git/commitdiff
Fixed running of TestBench tests (#9299)
authorArtur Signell <artur@vaadin.com>
Wed, 5 Sep 2012 16:45:04 +0000 (19:45 +0300)
committerArtur Signell <artur@vaadin.com>
Sun, 9 Sep 2012 08:23:30 +0000 (11:23 +0300)
build.xml
uitest/test.xml
uitest/vaadin-server.xml

index ce8123fa250033b08e40596cb2823767bb66372d..dd5741c523cc68a9749bca4b23cf0d92cc2e46d8 100644 (file)
--- a/build.xml
+++ b/build.xml
 
        <target name="tests" depends="buildorder">
                <parallel>
-                       <subant buildpathref="build-path" target="tests">
-                       </subant>
-                       <subant antfile="test/uitest.xml" target="test-package" />
+                       <subant buildpathref="build-path" target="tests" />
+                       <ant antfile="uitest/test.xml" target="test-package">
+                               <property name="war.file" location="result/artifacts/${vaadin.version}/vaadin-uitest/vaadin-uitest-${vaadin.version}.war" />
+                       </ant>
                </parallel>
        </target>
 
index fca4d1c299029f8218a4664536b70ede34754227..294d0130e43ccfe0114b8657d5d0a1748b57399f 100644 (file)
@@ -1,14 +1,8 @@
 <?xml version="1.0"?>
 <project xmlns:antcontrib="antlib:net.sf.antcontrib" xmlns:ivy="antlib:org.apache.ivy.ant" name="Run Vaadin Testbench Tests" basedir="." default="run-and-clean-up">
 
-       <property name="project.root" value=".." />
-       <!-- Import common targets  -->
-       <!--<import file="../build/common.xml" />-->
-       <!-- ant contrib required for flow control (for loop, if, property override)   -->
-       <!-- Note that we have to use a namespace to avoid clash when running sub-ant. -->
-       <ivy:resolve file="${project.root}/build/ivy/ivy.xml" conf="taskdefs" />
-       <ivy:cachepath pathid="taskdefs.classpath" conf="taskdefs" />
-       <taskdef uri="antlib:net.sf.antcontrib" resource="net/sf/antcontrib/antlib.xml" classpathref="taskdefs.classpath" />
+       <include file="../common.xml" />
+       <dirname property="test.xml.dir" file="${ant.file.Run Vaadin Testbench Tests}" />
 
        <!-- ================================================================== -->
        <!-- Configuration                                                      -->
@@ -44,9 +38,9 @@
        </target>
 
        <!-- fileset containing all TestBench tests to run -->
-       <fileset dir=".." id="html-test-files">
-               <include name="uitest/**/AbsoluteLayoutClip**.html" />
-               <exclude name="uitest/integration-testscripts/**" />
+       <fileset dir="${test.xml.dir}" id="html-test-files">
+               <include name="src/**/*.html" />
+               <exclude name="integration-testscripts/**/*.html" />
        </fileset>
 
        <!-- This target converts HTML tests files to java junit tests. One test file for each browser is created. -->
        <!-- Starts the server and runs all TestBench tests -->
        <target name="test-package">
                <fail unless="war.file" message="No 'war.file' parameter given." />
-               <property name="test-output-dir" location="result/testbench-junit-classes" />
+               <property name="test-output-dir" location="${test.xml.dir}/result/testbench-junit-classes" />
                <property name="retries" value="2" />
 
                <!-- Parameters for the test.xml script. -->
                <property name="com.vaadin.testbench.screenshot.block.error" value="0.025" />
                <property name="com.vaadin.testbench.debug" value="false" />
 
-
                <parallel>
                        <daemons>
-                               <ant antfile="vaadin-server.xml" inheritall="true" inheritrefs="true" target="deploy-and-start" />
+                               <ant antfile="${test.xml.dir}/vaadin-server.xml" inheritall="true" inheritrefs="true" target="deploy-and-start" />
                        </daemons>
                        <sequential>
-                               <ant antfile="vaadin-server.xml" target="wait-for-startup" />
+                               <ant antfile="${test.xml.dir}/vaadin-server.xml" target="wait-for-startup" />
                                <antcall inheritall="true" inheritrefs="true" target="run-and-clean-up" />
                        </sequential>
                </parallel>
index f07ff49e50e7cbff91acf63000c7193f65ad6bd8..3628483436d8b65fa9dbc0dae5b9078ada2508a2 100644 (file)
@@ -1,11 +1,12 @@
 <?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=".">
        <include file="../common.xml" />
+       <dirname property="dir" file="${ant.file.vaadin-server}" />
 
        <target name="deploy-and-start">
                <fail unless="war.file" message="No war file given in 'war.file'" />
 
-               <ivy:resolve file="ivy.xml" />
+               <ivy:resolve file="${dir}/ivy.xml" />
                <ivy:cachepath pathid="classpath.jetty" conf="jetty-run" />
                <java classname="org.mortbay.jetty.runner.Runner" fork="yes">
                        <arg value="--port" />