| <project name="Automated Eclipse Testing" default="all" basedir="." > |
| |
| <!--properties file containing the plugin directory name including version number--> |
| <property file="test.properties" /> |
| |
| <!--properties file containing the build information--> |
| <property file="label.properties" /> |
| |
| <!--default directory where test-eclipse will be installed--> |
| <property name="install" value="${basedir}" /> |
| |
| <!--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="${install}/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="${basedir}/results" /> |
| |
| <target name="init"> |
| |
| </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="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."> |
| <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"/> |
| <!-- |
| <antcall target="runtests-runAsPerfApp"/> |
| --> |
| <copy file="${eclipse-home}/${report}.xml" tofile="${results}/xml/${report}_${platform}.xml" failonerror="false" /> |
| <antcall target="genHtml" /> |
| </target> |
| |
| <target name="runtests-normal" unless="runAsPerfApp"> |
| <ant antfile="${eclipse-home}/plugins/${testPlugin}/test.xml" dir="${eclipse-home}"> |
| <property name="library-file" value="${testDir}/junit-tests.xml"/> |
| </ant> |
| <copy file="${eclipse-home}/${report}.xml" tofile="${results}/xml/${report}_${platform}.xml" failonerror="false" /> |
| <antcall target="genHtml" /> |
| </target> |
| |
| <target name="runtests-runAsPerfApp" if="runAsPerfApp"> |
| <ant antfile="${eclipse-home}/plugins/${testPlugin}/test.xml" dir="${eclipse-home}"> |
| <property name="library-file" value="${testDir}/performance-tests.xml"/> |
| <property name="runAsPerfApp" value="true"/> |
| </ant> |
| <copy file="${eclipse-home}/${report}.xml" tofile="${results}/xml/${report}_${platform}.xml" failonerror="false" /> |
| <antcall target="genHtml" /> |
| </target> |
| |
| <target name="runperftests"> |
| <antcall target="setupPerformance"/> |
| <antcall target="runtests"> |
| </antcall> |
| </target> |
| |
| |
| <target name="dali-utility-tests" description="Runs the org.eclipse.jst.jpa.utility.tests test.xml"> |
| <antcall target="runtests"> |
| <param name="testPlugin" value="${org.eclipse.jst.jpa.utility.tests}" /> |
| <param name="report" value="org.eclipse.jst.jpa.utility.tests" /> |
| </antcall> |
| </target> |
| |
| <target name="dali-core-tests" description="Runs the org.eclipse.jst.jpa.core.tests test.xml"> |
| <antcall target="runtests"> |
| <param name="testPlugin" value="${org.eclipse.jst.jpa.core.tests}" /> |
| <param name="report" value="org.eclipse.jst.jpa.core.tests" /> |
| </antcall> |
| </target> |
| |
| |
| <target name="all" depends="init"> |
| <echo message="Starting Dali Unit Tests"/> |
| |
| <echo message="Starting dali-utility-tests"/> |
| <antcall target="dali-utility-tests" /> |
| |
| <echo message="Starting dali-core-tests"/> |
| <antcall target="dali-core-tests" /> |
| |
| <echo message="Ended Dali Unit Tests"/> |
| </target> |
| |
| |
| <target name="setupPerformance"> |
| <delete dir="${perfDir}"/> |
| <mkdir dir="${perfDir}"/> |
| <ant antfile="buildAll.xml" dir="${build.home}/org.eclipse.wtp.releng" target="getPreReq"/> |
| <ant antfile="buildAll.xml" dir="${build.home}/org.eclipse.wtp.releng" target="setupTestEclipse"> |
| <property name="testDir" value="${perfDir}"/> |
| </ant> |
| <ant antfile="buildAll.xml" dir="${build.home}/org.eclipse.wtp.releng" target="setupPerformance"/> |
| </target> |
| |
| <target name="performance" depends="init"> |
| <!-- |
| <antcall target="all"> |
| <param name="runAsPerfApp" value="true"/> |
| </antcall> |
| --> |
| <antcall target="wst-common-perfTests"/> |
| <antcall target="wst-wsdl-perfTests"/> |
| <antcall target="wst-server-perfTests" /> |
| <antcall target="jst-server-tomcat-perfTests" /> |
| <antcall target="jst-jsp-perfTests" /> |
| <antcall target="wst-xml-perfTests" /> |
| <antcall target="wst-html-perfTests" /> |
| <antcall target="wst-css-perfTests" /> |
| <antcall target="jst-ws-perfTests"/> |
| <antcall target="wst-xsd-perfTests"/> |
| <antcall target="jst-j2ee-perfTests"/> |
| <!-- |
| <antcall target="genPerfGraphs" /> |
| --> |
| </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="genPerfGraphs" description="Generates performance graphs"> |
| <condition property="osWindows" value="true"> |
| <os family="windows" /> |
| </condition> |
| <condition property="java.library.path" value="${eclipseBuilderDirectory}/swt-win32"> |
| <os family="windows" /> |
| </condition> |
| <condition property="swt.library.path" value="${eclipseBuilderDirectory}/swt-linux-motif"> |
| <os family="unix" /> |
| </condition> |
| <antcall target="genPerfGraphsWindows"/> |
| <antcall target="genPerfGraphsLinux"/> |
| </target> |
| |
| <target name="genPerfGraphsWindows" if="osWindows"> |
| <java classname="org.eclipse.test.performance.ui.Main" fork="true" maxmemory="256m"> |
| <arg line="-baseline ${perf.ref.buildId} -current ${perf.buildId} -jvm ${perf.jvm} -config ${perf.config} -config.properties ${perf.config},${perf.config},${perf.config},${results}/graph/${perf.config} -output ${results}/graph"/> |
| <classpath> |
| <fileset dir="${eclipseBuilderDirectory}/plugins"> |
| <exclude name="**/*swt.motif*.jar"/> |
| <exclude name="**/*swt.gtk*.jar"/> |
| <include name="**/*.jar"/> |
| </fileset> |
| <fileset dir="${build.home}/${cloudscapeLib}"> |
| <include name="**/*.jar"/> |
| </fileset> |
| </classpath> |
| <env key="LD_LIBRARY_PATH" value="${eclipseBuilderDirectory}/swt-win32"/> |
| <sysproperty key="PLUGIN_PATH" value="${eclipseBuilderDirectory}/plugins/org.eclipse.test.performance.ui"/> |
| <sysproperty key="eclipse.perf.dbloc" value="${build.home}/${perf.dbloc}"/> |
| <sysproperty key="java.library.path" value="${eclipseBuilderDirectory}/swt-win32"/> |
| </java> |
| </target> |
| |
| <target name="genPerfGraphsLinux" unless="osWindows"> |
| <java classname="org.eclipse.test.performance.ui.Main" fork="true" maxmemory="256m"> |
| <arg line="-baseline ${perf.ref.buildId} -current ${perf.buildId} -jvm ${perf.jvm} -config ${perf.config} -config.properties ${perf.config},${perf.config},${perf.config},${results}/graph/${perf.config} -output ${results}/graph"/> |
| <classpath> |
| <fileset dir="${eclipseBuilderDirectory}/plugins"> |
| <exclude name="**/*swt.win32*.jar"/> |
| <include name="**/*.jar"/> |
| </fileset> |
| <fileset dir="${build.home}/${cloudscapeLib}"> |
| <include name="**/*.jar"/> |
| </fileset> |
| </classpath> |
| <env key="LD_LIBRARY_PATH" value="${eclipseBuilderDirectory}/swt-linux-motif"/> |
| <sysproperty key="PLUGIN_PATH" value="${eclipseBuilderDirectory}/plugins/org.eclipse.test.performance.ui"/> |
| <sysproperty key="eclipse.perf.dbloc" value="${build.home}/${perf.dbloc}"/> |
| <sysproperty key="java.library.path" value="${eclipseBuilderDirectory}/swt-linux-motif"/> |
| </java> |
| </target> |
| |
| </project> |