blob: c0e0725c82f8e5ecdbae8c8644b7a051d1d1afc6 [file] [log] [blame]
<project
name="Automated Eclipse Testing"
default="all"
basedir=".">
<property
environment="env"/>
<!-- required to get proper value of dropinsFolder -->
<property
name="keyCfgFile"
value="${env.PROJECT_BUILDERS}/${projectname}/workdir/maps/${env.RELENG}/maps/build.cfg"/>
<echo
level="debug"
message="keyCfgFile: ${keyCfgFile}"/>
<property
file="${keyCfgFile}"/>
<echo
level="debug"
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"/>
<!--properties file containing the some server name properties -->
<property
file="${testRoot}/testServer.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}${dropinsFolder}/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="runtests"
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}/dali-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">
<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="jpt-core-tests"
depends="init"
description="Runs the org.eclipse.jpt.core.tests test.xml">
<antcall
target="runtests">
<param
name="testPlugin"
value="${org.eclipse.jpt.core.tests}"/>
<param
name="report"
value="org.eclipse.jpt.core.tests"/>
</antcall>
</target>
<target
name="jpt-eclipselink-core-tests"
depends="init"
description="Runs the org.eclipse.jpt.eclipselink.core.tests test.xml">
<antcall
target="runtests">
<param
name="testPlugin"
value="${org.eclipse.jpt.eclipselink.core.tests}"/>
<param
name="report"
value="org.eclipse.jpt.eclipselink.core.tests"/>
</antcall>
</target>
<target
name="all"
depends="init">
<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 jpt-core-tests"/>
<antcall
target="jpt-core-tests"/>
<echo
level="info"
message="Starting jpt-eclipselink-core-tests"/>
<antcall
target="jpt-eclipselink-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="${eclipse-home}/plugins"/>
<arg
value="${testRoot}/test2.properties"/>
<jvmarg
value="-Djava.io.tmpdir=${env.RECOMMENDED_TMP_DIR}"/>
</java>
</target>
<target
name="test2properties">
<condition
property="test2propertiesexists">
<available
file="${testRoot}/test2.properties"/>
</condition>
</target>
</project>