| <?xml version="1.0" encoding="UTF-8"?> |
| <project |
| name="RelEng Automated Tests" |
| default="run" |
| basedir="."> |
| |
| <property environment="env" /> |
| <!-- The property ${eclipse-home} should be passed into this script --> |
| <!-- sets the properties eclipse-home, and library-file --> |
| <property |
| name="eclipse-home" |
| value="${basedir}/../../" /> |
| <property |
| name="plugin-name" |
| value="org.eclipse.releng.tests" /> |
| <property |
| name="library-file" |
| value="${eclipse-home}/plugins/org.eclipse.test/library.xml" /> |
| |
| <!-- This target holds all initialization code that needs to be done for --> |
| <!-- all tests that are to be run. Initialization for individual tests --> |
| <!-- should be done within the body of the suite target. --> |
| <target name="init"> |
| |
| <tstamp /> |
| |
| <condition property="JAVADOC_OUTPUT_LOCATION" value="file:///${eclipse-home}/../../../.." else="file:///${eclipse-home}/../.." > |
| <os family="mac" /> |
| </condition> |
| |
| <condition property="downloadHost" value="${env.DOWNLOAD_HOST}" else="download.eclipse.org"> |
| <isset property="env.DOWNLOAD_HOST" /> |
| </condition> |
| |
| <condition property="tar.gz"> |
| <contains |
| string="${runtimeArchive}" |
| substring=".tar.gz" /> |
| </condition> |
| <condition |
| property="location" |
| value="/builds/t"> |
| <equals |
| arg1="${os}" |
| arg2="win32" /> |
| </condition> |
| <property |
| name="location" |
| value="${basedir}/releng" /> |
| <property |
| name="locationcompare" |
| value="${basedir}/relengcompare" /> |
| <property |
| name="locationcomparecurrent" |
| value="${basedir}/relengcomparecurrent" /> |
| <!-- Is now 4 part qualifier. Value used to be set at start of file. |
| But, then had to use only 3 part qualifier. Now, set elsewhere? |
| <property name="org.eclipse.releng.tests" value="org.eclipse.releng.tests_3.2.300" /> |
| --> |
| <echo message="Full name with versionand qualifier of org.eclipse.releng.tests:" /> |
| <echo message=" ${org.eclipse.releng.tests}" /> |
| </target> |
| |
| <!-- This target holds code to cleanup the testing environment after the tests --> |
| <!-- have been run. You can use this to delete temporary files that are created. --> |
| <target name="cleanup"> |
| <!-- temp, leave for inspection |
| <delete dir="${location}" quiet="true" /> |
| <delete dir="${locationcompare}" /> |
| --> |
| </target> |
| |
| <!--if file is a tar.gz file and not a zip, extract the SDK on which to |
| execute chkpii before starting tests --> |
| <target |
| name="setup" |
| if="tar.gz"> |
| <property |
| name="archiveDir" |
| value="${eclipse-home}/../.." /> |
| <delete dir="${location}" /> |
| <mkdir dir="${location}" /> |
| <exec |
| dir="${location}" |
| executable="tar"> |
| <arg line="-xzf ${archiveDir}/${runtimeArchive}" /> |
| </exec> |
| <condition property="notMac"> |
| <not> |
| <os family="mac" /> |
| </not> |
| </condition> |
| <!-- <antcall target="setupcompare" /> --> |
| </target> |
| |
| <target |
| name="setupcompare" |
| if="notMac"> |
| <!-- |
| Run compare test only on Linux machine since it is the fastest machine. |
| Also, the compare tool only parses feature.xmls so it only needs to be run on one machine. |
| --> |
| <delete dir="${locationcompare}" /> |
| <mkdir dir="${locationcompare}" /> |
| <property |
| name="locationcomparetemp" |
| value="${locationcompare}/temp" /> |
| <delete dir="${locationcomparetemp}" /> |
| <mkdir dir="${locationcomparetemp}" /> |
| <delete dir="${locationcompare}" /> |
| <mkdir dir="${locationcompare}" /> |
| <property |
| name="locationcomparetemp" |
| value="${locationcompare}/temp" /> |
| <delete dir="${locationcomparetemp}" /> |
| <mkdir dir="${locationcomparetemp}" /> |
| <property file="${basedir}/../../equinoxp2tests.properties" /> |
| <p2.mirror |
| source="${org.eclipse.equinox.p2.tests.last.release.build.repo}" |
| ignoreErrors="true"> |
| <destination |
| kind="metadata" |
| location="file://${locationcomparetemp}" |
| name="Current build Repo" /> |
| <destination |
| kind="artifact" |
| location="file://${locationcomparetemp}" |
| name="Current build Repo" /> |
| </p2.mirror> |
| <p2.repo2runnable destination="${locationcompare}"> |
| <source |
| dir="${locationcompare}" |
| includes="temp" /> |
| </p2.repo2runnable> |
| <delete dir="${locationcomparetemp}" /> |
| |
| <delete dir="${locationcomparecurrent}" /> |
| <mkdir dir="${locationcomparecurrent}" /> |
| <property |
| name="locationcomparecurrenttemp" |
| value="${locationcomparecurrent}/temp" /> |
| <delete dir="${locationcomparecurrenttemp}" /> |
| <mkdir dir="${locationcomparecurrenttemp}" /> |
| <p2.mirror |
| source="${org.eclipse.equinox.p2.tests.current.build.repo}" |
| ignoreErrors="true"> |
| <destination |
| kind="metadata" |
| location="file://${locationcomparecurrenttemp}" |
| name="Current build Repo" /> |
| <destination |
| kind="artifact" |
| location="file://${locationcomparecurrenttemp}" |
| name="Current build Repo" /> |
| </p2.mirror> |
| <p2.repo2runnable destination="${locationcomparecurrent}"> |
| <source |
| dir="${locationcomparecurrent}" |
| includes="temp" /> |
| </p2.repo2runnable> |
| <delete dir="${locationcomparecurrenttemp}" /> |
| |
| <replace |
| file="${basedir}/plugins/${org.eclipse.releng.tests}/compare.properties" |
| token="@new@" |
| value="${locationcomparecurrent}/features" /> |
| <replace |
| file="${basedir}/plugins/${org.eclipse.releng.tests}/compare.properties" |
| token="@old@" |
| value="${locationcompare}/features" /> |
| <property |
| name="versionOutputDir" |
| value="${locationcompare}/../../../results/versiontool" /> |
| <mkdir dir="${versionOutputDir}" /> |
| <exec |
| dir="${versionOutputDir}" |
| executable="/bin/touch" |
| failonerror="false" |
| os="Linux"> |
| <arg line="results.xml" /> |
| </exec> |
| <property |
| name="versionOutputFile" |
| value="${versionOutputDir}/results.xml" /> |
| <echo message="locationcompare ${locationcompare} versionOutputDir ${versionOutputDir} versionOutputFile ${versionOutputFile}" /> |
| <replace |
| file="${basedir}/plugins/${org.eclipse.releng.tests}/compare.properties" |
| token="@output@" |
| value="${versionOutputFile}" /> |
| <replace |
| file="${basedir}/plugins/${org.eclipse.releng.tests}/compare.properties" |
| token="@compareoptions@" |
| value="${basedir}/plugins/${org.eclipse.releng.tests}/compareoptions.properties" /> |
| </target> |
| |
| |
| |
| <!-- This target runs the test suite. Any actions that need to happen after all --> |
| <!-- the tests have been run should go here. --> |
| <target |
| name="run" |
| depends="init,BuildTests"> |
| <ant |
| target="collect" |
| antfile="${library-file}" |
| dir="${eclipse-home}"> |
| <property |
| name="includes" |
| value="org*.xml" /> |
| <property |
| name="output-file" |
| value="${plugin-name}.xml" /> |
| </ant> |
| </target> |
| |
| <target |
| name="BuildTests" |
| depends="init,cleanup,setup"> |
| <ant |
| target="core-test" |
| antfile="${library-file}" |
| dir="${eclipse-home}"> |
| <property |
| name="data-dir" |
| value="${location}" /> |
| <property |
| name="plugin-name" |
| value="${plugin-name}" /> |
| <property |
| name="classname" |
| value="org.eclipse.releng.tests.BuildTests" /> |
| <property |
| name="plugin-path" |
| value="${eclipse-home}/plugins/${org.eclipse.releng.tests}" /> |
| |
| <property |
| name="vmargs" |
| value="-DdownloadHost=${downloadHost} -DbuildId=${buildId} -DRELENGTEST.JAVADOC.URLS=${JAVADOC_OUTPUT_LOCATION}/platform.doc.isv.javadoc.txt,${JAVADOC_OUTPUT_LOCATION}/jdt.doc.isv.javadoc.txt,${JAVADOC_OUTPUT_LOCATION}/pde.doc.user.javadoc.txt,${JAVADOC_OUTPUT_LOCATION}/platform.doc.isv.schema.txt,${JAVADOC_OUTPUT_LOCATION}/jdt.doc.isv.schema.txt,${JAVADOC_OUTPUT_LOCATION}/pde.doc.user.schema.txt" /> |
| </ant> |
| </target> |
| |
| </project> |