blob: 4e3a523e91fe9f4992fb75d567bdabc116c7b559 [file] [log] [blame]
<project
name="Automated Eclipse Testing"
default="all"
basedir=".">
<echo
level="info"
message="starting Automated Eclipse Testing" />
<echo
level="debug"
message="basedir: ${basedir}" />
<echo
level="debug"
message="testRoot: ${testRoot}" />
<fail
message="testRoot must be set"
unless="testRoot" />
<property environment="env" />
<!--properties file containing the Dali tests plugin names and versions -->
<property
file="${env.LOCAL_BUILD_PROPERTIES_DIR}/daliTestPluginsVersions.properties" />
<!--properties file containing the build information-->
<property
file="${buildDirectory}/label.properties" />
<!--default directory where test-eclipse will be installed-->
<property
name="install"
value="${testRoot}" />
<!--name that can be added to report name to identify which platform tests results come from-->
<property
name="platform"
value="" />
<!-- The root of the eclipse installation -->
<property
name="eclipse-home"
value="${testRoot}/eclipse" />
<!-- The directory that will contain the xml and html results from the tests that are run -->
<property
name="results"
value="${testRoot}/results" />
<target
name="init">
<!--
<antcall
target="computePluginVersion" />
-->
<property
file="${testRoot}/test2.properties" />
</target>
<target
name="setup"
if="clean"
description="Reinstall the test Eclipse installation if specified by user">
<delete
dir="${install}" />
<mkdir
dir="${install}" />
<exec
dir="."
executable="unzip">
<arg
line="-o -qq ../downloads/*.zip -d ${install}" />
</exec>
<exec
dir="."
executable="unzip">
<arg
line="-o -qq wtp-wst-tests-feature*.zip -d ${install}" />
</exec>
</target>
<target
name="runtests"
depends="setup"
description="Runs ant on the test.xml for a specified plugin.">
<available
file="${eclipse-home}/plugins/${testPlugin}/test.xml"
property="test.xml.exists" />
<antcall
target="runtests2" />
</target>
<target
name="runtests2"
if="test.xml.exists">
<antcall
target="runtests-normal" />
<copy
file="${eclipse-home}/${report}.xml"
tofile="${results}/xml/${report}_${platform}.xml"
failonerror="false" />
<antcall
target="genHtml" />
</target>
<target
name="runtests-normal">
<ant
antfile="${eclipse-home}/plugins/${testPlugin}/test.xml"
dir="${eclipse-home}">
<property
name="library-file"
value="${testRoot}/junit-tests.xml" />
</ant>
<copy
file="${eclipse-home}/${report}.xml"
tofile="${results}/xml/${report}_${platform}.xml"
failonerror="false" />
<antcall
target="genHtml" />
</target>
<!-- Dali tests -->
<target
name="jpt-utility-tests"
depends="init"
description="Runs the org.eclipse.jpt.utility.tests test.xml">
<echo message="Running target=runtests - testPlugin=${org.eclipse.jpt.utility.tests}" />
<antcall
target="runtests">
<param
name="testPlugin"
value="${org.eclipse.jpt.utility.tests}" />
<param
name="report"
value="org.eclipse.jpt.utility.tests" />
</antcall>
</target>
<target
name="dali-core-tests"
description="Runs the org.eclipse.jpt.core.tests test.xml">
<echo message="Running target=runtests - testPlugin=${org.eclipse.jpt.core.tests}" />
<antcall
target="runtests">
<param
name="testPlugin"
value="${org.eclipse.jpt.core.tests}" />
<param
name="report"
value="org.eclipse.jpt.core.tests" />
</antcall>
</target>
<!-- releng Tests -->
<target
name="releng-tests"
depends="init"
description="Runs the releng tests.">
<antcall
target="runtests">
<param
name="testPlugin"
value="${org.eclipse.wtp.releng.tests}" />
<param
name="report"
value="org.eclipse.wtp.releng.tests" />
</antcall>
</target>
<!-- Target: all -->
<target
name="all"
depends="init">
<echo
level="info"
message="Starting releng tests" />
<antcall
target="releng-tests" />
<echo
level="info"
message="Starting JPT Unit Tests" />
<echo
level="info"
message="Starting jpt-utility-tests" />
<antcall
target="jpt-utility-tests" />
<echo
level="info"
message="Starting dali-core-tests" />
<antcall
target="dali-core-tests" />
<echo
level="info"
message="Ended JPT Unit Tests" />
</target>
<target
name="genHtml"
description="Generates HTML results with provided JUNIT.XSL provided"
unless="genHtml.disable">
<xslt
style="JUNIT.XSL"
basedir="${results}/xml"
destdir="${results}/html" />
</target>
<target
name="computePluginVersion"
depends="test2properties"
unless="test2propertiesexists">
<java
classname="org.eclipse.wtp.releng.test.ComputePluginVersion">
<classpath>
<pathelement
location="ComputePluginVersion.jar" />
</classpath>
<arg
value="${testRoot}/eclipse/plugins" />
<arg
value="${testRoot}/test2.properties" />
</java>
</target>
<target
name="test2properties">
<condition
property="test2propertiesexists">
<available
file="${testRoot}/test2.properties" />
</condition>
</target>
</project>