blob: 5ff006ef9fd58202de01d25540a13557c1b70e44 [file] [log] [blame]
<project default="main" basedir=".">
<!--
Required inputs:
build.home
releng.tag
buildType
buildId
date
time
wtp.dir [optional]
perf.target [optional]
-->
<target name="main">
<property file="${build.home}/releng.wtpbuilder/build.properties"/>
<property name="wtp.perf" value="${build.home}/releng.wtpbuilder/distribution/wtp.perf"/>
<property name="perfRoot" value="${wtp.perf}/perfRoot"/>
<mkdir dir="${perfRoot}"/>
<antcall target="getReleng"/>
<property file="${perfRoot}/releng/maps/dependencies.properties"/>
<antcall target="run"/>
<delete dir="${perfRoot}"/>
</target>
<target name="getReleng">
<cvs
cvsRoot=":pserver:anonymous@dev.eclipse.org:/home/webtools"
package="releng"
dest="${perfRoot}"
command="export"
tag="${releng.tag}"
/>
</target>
<target name="setup">
<delete dir="${perfRoot}/eclipse"/>
<property name="local.cache.dir" value="${build.home}/${build.local.repository}"/>
<property name="install.destination" value="${perfRoot}"/>
<mkdir dir="${local.cache.dir}"/>
<mkdir dir="${install.destination}"/>
<antcall target="getAndInstall">
<param name="groupId" value="eclipse" />
<param name="clean" value="true" />
</antcall>
<antcall target="getAndInstall">
<param name="groupId" value="eclipseTestFramework" />
<param name="clean" value="true" />
</antcall>
<antcall target="getAndInstall">
<param name="groupId" value="emf" />
<param name="clean" value="true" />
</antcall>
<antcall target="getAndInstall">
<param name="groupId" value="gef" />
<param name="clean" value="true" />
</antcall>
<antcall target="getAndInstall">
<param name="groupId" value="jem" />
<param name="clean" value="true" />
</antcall>
<antcall target="getAndInstall">
<param name="groupId" value="tomcat.5" />
</antcall>
<antcall target="getAndInstall">
<param name="groupId" value="tomcat.4" />
</antcall>
<antcall target="getAndInstall">
<param name="groupId" value="jonas.4" />
</antcall>
<antcall target="getAndInstall">
<param name="groupId" value="oagis.release" />
</antcall>
<antcall target="getAndInstall">
<param name="groupId" value="oagis.wsdl" />
</antcall>
<antcall target="getAndInstall">
<param name="groupId" value="derby" />
</antcall>
<antcall target="getAndInstallWTP">
<param name="file" value="wtp-${buildId}.zip" />
</antcall>
<antcall target="getAndInstallWTP">
<param name="file" value="wtp-wst-Automated-Tests-${buildId}.zip" />
</antcall>
<antcall target="getAndInstallWTP">
<param name="file" value="wtp-jst-Automated-Tests-${buildId}.zip" />
</antcall>
<antcall target="getAndInstallWTP">
<param name="file" value="wtp-wst-perf-Tests-${buildId}.zip" />
</antcall>
<antcall target="getAndInstallWTP">
<param name="file" value="wtp-jst-perf-Tests-${buildId}.zip" />
</antcall>
<antcall target="setup.derby"/>
<copy file="${wtp.perf}/performance-tests.xml" tofile="${perfRoot}/performance-tests.xml"></copy>
</target>
<target name="getAndInstall">
<property name="dependencyTargets" value="${build.home}/releng.wtpbuilder/scripts/dependency/build.xml"/>
<ant antfile="${dependencyTargets}" target="checkDependency">
<property name="groupId" value="${groupId}" />
</ant>
<ant antfile="${dependencyTargets}" target="installDependency">
<property name="groupId" value="${groupId}" />
</ant>
</target>
<target name="getAndInstallWTP">
<property name="wtp.dir" value="${local.cache.dir}"/>
<available file="${wtp.dir}/${file}" property="file.exists"/>
<antcall target="getWTP"/>
<unzip src="${wtp.dir}/${file}" dest="${install.destination}" overwrite="true"/>
</target>
<target name="getWTP" unless="file.exists">
<mkdir dir="${wtp.dir}"/>
<get dest="${wtp.dir}/${file}" src="http://download.eclipse.org/webtools/downloads/drops/${buildType}-${buildId}-${date}${time}/${file}"/>
</target>
<target name="setup.derby">
<property name="derby" value="${install.destination}/eclipse/plugins/org.apache.derby"/>
<mkdir dir="${derby}"/>
<copy todir="${derby}" overwrite="true">
<fileset dir="${perfRoot}/incubating-derby-10.0.2.1-bin/lib">
<include name="**/*.jar"/>
</fileset>
</copy>
<copy tofile="${derby}/plugin.xml" file="${wtp.perf}/derby.plugin.xml.template" overwrite="true"/>
<replace dir="${perfRoot}/eclipse/plugins" value="&lt;import plugin=&quot;org.apache.derby&quot;/&gt;">
<include name="org.eclipse.test.performance_*/plugin.xml"/>
<replacetoken><![CDATA[<import plugin="org.apache.derby" optional="true"/>]]></replacetoken>
</replace>
</target>
<target name="run">
<condition property="baseos" value="linux">
<os family="unix"/>
</condition>
<condition property="basews" value="gtk">
<os family="unix"/>
</condition>
<condition property="basearch" value="x86">
<os family="unix"/>
</condition>
<condition property="baseos" value="win32">
<os family="windows"/>
</condition>
<condition property="basews" value="win32">
<os family="windows"/>
</condition>
<condition property="basearch" value="x86">
<os family="windows"/>
</condition>
<property name="perf.target" value="main"/>
<ant antfile="${wtp.perf}/perf.xml" target="${perf.target}">
<property file="${wtp.perf}/perf.properties"/>
<property name="eclipse-home" value="${perfRoot}/eclipse"/>
<property name="perf.buildId" value="${buildType}${date}-${time}"/>
<property name="os" value="${baseos}"/>
<property name="ws" value="${basews}"/>
<property name="arch" value="${basearch}"/>
<property name="testDir" value="${perfRoot}"/>
<property name="testDownloadDir" value="${perfRoot}"/>
</ant>
<property file="${wtp.perf}/perf.properties"/>
<mkdir dir="${build.home}/${perf.dbloc}/${buildType}-${buildId}-${date}${time}"/>
<copy todir="${build.home}/${perf.dbloc}/${buildType}-${buildId}-${date}${time}">
<fileset dir="${perfRoot}/results">
<include name="**/*"/>
</fileset>
</copy>
</target>
</project>