| <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}/${env.RELENG}/maps/build.cfg" /> |
| <echo message="keyCfgFile: ${keyCfgFile}" /> |
| <property file="${keyCfgFile}" /> |
| |
| <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" /> |
| |
| <!--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}/wtp-junit-tests.xml" /> |
| </ant> |
| <copy |
| file="${eclipse-home}/${report}.xml" |
| tofile="${results}/xml/${report}_${platform}.xml" |
| failonerror="false" /> |
| <antcall |
| target="genHtml" /> |
| </target> |
| <target |
| name="xsl-tests" |
| depends="init"> |
| <antcall |
| target="runtests"> |
| <param |
| name="testPlugin" |
| value="${org.eclipse.wst.xsl.tests}" /> |
| <param |
| name="report" |
| value="org.eclipse.wst.xsl.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 |
| name="all" |
| depends="init"> |
| <echo |
| level="info" |
| message="Starting Unit Tests" /> |
| |
| <!-- |
| <echo |
| level="info" |
| message="Starting releng tests" /> |
| <antcall target="releng-tests" /> |
| --> |
| <echo |
| level="info" |
| message="Starting xsl-tests" /> |
| <antcall |
| target="xsl-tests" /> |
| <echo |
| level="info" |
| message="Ended 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> |