| <project name="Automated Eclipse Testing" default="all" basedir="."> |
| |
| <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}/eclipse" /> |
| |
| <!-- The path to libary.xml --> |
| <!--property name="library-file" value="${eclipse-home}/plugins/${org.eclipse.test}/library.xml" /--> |
| |
| <!-- The directory that will contain the xml and html results from the tests that are run --> |
| <property name="results" value="${testRoot}/results" /> |
| |
| <!-- jonas install directory --> |
| <property name="jonas432Dir" value="${testRoot}/${jonas432DirName}" /> |
| |
| <target name="init"> |
| <echo message="starting Automated Eclipse Testing" /> |
| <echo message="basedir: ${basedir}" /> |
| <echo message="testRoot: ${testRoot}" /> |
| |
| <antcall target="setPropertyJOnAS432Dir" /> |
| <antcall target="computePluginVersion" /> |
| </target> |
| |
| <target name="setPropertyJOnAS432Dir" unless="jonas432Dir"> |
| <property name="jonas432Dir" value="${testRoot}/${jonas432DirName}" /> |
| </target> |
| |
| <target name="setup" if="clean" description="Reinstall the test Eclipse installation if specified by user"> |
| <delete dir="${install}" /> |
| <mkdir dir="${install}" /> |
| <exec dir="." executable="unzip"> |
| <arg line="-o -qq ../downloads/*.zip -d ${install}" /> |
| </exec> |
| |
| <exec dir="." executable="unzip"> |
| <arg line="-o -qq wtp-wst-tests-feature*.zip -d ${install}" /> |
| </exec> |
| |
| </target> |
| |
| <target name="runapitests" depends="setup"> |
| <antcall target="runtests" /> |
| </target> |
| |
| <target name="runtests" depends="setup" description="Runs ant on the test.xml for a specified plugin."> |
| <available file="${eclipse-home}/plugins/${testPlugin}/test.xml" property="test.xml.exists" /> |
| <echo message="Test file:${eclipse-home}/plugins/${testPlugin}/test.xml exists ${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" /> |
| <!--property name="library-file" value="${testRoot}/library.xml" /--> |
| </ant> |
| <copy file="${eclipse-home}/${report}.xml" tofile="${results}/xml/${report}_${platform}.xml" failonerror="false" /> |
| <antcall target="genHtml" /> |
| </target> |
| |
| <!-- DLTK Core --> |
| |
| <target name="core-tests" description="Runs the org.eclipse.dltk.core.tests test.xml"> |
| <echo message="fourdman: hello from core-tests" /> |
| <antcall target="runtests"> |
| <param name="testPlugin" value="${org.eclipse.dltk.core.tests}" /> |
| <param name="report" value="org.eclipse.dltk.core.tests" /> |
| </antcall> |
| </target> |
| |
| <target name="core-debug-tests" description="Runs the org.eclipse.dltk.debug.tests test.xml"> |
| <antcall target="runtests"> |
| <param name="testPlugin" value="${org.eclipse.dltk.debug.tests}" /> |
| <param name="report" value="org.eclipse.dltk.debug.tests" /> |
| </antcall> |
| </target> |
| |
| <target name="core-ui-tests" description="Runs the org.eclipse.dltk.ui.tests test.xml"> |
| <antcall target="runtests"> |
| <param name="testPlugin" value="${org.eclipse.dltk.ui.tests}" /> |
| <param name="report" value="org.eclipse.dltk.ui.tests" /> |
| </antcall> |
| </target> |
| |
| <target name="core-validators-tests" description="Runs the org.eclipse.dltk.validators.core.tests test.xml"> |
| <echo message="fourdman: hello from validators core-tests" /> |
| <antcall target="runtests"> |
| <param name="testPlugin" value="${org.eclipse.dltk.validators.core.tests}" /> |
| <param name="report" value="org.eclipse.dltk.validators.core.tests" /> |
| </antcall> |
| </target> |
| |
| |
| <!-- DLTK Ruby --> |
| |
| <target name="ruby-core-tests" description="Runs the org.eclipse.dltk.ruby.core.tests test.xml"> |
| <antcall target="runtests"> |
| <param name="testPlugin" value="${org.eclipse.dltk.ruby.core.tests}" /> |
| <param name="report" value="org.eclipse.dltk.ruby.core.tests" /> |
| </antcall> |
| </target> |
| |
| <target name="ruby-ui-tests" description="Runs the org.eclipse.dltk.ruby.ui.tests test.xml"> |
| <antcall target="runtests"> |
| <param name="testPlugin" value="${org.eclipse.dltk.ruby.ui.tests}" /> |
| <param name="report" value="org.eclipse.dltk.ruby.ui.tests" /> |
| </antcall> |
| </target> |
| |
| <target name="ruby-ui-bot-tests" description="Runs the org.eclipse.dltk.ruby.ui.bot.tests test.xml"> |
| <antcall target="runtests"> |
| <param name="testPlugin" value="${org.eclipse.dltk.ruby.ui.bot.tests}" /> |
| <param name="report" value="org.eclipse.dltk.ruby.ui.bot.tests" /> |
| </antcall> |
| </target> |
| |
| <target name="ruby-debug-tests" description="Runs the org.eclipse.dltk.ruby.debug.tests test.xml"> |
| <antcall target="runtests"> |
| <param name="testPlugin" value="${org.eclipse.dltk.ruby.debug.tests}" /> |
| <param name="report" value="org.eclipse.dltk.ruby.debug.tests" /> |
| </antcall> |
| </target> |
| |
| <target name="ruby-formatter-tests" description="Runs the org.eclipse.dltk.ruby.formatter.tests test.xml"> |
| <antcall target="runtests"> |
| <param name="testPlugin" value="${org.eclipse.dltk.ruby.formatter.tests}" /> |
| <param name="report" value="org.eclipse.dltk.ruby.formatter.tests" /> |
| </antcall> |
| </target> |
| |
| <target name="ruby-testing-tests" description="Runs the org.eclipse.dltk.ruby.testing.tests test.xml"> |
| <antcall target="runtests"> |
| <param name="testPlugin" value="${org.eclipse.dltk.ruby.testing.tests}" /> |
| <param name="report" value="org.eclipse.dltk.ruby.testing.tests" /> |
| </antcall> |
| </target> |
| |
| <!-- DLTK Tcl --> |
| |
| <target name="tcl-core-tests" description="Runs the org.eclipse.dltk.tcl.core.tests test.xml"> |
| |
| <echo message="fourdman: hello from Tcl core-tests" /> |
| |
| <antcall target="runtests"> |
| <param name="testPlugin" value="${org.eclipse.dltk.tcl.core.tests}" /> |
| <param name="report" value="org.eclipse.dltk.tcl.core.tests" /> |
| </antcall> |
| </target> |
| <target name="tcl-parser-tests" description="Runs the org.eclipse.dltk.tcl.parser.tests test.xml"> |
| <echo message="hello from Tcl parser-tests" /> |
| <antcall target="runtests"> |
| <param name="testPlugin" value="${org.eclipse.dltk.tcl.parser.tests}" /> |
| <param name="report" value="org.eclipse.dltk.tcl.parser.tests" /> |
| </antcall> |
| </target> |
| <target name="tcl-validators-tests" description="Runs the org.eclipse.dltk.tcl.validators.tests test.xml"> |
| <echo message="hello from Tcl validators-tests" /> |
| <antcall target="runtests"> |
| <param name="testPlugin" value="${org.eclipse.dltk.tcl.validators.tests}" /> |
| <param name="report" value="org.eclipse.dltk.tcl.validators.tests" /> |
| </antcall> |
| </target> |
| |
| <target name="tcl-tests" description="Runs the org.eclipse.dltk.tcl.tests test.xml"> |
| <antcall target="runtests"> |
| <param name="testPlugin" value="${org.eclipse.dltk.tcl.tests}" /> |
| <param name="report" value="org.eclipse.dltk.tcl.tests" /> |
| </antcall> |
| </target> |
| |
| <target name="tcl-ui-tests" description="Runs the org.eclipse.dltk.tcl.ui.tests test.xml"> |
| <antcall target="runtests"> |
| <param name="testPlugin" value="${org.eclipse.dltk.tcl.ui.tests}" /> |
| <param name="report" value="org.eclipse.dltk.tcl.ui.tests" /> |
| </antcall> |
| </target> |
| |
| <!-- DLTK Python --> |
| |
| <target name="python-tests" description="Runs the org.eclipse.dltk.python.tests test.xml"> |
| <antcall target="runtests"> |
| <param name="testPlugin" value="${org.eclipse.dltk.python.tests}" /> |
| <param name="report" value="org.eclipse.dltk.python.tests" /> |
| </antcall> |
| </target> |
| |
| <target name="python-ui-tests" description="Runs the org.eclipse.dltk.python.ui.tests test.xml"> |
| <antcall target="runtests"> |
| <param name="testPlugin" value="${org.eclipse.dltk.python.ui.tests}" /> |
| <param name="report" value="org.eclipse.dltk.python.ui.tests" /> |
| </antcall> |
| </target> |
| |
| <!-- DLTK Javascript --> |
| |
| <target name="javascript-tests" description="Runs the org.eclipse.dltk.javascript.core.tests test.xml"> |
| <antcall target="runtests"> |
| <param name="testPlugin" value="${org.eclipse.dltk.javascript.core.tests}" /> |
| <param name="report" value="org.eclipse.dltk.javascript.core.tests" /> |
| </antcall> |
| </target> |
| |
| <!-- DLTK XOTcl --> |
| |
| <target name="xotcl-tests" description="Runs the org.eclipse.dltk.xotcl.core.tests test.xml"> |
| <antcall target="runtests"> |
| <param name="testPlugin" value="${org.eclipse.dltk.xotcl.core.tests}" /> |
| <param name="report" value="org.eclipse.dltk.xotcl.core.tests" /> |
| </antcall> |
| </target> |
| |
| <!-- DLTK ITcl --> |
| |
| <target name="itcl-tests" description="Runs the org.eclipse.dltk.itcl.core.tests test.xml"> |
| <antcall target="runtests"> |
| <param name="testPlugin" value="${org.eclipse.dltk.itcl.core.tests}" /> |
| <param name="report" value="org.eclipse.dltk.itcl.core.tests" /> |
| </antcall> |
| </target> |
| |
| <target name="performance-tests" description="Runs the org.eclipse.dltk.performance test.xml"> |
| <antcall target="runtests"> |
| <param name="testPlugin" value="${org.eclipse.dltk.tests.performance}" /> |
| <param name="report" value="org.eclipse.dltk.tests.performance" /> |
| </antcall> |
| </target> |
| |
| <target name="swtbot-ui-tests" description="Runs the org.eclipse.dltk.tcl.ui.tests.swtbot test.xml"> |
| <antcall target="runtests"> |
| <param name="testPlugin" value="${org.eclipse.dltk.tcl.ui.tests.swtbot}" /> |
| <param name="report" value="org.eclipse.dltk.tcl.ui.tests.swtbot" /> |
| </antcall> |
| </target> |
| |
| <target name="all" depends="init"> |
| <property file="${testRoot}/test2.properties" /> |
| |
| <echo message="Starting DLTK Unit Tests" /> |
| |
| <echo message="Starting Core Frameworks tests" /> |
| <antcall target="core-tests" /> |
| |
| <echo message="Starting Core Debug Frameworks tests" /> |
| <antcall target="core-debug-tests" /> |
| |
| <echo message="Starting Core UI tests" /> |
| <antcall target="core-ui-tests" /> |
| |
| <echo message="Starting Core Validators tests" /> |
| <antcall target="core-validators-tests" /> |
| |
| <echo message="Starting Ruby Core tests" /> |
| <antcall target="ruby-core-tests" /> |
| |
| <echo message="Starting Tcl Core tests" /> |
| <antcall target="tcl-core-tests" /> |
| |
| <echo message="Starting Tcl Parser tests" /> |
| <antcall target="tcl-parser-tests" /> |
| |
| <echo message="Starting Tcl Core tests" /> |
| <antcall target="tcl-validators-tests" /> |
| |
| <echo message="Starting Additional Tcl tests" /> |
| <antcall target="tcl-tests" /> |
| |
| <echo message="Starting Tcl UI tests" /> |
| <antcall target="tcl-ui-tests" /> |
| |
| <echo message="Starting Python Core tests" /> |
| <antcall target="python-tests" /> |
| |
| <echo message="Starting Python UI tests" /> |
| <antcall target="python-ui-tests" /> |
| |
| <echo message="Starting Javascript Core tests" /> |
| <antcall target="javascript-tests" /> |
| |
| <echo message="Starting Xotcl Core tests" /> |
| <antcall target="xotcl-tests" /> |
| |
| <echo message="Starting Ruby Debug tests" /> |
| <antcall target="ruby-debug-tests" /> |
| |
| <echo message="Starting Ruby Formatter tests" /> |
| <antcall target="ruby-formatter-tests" /> |
| |
| <echo message="Starting Ruby Testing tests" /> |
| <antcall target="ruby-testing-tests" /> |
| |
| <echo message="Starting Ruby UI tests" /> |
| <antcall target="ruby-ui-tests" /> |
| |
| <echo message="Starting Ruby UI SWTBot tests" /> |
| <antcall target="ruby-ui-bot-tests" /> |
| |
| <echo message="Starting Performance tests" /> |
| <antcall target="performance-tests" /> |
| |
| <echo message="Starting SWTBOT UI tests" /> |
| <antcall target="swtbot-ui-tests" /> |
| |
| <!--echo message="Starting ITcl Core tests" /> |
| <antcall target="itcl-tests" /--> |
| |
| <echo message="Ended DLTK Unit Tests" /> |
| |
| </target> |
| |
| <target name="genHtml" description="Generates HTML results with provided JUNIT.XSL provided" unless="genHtml.disable"> |
| <style style="JUNIT.XSL" basedir="${results}/xml" destdir="${results}/html" /> |
| </target> |
| |
| <target name="computePluginVersion"> |
| <java classname="org.eclipse.wtp.releng.test.ComputePluginVersion"> |
| <classpath> |
| <pathelement location="ComputePluginVersion.jar" /> |
| </classpath> |
| <arg value="${testRoot}/eclipse/plugins" /> |
| <arg value="${testRoot}/test2.properties" /> |
| </java> |
| </target> |
| |
| </project> |