| <?xml version="1.0"?> |
| <project name="Automated Testing for GMF" default="all" basedir="."> |
| <!-- Adjust these properties as appropriate before executing tests. During the automated build, |
| these are set based on the build configuration settings. --> |
| <property name="baseLocation" value="${basedir}/../.."/> |
| |
| <!-- Load the pluginVersions.property file generated by the build --> |
| <property file="${buildRoot}/tests/finalPluginsVersions.properties"/> |
| |
| <property name="eclipse-home" value="${baseLocation}" /> |
| |
| <target name="cleanup.config"> |
| <echo message="Cleaning up eclipse config..."/> |
| <delete includeemptydirs="true"> |
| <fileset dir="${baseLocation}/configuration"> |
| <include name="**/*"/> |
| <exclude name="config.ini"/> |
| <exclude name="*.log"/> |
| </fileset> |
| </delete> |
| </target> |
| |
| <target name="runtests" description="Executes the junit tests for a specified plug-in."> |
| <!-- Pull the test.xml out of the test bundle --> |
| <unzip src="${baseLocation}/plugins/${testPlugin}_${version}.jar" dest="${baseLocation}/plugins/${testPlugin}_${version}"> |
| <patternset> |
| <include name="test.xml"/> |
| </patternset> |
| </unzip> |
| <!-- Invoke the tests --> |
| <ant antfile="${baseLocation}/plugins/${testPlugin}_${version}/test.xml" dir="${eclipse-home}" /> |
| <!--- Remove extracted test.xml --> |
| <delete dir="${baseLocation}/plugins/${testPlugin}_${version}"/> |
| <move file="${baseLocation}/${testPlugin}.xml" tofile="${basedir}/testresults/xml/${testPlugin}.xml" /> |
| </target> |
| |
| <!-- For each, the version value is what's found in generated finalPluginVersions.properties file. Typically, |
| it is the build id (e.g. I20060131-0200) --> |
| <target name="all" depends="cleanup.config" description="Runs the test.xml of the test plugins"> |
| <antcall target="runtests"> |
| <param name="testPlugin" value="org.eclipse.gmf.tests.runtime.emf.clipboard.core" /> |
| <param name="version" value="${org.eclipse.gmf.tests.runtime.emf.clipboard.core}" /> |
| </antcall> |
| <antcall target="runtests"> |
| <param name="testPlugin" value="org.eclipse.gmf.tests.runtime.emf.commands.core" /> |
| <param name="version" value="${org.eclipse.gmf.tests.runtime.emf.commands.core}" /> |
| </antcall> |
| <antcall target="runtests"> |
| <param name="testPlugin" value="org.eclipse.gmf.tests.runtime.emf.type.core" /> |
| <param name="version" value="${org.eclipse.gmf.tests.runtime.emf.type.core}" /> |
| </antcall> |
| <antcall target="runtests"> |
| <param name="testPlugin" value="org.eclipse.gmf.tests.runtime.emf.type.ui" /> |
| <param name="version" value="${org.eclipse.gmf.tests.runtime.emf.type.ui}" /> |
| </antcall> |
| <antcall target="runtests"> |
| <param name="testPlugin" value="org.eclipse.gmf.tests.runtime.emf.ui" /> |
| <param name="version" value="${org.eclipse.gmf.tests.runtime.emf.ui}" /> |
| </antcall> |
| <antcall target="runtests"> |
| <param name="testPlugin" value="org.eclipse.gmf.tests.runtime.gef.ui" /> |
| <param name="version" value="${org.eclipse.gmf.tests.runtime.gef.ui}" /> |
| </antcall> |
| <antcall target="runtests"> |
| <param name="testPlugin" value="org.eclipse.gmf.tests.runtime.common.core" /> |
| <param name="version" value="${org.eclipse.gmf.tests.runtime.common.core}" /> |
| </antcall> |
| <antcall target="runtests"> |
| <param name="testPlugin" value="org.eclipse.gmf.tests.runtime.common.ui" /> |
| <param name="version" value="${org.eclipse.gmf.tests.runtime.common.ui}" /> |
| </antcall> |
| <antcall target="runtests"> |
| <param name="testPlugin" value="org.eclipse.gmf.tests.runtime.common.ui.services" /> |
| <param name="version" value="${org.eclipse.gmf.tests.runtime.common.ui.services}" /> |
| </antcall> |
| <antcall target="runtests"> |
| <param name="testPlugin" value="org.eclipse.gmf.tests.runtime.common.ui.services.action" /> |
| <param name="version" value="${org.eclipse.gmf.tests.runtime.common.ui.services.action}" /> |
| </antcall> |
| <antcall target="runtests"> |
| <param name="testPlugin" value="org.eclipse.gmf.tests.runtime.diagram.ui" /> |
| <param name="version" value="${org.eclipse.gmf.tests.runtime.diagram.ui}" /> |
| </antcall> |
| <antcall target="runtests"> |
| <param name="testPlugin" value="org.eclipse.gmf.tests.runtime.draw2d.ui" /> |
| <param name="version" value="${org.eclipse.gmf.tests.runtime.draw2d.ui}" /> |
| </antcall> |
| <antcall target="runtests"> |
| <param name="testPlugin" value="org.eclipse.gmf.tests.runtime.draw2d.ui.render" /> |
| <param name="version" value="${org.eclipse.gmf.tests.runtime.draw2d.ui.render}" /> |
| </antcall> |
| <antcall target="genHtml"/> |
| </target> |
| |
| <target name="genHtml" description="Generates HTML results with provided JUNIT.XSL provided"> |
| <style style="${basedir}/JUNIT.XSL" basedir="${basedir}/testresults/xml" destdir="${basedir}/testresults/html/" /> |
| </target> |
| </project> |