1 <project name="Automated VE Testing" default="all" basedir="." > 2 3 <!--properties file containing the plugin directory name including version number--> 4 <property file="test.properties" /> 5 6 <!--default directory where test-eclipse will be installed--> 7 <property name="install" value="${basedir}/target" /> 8 9 <!--name that can be added to report name to identify which platform tests results come from--> 10 <property name="platform" value="" /> 11 12 <!-- The root of the eclipse installation --> 13 <property name="eclipse-home" value="${install}/eclipse" /> 14 15 <!-- The directory that will contain the xml and html results from the tests that are run --> 16 <property name="results" value="${basedir}/results" /> 17 18 <target name="init"> 19 </target> 20 21 <target name="setup" if="clean" description="Reinstall the test Eclipse installation if specified by user"> 22 <delete dir="${install}" /> 23 <mkdir dir="${install}" /> 24 25 <!--The eclipse SDK must exist before this script is executed--> 26 <exec dir="." executable="unzip"> 27 <arg line="-o -qq eclipse-SDK*.zip -d ${install}"/> 28 </exec> 29 30 <exec dir="." executable="unzip"> 31 <arg line="-o -qq GEF*.zip -d ${install}/eclipse"/> 32 </exec> 33 34 <exec dir="." executable="unzip"> 35 <arg line="-o -qq emf*.zip -d ${install}/eclipse"/> 36 </exec> 37 38 <exec dir="." executable="unzip"> 39 <arg line="-o -qq VE-runtime-*.zip -d ${install}/eclipse"/> 40 </exec> 41 42 <exec dir="." executable="unzip"> 43 <arg line="-o -qq VE-junit-tests-*.zip -d ${install}"/> 44 </exec> 45 </target> 46 47 <target name="runtests" depends="setup" description="Runs ant on the test.xml for a specified plugin. Requires a property value setting for testPlugin only if test.properties is not available. The property testPlugin represents a directory name made up of the plugin id and plugin version. This directory must contain a valid test.xml."> 48 <ant antfile="${eclipse-home}/plugins/${testPlugin}/test.xml" dir="${eclipse-home}" /> 49 <copy file="${eclipse-home}/${report}.xml" tofile="${results}/xml/${report}_${platform}.xml" /> 50 </target> 51 52 <target name="ve" description="Runs the org.eclipse.ve.tests test.xml"> 53 <antcall target="runtests"> 54 <param name="testPlugin" value="${org.eclipse.ve.tests}" /> 55 <param name="report" value="org.eclipse.ve.tests" /> 56 </antcall> 57 </target> 58 59 <target name="jem" description="Runs the org.eclipse.jem.tests test.xml"> 60 <antcall target="runtests"> 61 <param name="testPlugin" value="${org.eclipse.jem.tests}" /> 62 <param name="report" value="org.eclipse.jem.tests" /> 63 </antcall> 64 </target> 65 66 <target name="all"> 67 <antcall target="jem" /> 68 <antcall target="ve" /> 69 <antcall target="genHtml" /> 70 </target> 71 72 <target name="genHtml" description="Generates HTML results with provided JUNIT.XSL provided"> 73 <style style="JUNIT.XSL" basedir="${results}/xml" destdir="${results}/html" /> 74 </target> 75 76 77 </project>