blob: 42fedc2f738040f4dcd3025803ed9f2e70d8e05a [file] [log] [blame]
<project default="run" basedir=".">
<property file="buildAll.properties"/>
<property file="builddates.properties"/>
<property file="../../releng/maps/build.cfg"/>
<path id="monitor.classpath">
<fileset dir="../tools/monitor">
<include name="*.jar" />
</fileset>
</path>
<taskdef name="wtp-monitor" classname="org.eclipse.wtp.releng.monitor.BuildMonitor" classpathref="monitor.classpath" />
<target name="init">
<property name="buildDirectory" value="${build.home}/${build.current}-${buildType}/${build.directory}" />
<property name="baseLocation" value="${build.home}/${build.current}-${buildType}/${base.location}" />
<property name="testDir" value="${build.home}/${build.tests}-${buildType}" />
<property name="perfDir" value="${build.home}/${build.perf.tests}-${buildType}" />
<property name="bootclasspath" value="${java.home}/lib/rt.jar${path.separator}${java.home}/lib/jsse.jar" />
<condition property="isEclipseFileTarGz" value="true">
<equals arg1="${baseos}" arg2="linux" />
</condition>
<condition property="eclipseURL" value="${eclipseURL.linux}">
<equals arg1="${baseos}" arg2="linux" />
</condition>
<condition property="eclipseURL" value="${eclipseURL.win32}">
<equals arg1="${baseos}" arg2="win32" />
</condition>
<condition property="eclipseFile" value="${eclipseFile.linux}">
<equals arg1="${baseos}" arg2="linux" />
</condition>
<condition property="eclipseFile" value="${eclipseFile.win32}">
<equals arg1="${baseos}" arg2="win32" />
</condition>
<mkdir dir="${buildDirectory}" />
<mkdir dir="${build.home}/${build.drivers}"/>
<available file="${build.home}/${build.current}-${buildType}/${base.location}/startup.jar" property="eclipse.exists"/>
<antcall target="getPreReq" />
<antcall target="unzipEclipse" />
<available file="${buildDirectory}/label.properties" property="label.properties.exists"/>
<antcall target="create.label.properties"/>
<property file="${buildDirectory}/label.properties"/>
<condition property="ftppush">
<and>
<isset property="ftpUser"/>
<isset property="ftpPassword"/>
<not>
<isset property="nopush"/>
</not>
</and>
</condition>
</target>
<target name="unzipEclipse" unless="eclipse.exists">
<antcall target="unzipEclipseSDK" />
<antcall target="untarEclipseSDK" />
<unzip dest="${build.home}/${build.current}-${buildType}" src="${build.home}/${build.drivers}/${emfFile}" overwrite="true" />
<unzip dest="${build.home}/${build.current}-${buildType}" src="${build.home}/${build.drivers}/${gefFile}" overwrite="true" />
<unzip dest="${build.home}/${build.current}-${buildType}" src="${build.home}/${build.drivers}/${jemFile}" overwrite="true" />
<unzip dest="${build.home}/${build.current}-${buildType}" src="${build.home}/${build.drivers}/${junitFile}" overwrite="true" />
</target>
<target name="unzipEclipseSDK" unless="isEclipseFileTarGz">
<unzip dest="${build.home}/${build.current}-${buildType}" src="${build.home}/${build.drivers}/${eclipseFile}" overwrite="true" />
</target>
<target name="untarEclipseSDK" if="isEclipseFileTarGz">
<untar dest="${build.home}/${build.current}-${buildType}" src="${build.home}/${build.drivers}/${eclipseFile}" compression="gzip" overwrite="true" />
</target>
<target name="create.label.properties" unless="label.properties.exists">
<mkdir dir="${buildDirectory}" />
<tstamp/>
<property name="date" value="${DSTAMP}" />
<property name="time" value="${TSTAMP}" />
<property name="timestamp" value="${date}${time}" />
<property name="buildType" value="I" />
<property name="buildId" value="${buildType}${date}" />
<!--this naming convention used by php scripts on download server-->
<property name="buildLabel" value="${buildType}-${buildId}-${timestamp}" />
<!--store the build label information in a file-->
<echo file="${buildDirectory}/label.properties" append="true" >
buildType=${buildType}
</echo>
<echo file="${buildDirectory}/label.properties" append="true" >
buildId=${buildId}
</echo>
<echo file="${buildDirectory}/label.properties" append="true" >
timestamp=${timestamp}
</echo>
<echo file="${buildDirectory}/label.properties" append="true" >
buildLabel=${buildLabel}
</echo>
<echo file="${buildDirectory}/label.properties" append="true" >
date=${date}
</echo>
<echo file="${buildDirectory}/label.properties" append="true" >
time=${time}
</echo>
</target>
<target name="run" depends="init">
<antcall target="runAll"/>
<antcall target="cleanUp"/>
</target>
<target name="runAll" depends="init">
<antcall target="buildAll"/>
<!--
<antcall target="checkpii"/>
-->
<!-- first push -->
<antcall target="publish"/>
<antcall target="notify">
<param name="monitor.template.file" value="../webpages/templateFiles/monitor-compile.php.template"/>
</antcall>
<antcall target="push"/>
<antcall target="test"/>
<antcall target="checkInternalReference"/>
<!--
<antcall target="eclipsePerf"/>
-->
<!-- after the tests push -->
<antcall target="publish"/>
<antcall target="notify" >
<param name="monitor.template.file" value="../webpages/templateFiles/monitor-tests.php.template"/>
</antcall>
<antcall target="push"/>
<!--
<antcall target="performance"/>
-->
<!-- after the tests push -->
<antcall target="publish"/>
<antcall target="notify" >
<param name="monitor.template.file" value="../webpages/templateFiles/monitor-all.php.template"/>
</antcall>
<antcall target="push"/>
</target>
<target name="publishPush" depends="init">
<antcall target="publish"/>
<!--
<antcall target="cvsrlog"/>
-->
<antcall target="push"/>
</target>
<target name="build" depends="init">
<antcall target="buildAll"/>
<!--
<antcall target="checkpii"/>
-->
<antcall target="test"/>
<antcall target="checkInternalReference"/>
<!--
<antcall target="eclipsePerf"/>
<antcall target="performance"/>
-->
<antcall target="publish"/>
<!--
<antcall target="cvsrlog"/>
-->
<antcall target="cleanUp"/>
</target>
<target name="buildAll" depends="init">
<!-- Third party content -->
<antcall target="getThirdPartyContent">
<param name="pluginsDir" value="${buildDirectory}/plugins"/>
</antcall>
<ant antfile="build.xml" target="main">
<property name="component" value="releng"/>
</ant>
<!-- WST TARGETS -->
<ant antfile="build.xml" target="main">
<property name="component" value="wst"/>
</ant>
<ant antfile="build.xml" target="main">
<property name="component" value="wst-sdk"/>
</ant>
<ant antfile="build.xml" target="main">
<property name="component" value="wst.tests"/>
</ant>
<ant antfile="build.xml" target="main">
<property name="component" value="wst.perf.tests"/>
</ant>
<!-- JST TARGETS -->
<ant antfile="build.xml" target="main">
<property name="component" value="jst"/>
</ant>
<ant antfile="build.xml" target="main">
<property name="component" value="jst-sdk"/>
</ant>
<ant antfile="build.xml" target="main">
<property name="component" value="jst.tests"/>
</ant>
<ant antfile="build.xml" target="main">
<property name="component" value="jst.perf.tests"/>
</ant>
</target>
<target name="getThirdPartyContent">
</target>
<target name="checkPreReq" >
<available file="${build.home}/${build.drivers}/${eclipseFile}" property="eclipsefile.exists"/>
<available file="${build.home}/${build.drivers}/${emfFile}" property="emf.exists"/>
<available file="${build.home}/${build.drivers}/${gefFile}" property="gef.exists"/>
<available file="${build.home}/${build.drivers}/${jemFile}" property="jem.exists"/>
<available file="${build.home}/${build.drivers}/${junitFile}" property="testFrameWork.exists"/>
<available file="${build.home}/${build.drivers}/${tomcat50File}" property="tomcat50.exists"/>
<available file="${build.home}/${build.drivers}/${jonas432File}" property="jonas432.exists"/>
</target>
<target name="getPreReq" >
<available file="${build.home}/${build.drivers}/${eclipseFile}" property="eclipsefile.exists"/>
<available file="${build.home}/${build.drivers}/${emfFile}" property="emf.exists"/>
<available file="${build.home}/${build.drivers}/${gefFile}" property="gef.exists"/>
<available file="${build.home}/${build.drivers}/${jemFile}" property="jem.exists"/>
<available file="${build.home}/${build.drivers}/${junitFile}" property="testFrameWork.exists"/>
<available file="${build.home}/${build.drivers}/${tomcat50File}" property="tomcat50.exists"/>
<available file="${build.home}/${build.drivers}/${jonas432File}" property="jonas432.exists"/>
<antcall target="getEclipse" />
<antcall target="getEmf" />
<antcall target="getGef" />
<antcall target="getJem" />
<antcall target="getTestFrameWork" />
<antcall target="getTomcat50" />
<antcall target="getJOnAS432" />
</target>
<target name="getEclipse" unless="eclipsefile.exists" >
<get src="${eclipseURL}" dest="${build.home}/${build.drivers}/${eclipseFile}" />
</target>
<target name="getEmf" unless="emf.exists">
<get src="${emfURL}" dest="${build.home}/${build.drivers}/${emfFile}" />
</target>
<target name="getGef" unless="gef.exists">
<get src="${gefURL}" dest="${build.home}/${build.drivers}/${gefFile}" />
</target>
<target name="getJem" unless="jem.exists">
<get src="${jemURL}" dest="${build.home}/${build.drivers}/${jemFile}" />
</target>
<target name="getTestFrameWork" unless="testFrameWork.exists" >
<get src="${junitFileBuildURL}" dest="${build.home}/${build.drivers}/${junitFile}" />
</target>
<target name="getTomcat50" unless="tomcat50.exists" >
<get src="${tomcat50URL}" dest="${build.home}/${build.drivers}/${tomcat50File}" />
</target>
<target name="getJOnAS432" unless="jonas432.exists" >
<get src="${jonas432URL}" dest="${build.home}/${build.drivers}/${jonas432File}" />
</target>
<target name="getTomcat413" unless="tomcat413.exists" >
<get src="${tomcat413URL}" dest="${build.home}/${build.drivers}/${tomcat413File}" />
</target>
<target name="getAxis11" unless="axis11.exists" >
<get src="${axis11URL}" dest="${build.home}/${build.drivers}/${axis11File}" />
</target>
<target name="getSoap231" unless="soap231.exists" >
<get src="${soap231URL}" dest="${build.home}/${build.drivers}/${soap231File}" />
</target>
<target name="getWsil4j" unless="wsil4j.exists" >
<get src="${wsil4jURL}" dest="${build.home}/${build.drivers}/${wsil4jFile}" />
</target>
<target name="getUDDI4j" unless="uddi4j.exists" >
<get src="${uddi4jURL}" dest="${build.home}/${build.drivers}/${uddi4jFile}" />
</target>
<target name="getWSDL4j" unless="wsdl4j.exists" >
<get src="${wsdl4jURL}" dest="${build.home}/${build.drivers}/${wsdl4jFile}" />
</target>
<target name="getJavaMail" unless="javamail.exists" >
<get src="${javaMailURL}" dest="${build.home}/${build.drivers}/${javaMailFile}" />
</target>
<target name="getJAF" unless="jaf.exists" >
<get src="${jafURL}" dest="${build.home}/${build.drivers}/${jafFile}" />
</target>
<target name="cleanUp" if="clean" >
<!-- keep a local copy -->
<move todir="${build.home}/${local.publish}/${buildLabel}" failonerror="false" includeemptydirs="true" overwrite="true">
<fileset dir="${buildDirectory}/${buildLabel}"/>
</move>
<delete dir="${buildDirectory}" failonerror="false"/>
<delete dir="${build.home}/${build.current}-${buildType}" failonerror="false"/>
<delete dir="${testDir}" failonerror="false"/>
<delete dir="${perfDir}" failonerror="false"/>
</target>
<target name="setupTestEclipse">
<mkdir dir="${testDir}" />
<mkdir dir="${testDir}/results" />
<mkdir dir="${testDir}/results/consolelogs" />
<copy todir="${testDir}" overwrite="true">
<fileset dir="../scripts/testScripts">
</fileset>
</copy>
<copy file="buildAll.properties" tofile="${testDir}/buildAll.properties" overwrite="true"/>
<copy file="../../releng/maps/build.cfg" tofile="${testDir}/build.cfg" overwrite="true"/>
<available file="${testDir}/eclipse/startup.jar" property="test.eclipse.exists"/>
<antcall target="unzipTestEclipse" />
</target>
<target name="unzipTestEclipse" unless="test.eclipse.exists">
<antcall target="unzipTestEclipseSDK" />
<antcall target="untarTestEclipseSDK" />
<unzip dest="${testDir}" src="${build.home}/${build.drivers}/${emfFile}" overwrite="true" />
<unzip dest="${testDir}" src="${build.home}/${build.drivers}/${gefFile}" overwrite="true" />
<unzip dest="${testDir}" src="${build.home}/${build.drivers}/${jemFile}" overwrite="true" />
<unzip dest="${testDir}" src="${build.home}/${build.drivers}/${junitFile}" overwrite="true" />
<unzip dest="${testDir}" src="${build.home}/${build.drivers}/${tomcat50File}" overwrite="true" />
<untar dest="${testDir}" src="${build.home}/${build.drivers}/${jonas432File}" compression="gzip" overwrite="true" />
<condition property="oagis80.exists" value="true">
<and>
<available file="${build.home}/${build.drivers}/${oagis80Release}" property="oagis80.release.exists"/>
<available file="${build.home}/${build.drivers}/${oagis80WSDL}" property="oagis80.wsdl.exists"/>
</and>
</condition>
<antcall target="unzipOAGIS80Files"/>
</target>
<target name="unzipTestEclipseSDK" unless="isEclipseFileTarGz">
<unzip dest="${testDir}" src="${build.home}/${build.drivers}/${eclipseFile}" overwrite="true" />
</target>
<target name="untarTestEclipseSDK" if="isEclipseFileTarGz">
<untar dest="${testDir}" src="${build.home}/${build.drivers}/${eclipseFile}" compression="gzip" overwrite="true" />
</target>
<target name="unzipOAGIS80Files" if="oagis80.exists">
<unzip dest="${testDir}" src="${build.home}/${build.drivers}/${oagis80Release}" overwrite="true" />
<unzip dest="${testDir}" src="${build.home}/${build.drivers}/${oagis80WSDL}" overwrite="true" />
</target>
<target name="runTestEclipse">
<java classpath="${testDir}/eclipse/startup.jar"
fork="true"
classname="org.eclipse.core.launcher.Main"
failonerror="true"
timeout="3600000"
output="${testDir}/results/consolelogs/wtptestlog.txt"
dir="${testDir}">
<jvmarg value="-Dosgi.ws=${basews}"/>
<jvmarg value="-Dosgi.os=${baseos}"/>
<jvmarg value="-Dosgi.arch=${basearch}"/>
<jvmarg value="-Dws=${basews}"/>
<jvmarg value="-Dos=${baseos}"/>
<jvmarg value="-Darch=${basearch}"/>
<jvmarg value="-Dnoclean=true"/>
<jvmarg value="-Dwtp.quite=true"/>
<arg value="-propertyfile" />
<arg value="test.properties" />
<arg value="-application"/>
<arg value="org.eclipse.ant.core.antRunner"/>
<arg value="-file"/>
<arg value="test.xml"/>
<arg value="-logger"/>
<arg value="org.apache.tools.ant.DefaultLogger"/>
<arg value="${testTarget}"/>
<sysproperty key="build.home" value="${build.home}"/>
<sysproperty key="wtp.quiet" value="true"/>
<sysproperty key="buildDirectory" value="${buildDirectory}"/>
<sysproperty key="baseLocation" value="${baseLocation}"/>
<sysproperty key="testDir" value="${testDir}"/>
<sysproperty key="perf.buildId" value="${buildType}${date}-${time}"/>
<sysproperty key="eclipseBuilderDirectory" value="${build.home}/${eclipse.builder}"/>
<sysproperty key="cloudscapeLib" value="${cloudscapeLib}"/>
</java>
</target>
<target name="postRunTestEclipse">
<copy todir="${buildDirectory}/${buildLabel}/testResults" overwrite="true">
<fileset dir="${testDir}/results">
<include name="**/*.*" />
</fileset>
</copy>
</target>
<target name="setupPerformance">
<available file="${buildDirectory}/${buildLabel}" property="buildLabel.exists"/>
<antcall target="unzipPerfPlugins"/>
<antcall target="setupCloudscape"/>
</target>
<target name="unzipPerfPlugins">
<property name="buildLabel" value="${buildType}-${buildId}-${timestamp}"/>
<mkdir dir="${buildDirectory}/${buildLabel}"/>
<available file="${buildDirectory}/${buildLabel}/wtp-${buildId}.zip" property="wtp.zip.exists"/>
<available file="${buildDirectory}/${buildLabel}/wtp-wst-Automated-Tests-${buildId}.zip" property="wst.test.zip.exists"/>
<available file="${buildDirectory}/${buildLabel}/wtp-jst-Automated-Tests-${buildId}.zip" property="jst.test.zip.exists"/>
<available file="${buildDirectory}/${buildLabel}/wtp-wst-perf-Tests-${buildId}.zip" property="wst.perf.zip.exists"/>
<available file="${buildDirectory}/${buildLabel}/wtp-jst-perf-Tests-${buildId}.zip" property="jst.perf.zip.exists"/>
<antcall target="getWtpZip"/>
<antcall target="getWstTestZip"/>
<antcall target="getJstTestZip"/>
<antcall target="getWstPerfZip"/>
<antcall target="getJstPerfZip"/>
<unzip dest="${perfDir}" src="${buildDirectory}/${buildLabel}/wtp-${buildId}.zip" overwrite="true" />
<unzip dest="${perfDir}" src="${buildDirectory}/${buildLabel}/wtp-wst-Automated-Tests-${buildId}.zip" overwrite="true" />
<unzip dest="${perfDir}" src="${buildDirectory}/${buildLabel}/wtp-jst-Automated-Tests-${buildId}.zip" overwrite="true" />
<unzip dest="${perfDir}" src="${buildDirectory}/${buildLabel}/wtp-wst-perf-Tests-${buildId}.zip" overwrite="true" />
<unzip dest="${perfDir}" src="${buildDirectory}/${buildLabel}/wtp-jst-perf-Tests-${buildId}.zip" overwrite="true" />
</target>
<target name="getWtpZip" unless="wtp.zip.exists">
<get src="${webtoolsDownloadURL}/${buildLabel}/wtp-${buildId}.zip" dest="${buildDirectory}/${buildLabel}/wtp-${buildId}.zip" />
</target>
<target name="getWstTestZip" unless="wst.test.zip.exists" >
<get src="${webtoolsDownloadURL}/${buildLabel}/wtp-wst-Automated-Tests-${buildId}.zip" dest="${buildDirectory}/${buildLabel}/wtp-wst-Automated-Tests-${buildId}.zip" />
</target>
<target name="getJstTestZip" unless="jst.test.zip.exists" >
<get src="${webtoolsDownloadURL}/${buildLabel}/wtp-jst-Automated-Tests-${buildId}.zip" dest="${buildDirectory}/${buildLabel}/wtp-jst-Automated-Tests-${buildId}.zip" />
</target>
<target name="getWstPerfZip" unless="wst.perf.zip.exists" >
<get src="${webtoolsDownloadURL}/${buildLabel}/wtp-wst-perf-Tests-${buildId}.zip" dest="${buildDirectory}/${buildLabel}/wtp-wst-perf-Tests-${buildId}.zip" />
</target>
<target name="getJstPerfZip" unless="jst.perf.zip.exists" >
<get src="${webtoolsDownloadURL}/${buildLabel}/wtp-jst-perf-Tests-${buildId}.zip" dest="${buildDirectory}/${buildLabel}/wtp-jst-perf-Tests-${buildId}.zip" />
</target>
<target name="getEclipseAutomatedTestsFile" unless="eclipseAutomatedTestsFile.exists" >
<get src="${eclipseAutomatedTestsURL}" dest="${build.home}/${build.drivers}/${eclipseAutomatedTestsFile}" />
</target>
<target name="setupCloudscape">
<property name="cloudscapePlugin" value="${perfDir}/eclipse/plugins/Cloudscape"/>
<mkdir dir="${cloudscapePlugin}"/>
<copy todir="${cloudscapePlugin}" overwrite="true">
<fileset dir="${build.home}/${cloudscapeLib}">
<include name="**/*.jar"/>
</fileset>
</copy>
<copy tofile="${cloudscapePlugin}/plugin.xml" file="templateFiles/cloudscapeplugin.xml.template" overwrite="true"/>
<replace dir="${perfDir}/eclipse/plugins" value="&lt;import plugin=&quot;Cloudscape&quot;/&gt;">
<include name="org.eclipse.test.performance_*/plugin.xml"/>
<replacetoken><![CDATA[<import plugin="Cloudscape" optional="true"/>]]></replacetoken>
</replace>
</target>
<target name="eclipsePerf" depends="init">
<property name="perf.dbloc" value="${build.home}/eclipse-perf-db"/>
<property name="perf.config" value="wtpbuild"/>
<property name="perf.jvm" value="sun"/>
<property name="perf.db" value="-Declipse.perf.dbloc=${perf.dbloc}"/>
<property name="perf.config.base" value="-Declipse.perf.config=config=${perf.config};build=${buildType}${date}-0000;jvm=${perf.jvm}"/>
<property name="perf.config.wtp" value="-Declipse.perf.config=config=${perf.config};build=${buildType}${date}-${time};jvm=${perf.jvm}"/>
<property name="perf.assert" value="-Declipse.perf.assertAgainst=config=${perf.config};build=${buildType}${date}-0000;jvm=${perf.jvm}"/>
<available file="${build.home}/${build.drivers}/${eclipseAutomatedTestsFile}" property="eclipseAutomatedTestsFile.exists"/>
<antcall target="getEclipseAutomatedTestsFile"/>
<antcall target="eclipsePerf.wtp"/>
<antcall target="eclipsePerf.eclipse"/>
</target>
<target name="eclipsePerf.wtp" if="use.wtp">
<delete dir="${build.home}/${build.perf.tests}" failonerror="false"/>
<mkdir dir="${build.home}/${build.perf.tests}"/>
<unzip dest="${build.home}/${build.perf.tests}" src="${build.home}/${build.drivers}/${eclipseAutomatedTestsFile}" overwrite="true"/>
<unzip dest="${build.home}/${build.perf.tests}/eclipse-testing/test-eclipse" overwrite="true">
<fileset dir="${build.home}/${build.perf.tests}/eclipse-testing">
<include name="*.zip"/>
</fileset>
</unzip>
<antcall target="getPreReq"/>
<antcall target="setupTestEclipse">
<param name="testDir" value="${build.home}/${build.perf.tests}/eclipse-testing/test-eclipse"/>
</antcall>
<mkdir dir="${buildDirectory}/${buildLabel}"/>
<available file="${buildDirectory}/${buildLabel}/wtp-${buildId}.zip" property="wtp.zip.exists"/>
<antcall target="getWtpZip"/>
<unzip dest="${build.home}/${build.perf.tests}/eclipse-testing/test-eclipse" src="${buildDirectory}/${buildLabel}/wtp-${buildId}.zip" overwrite="true" />
<antcall target="setupCloudscape">
<param name="perfDir" value="${build.home}/${build.perf.tests}/eclipse-testing/test-eclipse"/>
</antcall>
<copy file="eclipsePerf.xml" todir="${build.home}/${build.perf.tests}/eclipse-testing"/>
<ant antfile="${build.home}/${build.perf.tests}/eclipse-testing/eclipsePerf.xml" dir="${build.home}/${build.perf.tests}/eclipse-testing">
<property name="os" value="${baseos}"/>
<property name="ws" value="${basews}"/>
<property name="arch" value="${basearch}"/>
<property name="test.target" value="performance"/>
<property name="performance.target.present" value="true"/>
<property name="extraVMargs" value="${perf.db} ${perf.config.wtp} ${perf.assert}"/>
</ant>
<!-- Generate performance graphs -->
<mkdir dir="${buildDirectory}/${buildLabel}/eclipsePerfResults"/>
<ant antfile="testScripts/test.xml" target="genPerfGraphs">
<property name="eclipseBuilderDirectory" value="${build.home}/${eclipse.builder}"/>
<property name="perf.ref.buildId" value="${buildType}${date}-0000"/>
<property name="buildId" value="${buildType}${date}-${time}"/>
<property name="results" value="${buildDirectory}/${buildLabel}/eclipsePerfResults"/>
</ant>
</target>
<target name="eclipsePerf.eclipse" unless="use.wtp">
<delete dir="${build.home}/${build.perf.tests}" failonerror="false"/>
<mkdir dir="${build.home}/${build.perf.tests}"/>
<unzip dest="${build.home}/${build.perf.tests}" src="${build.home}/${build.drivers}/${eclipseAutomatedTestsFile}" overwrite="true"/>
<unzip dest="${build.home}/${build.perf.tests}/eclipse-testing/test-eclipse" overwrite="true">
<fileset dir="${build.home}/${build.perf.tests}/eclipse-testing">
<include name="*.zip"/>
</fileset>
</unzip>
<antcall target="eclipsePerfWin"/>
<antcall target="eclipsePerfLinux"/>
<antcall target="setupCloudscape">
<param name="perfDir" value="${build.home}/${build.perf.tests}/eclipse-testing/test-eclipse"/>
</antcall>
<copy file="eclipsePerf.xml" todir="${build.home}/${build.perf.tests}/eclipse-testing"/>
<ant antfile="${build.home}/${build.perf.tests}/eclipse-testing/eclipsePerf.xml" dir="${build.home}/${build.perf.tests}/eclipse-testing">
<property name="os" value="${baseos}"/>
<property name="ws" value="${basews}"/>
<property name="arch" value="${basearch}"/>
<property name="test.target" value="performance"/>
<property name="performance.target.present" value="true"/>
<property name="extraVMargs" value="${perf.db} ${perf.config.base} ${perf.assert}"/>
</ant>
</target>
<target name="eclipsePerfWin" unless="isEclipseFileTarGz">
<unzip dest="${build.home}/${build.perf.tests}/eclipse-testing/test-eclipse" src="${build.home}/${build.drivers}/${eclipseFile}" overwrite="true"/>
</target>
<target name="eclipsePerfLinux" if="isEclipseFileTarGz">
<untar dest="${build.home}/${build.perf.tests}/eclipse-testing/test-eclipse" src="${build.home}/${build.drivers}/${eclipseFile}" compression="gzip" overwrite="true"/>
</target>
<target name="performance" depends="init">
<ant antfile="testScripts/test.xml" target="performance">
<property file="testScripts/test.properties"/>
<property name="eclipse-home" value="${perfDir}/eclipse"/>
<property name="testDir" value="${perfDir}"/>
<property name="perf.buildId" value="${buildType}${date}-${time}"/>
<property name="eclipseBuilderDirectory" value="${build.home}/${eclipse.builder}"/>
<property name="os" value="${baseos}"/>
<property name="ws" value="${basews}"/>
<property name="arch" value="${basearch}"/>
</ant>
</target>
<!--
<target name="performance" depends="init">
<delete dir="${perfDir}"/>
<mkdir dir="${perfDir}"/>
<antcall target="getPreReq"/>
<antcall target="setupTestEclipse">
<param name="testDir" value="${perfDir}"/>
</antcall>
<antcall target="setupPerformance"/>
<antcall target="getThirdPartyContent">
<param name="pluginsDir" value="${perfDir}/eclipse/plugins"/>
</antcall>
<antcall target="runTestEclipse">
<param name="testTarget" value="performance"/>
<param name="testDir" value="${perfDir}"/>
<param name="testResults" value="perfResults"/>
</antcall>
<available property="global.php.exists" file="${perfDir}/results/graph/global.php"/>
<antcall target="global.addon"/>
<mkdir dir="${buildDirectory}/${buildLabel}/perf"/>
<copy todir="${buildDirectory}/${buildLabel}/perf" overwrite="true">
<fileset dir="${perfDir}">
<include name="results/**/*.*" />
</fileset>
</copy>
</target>
-->
<target name="global.addon" if="global.php.exists">
<loadfile property="global.addon.content" srcFile="../webpages/templateFiles/performance.template"/>
<replace dir="${perfDir}/results/graph" value="${global.addon.content}">
<include name="global.php"/>
<replacetoken><![CDATA[</html>]]></replacetoken>
</replace>
</target>
<target name="test" depends="init">
<antcall target="setupTestEclipse"/>
<unzip dest="${testDir}" src="${buildDirectory}/${buildLabel}/wtp-${buildId}.zip" overwrite="true" />
<unzip dest="${testDir}" src="${buildDirectory}/${buildLabel}/wtp-wst-Automated-Tests-${buildId}.zip" overwrite="true" />
<unzip dest="${testDir}" src="${buildDirectory}/${buildLabel}/wtp-jst-Automated-Tests-${buildId}.zip" overwrite="true" />
<!-- Third party content -->
<antcall target="getThirdPartyContent">
<param name="pluginsDir" value="${testDir}/eclipse/plugins"/>
</antcall>
<antcall target="runTestEclipse">
<param name="testTarget" value="all"/>
</antcall>
<antcall target="postRunTestEclipse">
<param name="testTarget" value="all"/>
</antcall>
</target>
<target name="checkpii">
<property name="piiDir" value="${buildDirectory}/piitools"/>
<property name="pii.core" value="releng.builder/tools/piitools/org.eclipse.wtp.releng.tools.pii.core"/>
<property name="piiOutputDir" value="${buildDirectory}/${buildLabel}/piitools"/>
<cvs
cvsRoot=":${cvsProtocol}:${cvsUser}@${cvsServer}:${cvsRoot}"
package="${pii.core}"
dest="${piiDir}"
command="export"
tag="HEAD"
/>
<mkdir dir="${piiDir}/${pii.core}/bin"/>
<javac
srcdir="${piiDir}/${pii.core}/src"
destdir="${piiDir}/${pii.core}/bin"
fork="true">
</javac>
<java classname="org.eclipse.wtp.releng.tools.pii.internal.KeyUtils" fork="true">
<arg line="${buildDirectory}/plugins ${piiOutputDir}/unused build.properties javadoc.properties" />
<classpath>
<pathelement path="${piiDir}/${pii.core}/bin"/>
</classpath>
</java>
</target>
<target name="preCheckAPI" if="piagent_filter_txt.exists">
<condition property="piAgentURL" value="${piAgentURL.linux}">
<equals arg1="${baseos}" arg2="linux" />
</condition>
<condition property="piAgentURL" value="${piAgentURL.win32}">
<equals arg1="${baseos}" arg2="win32" />
</condition>
<condition property="piAgentFile" value="${piAgentFile.linux}">
<equals arg1="${baseos}" arg2="linux" />
</condition>
<condition property="piAgentFile" value="${piAgentFile.win32}">
<equals arg1="${baseos}" arg2="win32" />
</condition>
<condition property="os.linux">
<equals arg1="${baseos}" arg2="linux" />
</condition>
<condition property="os.win32">
<equals arg1="${baseos}" arg2="win32" />
</condition>
<available file="${build.home}/${build.drivers}/${piAgentFile}" property="piAgent.exists"/>
<antcall target="getPIAgent"/>
<antcall target="runPIAgentLinux"/>
<antcall target="runPIAgentWin32"/>
<antcall target="runPIAgent"/>
</target>
<target name="getPIAgent" unless="piAgent.exists">
<get src="${piAgentURL}" dest="${build.home}/${build.drivers}/${piAgentFile}"/>
</target>
<target name="runPIAgentLinux" if="os.linux">
<unzip dest="${apitoolsDir}" src="${build.home}/${build.drivers}/${piAgentFile}" overwrite="true">
<patternset>
<include name="**/*.so"/>
</patternset>
</unzip>
<move todir="${apitoolsDir}" flatten="true">
<fileset dir="${apitoolsDir}/lib"/>
</move>
</target>
<target name="runPIAgentWin32" if="os.win32">
<unzip dest="${apitoolsDir}" src="${build.home}/${build.drivers}/${piAgentFile}" overwrite="true">
<patternset>
<include name="**/*.dll"/>
</patternset>
</unzip>
<move todir="${apitoolsDir}" flatten="true">
<fileset dir="${apitoolsDir}/bin"/>
</move>
</target>
<target name="runPIAgent">
<antcall target="setupTestEclipse"/>
<unzip dest="${testDir}" src="${buildDirectory}/${buildLabel}/wtp-${buildId}.zip" overwrite="true" />
<unzip dest="${testDir}" src="${buildDirectory}/${buildLabel}/wtp-wst-Automated-Tests-${buildId}.zip" overwrite="true" />
<unzip dest="${testDir}" src="${buildDirectory}/${buildLabel}/wtp-jst-Automated-Tests-${buildId}.zip" overwrite="true" />
<property name="piAgentOutputDir" value="${apitoolsDir}/piagentoutput"/>
<mkdir dir="${piAgentOutputDir}"/>
<property name="LD_LIBRARY_PATH" value="${apitoolsDir}"/>
<property name="java.library.path" value="${apitoolsDir}"/>
<antcall target="runPIAgent2">
<param name="output" value="${piAgentOutputDir}/j2ee.output1.trcxml"/>
<param name="testPluginName" value="org.eclipse.jst.j2ee.core.tests"/>
<param name="className" value="org.eclipse.jst.j2ee.core.tests.bvt.AutomatedBVT"/>
<param name="extraVMargs" value="-DXmx700M"/>
</antcall>
<antcall target="runPIAgent2">
<param name="output" value="${piAgentOutputDir}/j2ee.output2.trcxml"/>
<param name="testPluginName" value="org.eclipse.jst.j2ee.core.tests"/>
<param name="className" value="org.eclipse.jst.j2ee.core.api.test.AutomatedAPIBVT"/>
<param name="extraVMargs" value="-DXmx700M"/>
</antcall>
<antcall target="runPIAgent2">
<param name="output" value="${piAgentOutputDir}/j2ee.output3.trcxml"/>
<param name="testPluginName" value="org.eclipse.jst.j2ee.tests"/>
<param name="className" value="org.eclipse.jst.j2ee.core.tests.bvt.AutomatedBVT"/>
<param name="extraVMargs" value="-Dorg.eclipse.jst.server.jonas.432=${testDir}/JONAS_4_3_2"/>
</antcall>
</target>
<target name="runPIAgent2">
<delete dir="${apitoolsDir}/workspace"/>
<exec dir="${apitoolsDir}" executable="java">
<env key="LD_LIBRARY_PATH" value="${LD_LIBRARY_PATH}"/>
<env key="java.library.path" value="${java.library.path}"/>
<arg line="-cp ${testDir}/eclipse/startup.jar -XrunpiAgent:server=standalone,profile=${apitoolsDir}/${component.core}/apiagent/piagent_options.txt,filters=${apitoolsDir}/${component.core}/apiagent/piagent_filters.txt,file=${output} -Xmx512M ${extraVMargs} org.eclipse.core.launcher.Main -application org.eclipse.test.coretestapplication -data ${apitoolsDir}/workspace -testPluginName ${testPluginName} -className ${className} -os ${baseos} -ws ${basews} -arch ${basearch}"/>
</exec>
</target>
<target name="checkInternalReference">
<property name="apitoolsDir" value="${buildDirectory}/apitools"/>
<property name="apiProgressDir" value="releng.builder/tools/apitools/api_progress/1.0"/>
<property name="apiFinalDir" value="releng.builder/tools/apitools/api_progress/1.0_Final"/>
<property name="component.xml" value="releng.builder/tools/apitools/components"/>
<property name="component.core" value="releng.builder/tools/apitools/org.eclipse.wtp.releng.tools.component.core"/>
<mkdir dir="${apitoolsDir}"/>
<cvs
cvsRoot=":${cvsProtocol}:${cvsUser}@${cvsServer}:${cvsRoot}"
package="${apiProgressDir}"
dest="${apitoolsDir}"
command="export"
tag="HEAD"
/>
<cvs
cvsRoot=":${cvsProtocol}:${cvsUser}@${cvsServer}:${cvsRoot}"
package="${apiFinalDir}"
dest="${apitoolsDir}"
command="export"
tag="HEAD"
/>
<!--
<cvs
cvsRoot=":${cvsProtocol}:${cvsUser}@${cvsServer}:${cvsRoot}"
package="${component.xml}"
dest="${apitoolsDir}"
command="export"
tag="HEAD"
/>
-->
<cvs
cvsRoot=":${cvsProtocol}:${cvsUser}@${cvsServer}:${cvsRoot}"
package="${component.core}"
dest="${apitoolsDir}"
command="export"
tag="HEAD"
/>
<mkdir dir="${apitoolsDir}/${component.core}/bin" />
<javac
srcdir="${apitoolsDir}/${component.core}/src"
destdir="${apitoolsDir}/${component.core}/bin"
fork="true">
<classpath>
<fileset dir="${baseLocation}/plugins">
<include name="**/*.jar" />
</fileset>
</classpath>
</javac>
<copy todir="${apitoolsDir}/${component.core}/bin" overwrite="true">
<fileset dir="${apitoolsDir}/${component.core}/src">
<exclude name="**/*.java" />
</fileset>
</copy>
<jar
destfile="${apitoolsDir}/${component.core}/componentcore.jar"
basedir="${apitoolsDir}/${component.core}/bin"
/>
<property name="piagent_filter_txt" value="${apitoolsDir}/${component.core}/apiagent/piagent_filters.txt"/>
<antcall target="runAPIToolsEmitter">
<param name="emitterClass" value="org.eclipse.wtp.releng.tools.component.piagent.PIAgentFiltersEmitter"/>
<param name="args" value="-eclipseDirs ${buildDirectory}/plugins -compXMLDirs ${buildDirectory}/plugins -outputFile ${piagent_filter_txt} -includes org.eclipse.jst.j2ee."/>
</antcall>
<available file="${piagent_filter_txt}" property="piagent_filter_txt.exists"/>
<!--
<antcall target="preCheckAPI"/>
-->
<unzip src="${buildDirectory}/${buildLabel}/wtp-${buildId}.zip" dest="${apitoolsDir}/base"/>
<unzip src="${buildDirectory}/${buildLabel}/wtp-wst-Automated-Tests-${buildId}.zip" dest="${apitoolsDir}/test"/>
<unzip src="${buildDirectory}/${buildLabel}/wtp-jst-Automated-Tests-${buildId}.zip" dest="${apitoolsDir}/test"/>
<mkdir dir="${apitoolsDir}/${component.xml}"/>
<antcall target="runAPIToolsEmitter">
<param name="emitterClass" value="org.eclipse.wtp.releng.tools.component.model.ComponentEmitter"/>
<param name="args" value="-eclipseDir ${baseLocation}/plugins -compXMLDir ${apitoolsDir}/${component.xml}"/>
</antcall>
<antcall target="runAPIToolsEmitter">
<param name="emitterClass" value="org.eclipse.wtp.releng.tools.component.violation.ComponentViolationEmitter"/>
<param name="args" value="-eclipseDir ${apitoolsDir}/base/eclipse/plugins -compXMLDir ${buildDirectory}/plugins -compRefDir ${apitoolsDir}/${component.xml} -compVioDir ${buildDirectory}/${buildLabel}/apitools -include org.eclipse. -exclude org.eclipse.wst. org.eclipse.jst. -genHTML -genUsage -debug"/>
</antcall>
<antcall target="runAPIToolsEmitter">
<param name="emitterClass" value="org.eclipse.wtp.releng.tools.component.violation.ComponentViolationEmitter"/>
<param name="args" value="-eclipseDir ${apitoolsDir}/base/eclipse/plugins -compXMLDir ${buildDirectory}/plugins -compRefDir ${apitoolsDir}/${component.xml} -compVioDir ${buildDirectory}/${buildLabel}/apitools2 -include org.eclipse.wst. org.eclipse.jst. -genHTML -genUsage -debug"/>
</antcall>
<antcall target="runAPIToolsEmitter">
<param name="emitterClass" value="org.eclipse.wtp.releng.tools.component.violation.ComponentViolationEmitter"/>
<param name="args" value="-eclipseDir ${apitoolsDir}/base/eclipse/plugins -compXMLDir ${buildDirectory}/plugins -compRefDir ${apitoolsDir}/${component.xml} -compVioDir ${buildDirectory}/${buildLabel}/apitools3 -include org.eclipse.wst. org.eclipse.jst. -exclude *.internal.provisional.* -genHTML -genUsage -debug"/>
</antcall>
<tstamp/>
<antcall target="runAPIToolsEmitter">
<param name="emitterClass" value="org.eclipse.wtp.releng.tools.component.api.testcoverage.APITestCoverageEmitter"/>
<param name="args" value="-eclipseDir ${apitoolsDir}/base/eclipse/plugins -testDir ${apitoolsDir}/test -compXMLDir ${buildDirectory}/plugins -compAPIDir ${buildDirectory}/${buildLabel}/apitools -timestamp ${DSTAMP} -apiAgentOutput ${buildDirectory}/apitools/piagentoutput -genHTML -genAPI"/>
</antcall>
<antcall target="runAPIToolsEmitter">
<param name="emitterClass" value="org.eclipse.wtp.releng.tools.component.api.usecoverage.APIUseCoverageEmitter"/>
<param name="args" value="-eclipseDir ${apitoolsDir}/base/eclipse/plugins -testDir ${apitoolsDir}/base/eclipse/plugins -compXMLDir ${buildDirectory}/plugins -compAPIDir ${buildDirectory}/${buildLabel}/apitools -genHTML"/>
</antcall>
<copy todir="${build.home}/${build.current}-${buildType}/eclipse/plugins/org.eclipse.wtp.releng.tools.component.core" overwrite="true">
<fileset dir="${apitoolsDir}/${component.core}"/>
</copy>
<java classpath="${build.home}/${build.current}-${buildType}/eclipse/startup.jar"
fork="true"
classname="org.eclipse.core.launcher.Main"
failonerror="false"
dir="${build.home}/${build.current}-${buildType}">
<jvmarg value="-Dosgi.ws=${basews}"/>
<jvmarg value="-Dosgi.os=${baseos}"/>
<jvmarg value="-Dosgi.arch=${basearch}"/>
<jvmarg value="-Dws=${basews}"/>
<jvmarg value="-Dos=${baseos}"/>
<jvmarg value="-Darch=${basearch}"/>
<jvmarg value="-Dnoclean=true"/>
<arg value="-application"/>
<arg value="org.eclipse.wtp.releng.tools.component.core.JavadocCoverageEmitter"/>
<sysproperty key="compXMLDir" value="${buildDirectory}/plugins"/>
<sysproperty key="compAPIDir" value="${buildDirectory}/${buildLabel}/apitools"/>
<sysproperty key="srcDir" value="${buildDirectory}/plugins"/>
<sysproperty key="outputDir" value="${buildDirectory}/${buildLabel}/apitools"/>
</java>
<delete dir="${build.home}/${build.current}-${buildType}/eclipse/plugins/org.eclipse.wtp.releng.tools.component.core"/>
<antcall target="runAPIToolsEmitter">
<param name="emitterClass" value="org.eclipse.wtp.releng.tools.component.api.compatibility.APICompatibilityEmitter"/>
<param name="args" value="-currAPIIndex ${buildDirectory}/${buildLabel}/apitools/index-comp-summary.xml -refAPIIndex ${apitoolsDir}/${apiFinalDir}/index-comp-summary.xml -outputDir ${buildDirectory}/${buildLabel}/apitools -genHTML"/>
</antcall>
<antcall target="runAPIToolsEmitter">
<param name="emitterClass" value="org.eclipse.wtp.releng.tools.component.api.progress.APIProgressEmitter"/>
<param name="args" value="-compIndex ${buildDirectory}/${buildLabel}/apitools/index-comp-summary.xml -refCompIndexDir ${apitoolsDir}/${apiProgressDir} -eclipseDir ${apitoolsDir}/base/eclipse/plugins -compXMLDir ${buildDirectory}/plugins -outputDir ${buildDirectory}/${buildLabel}/apitools"/>
</antcall>
<antcall target="runAPIToolsEmitter">
<param name="emitterClass" value="org.eclipse.wtp.releng.tools.component.api.violation.ComponentAPIViolationEmitter"/>
<param name="args" value="-compXMLDirs ${buildDirectory}/plugins -compXMLRefDirs ${apitoolsDir}/${component.xml} -eclipseDirs ${apitoolsDir}/base/eclipse/plugins -includes org.eclipse. -outputDir ${buildDirectory}/${buildLabel}/apitools"/>
</antcall>
<mkdir dir="${buildDirectory}/${buildLabel}/apitools/componentxmls"/>
<copy todir="${buildDirectory}/${buildLabel}/apitools/componentxmls" overwrite="true">
<fileset dir="${buildDirectory}/plugins">
<include name="**/component.xml"/>
</fileset>
</copy>
</target>
<target name="runAPIToolsEmitter">
<java classname="${emitterClass}" fork="true" maxmemory="256m">
<arg line="${args}" />
<classpath>
<pathelement path="${apitoolsDir}/${component.core}/bin"/>
<fileset dir="${baseLocation}/plugins">
<include name="**/*.jar" />
</fileset>
</classpath>
</java>
</target>
<target name="getInternalReference" unless="internalReference.exists" >
<get src="${internalRefToolURL}" dest="${build.home}/${build.drivers}/${internalRefToolFile}" />
</target>
<target name="publish" depends="init">
<property name="publish.xml" value="./publish.xml" />
<property name="indexFileName" value="index.php" />
<property name="result" value="${buildDirectory}/${buildLabel}" />
<condition property="clearWstArchives" value="true" >
<equals arg1="${buildType}" arg2="N" />
</condition>
<condition property="indexTemplateFilename" value="index.html.N.template" >
<equals arg1="${buildType}" arg2="N" />
</condition>
<condition property="indexTemplateFilename" value="index.html.template" >
<or>
<equals arg1="${buildType}" arg2="I" />
<equals arg1="${buildType}" arg2="S" />
<equals arg1="${buildType}" arg2="R" />
<equals arg1="${buildType}" arg2="M" />
</or>
</condition>
<antcall target="clearWST" />
<ant antfile="${publish.xml}" dir="${basedir}">
<property name="dropTokenList" value="%wtpruntime%,%wtpsdk%,%wst%,%wst-sdk%,%wst-tests%,%jst-tests%,%wst-perf-tests%,%jst-perf-tests%" />
<property name="isBuildTested" value="false" />
<property name="indexTemplateFilename" value="${indexTemplateFilename}" />
</ant>
<!-- Get the build map over for the results to point to. -->
<copy file="${buildDirectory}/directory.txt" tofile="${result}/directory.txt"/>
<checksum >
<fileset dir="${result}">
<include name="*.zip"/>
</fileset>
</checksum>
</target>
<target name="clearWST" if="clearWstArchives">
<delete>
<fileset dir="${buildDirectory}/${buildLabel}">
<include name="wtp-wst-${buildId}.zip"/>
<include name="wtp-wst-${buildId}.zip.MD5"/>
<include name="wtp-wst-sdk-${buildId}.zip"/>
<include name="wtp-wst-sdk-${buildId}.zip.MD5"/>
</fileset>
</delete>
</target>
<target name="cvsrlog" depends="init">
<property name="rlog.xml" value="./rlog.xml" />
<property name="rlog.home" value="../tools/cvstools/org.eclipse.wtp.releng.cvs.tools" />
<property name="rlog.log.dir" value="${buildDirectory}/${buildLabel}/rlogxml" />
<property name="rlog.html.dir" value="${buildDirectory}/${buildLabel}/rloghtml" />
<property name="buildType" value="${buildType}" />
<property name="cvsRoot" value="${cvsRoot}" />
<property name="cvsServer" value="${cvsServer}" />
<property name="cvsProtocol" value="${cvsProtocol}" />
<property name="cvsUser" value="${cvsUser}" />
<ant antfile="${rlog.xml}" dir="${basedir}">
<property name="rlog.home" value="${rlog.home}" />
<property name="rlog.log.dir" value="${rlog.log.dir}" />
<property name="rlog.html.dir" value="${rlog.html.dir}" />
</ant>
</target>
<target name="push" depends="init,pushftp">
</target>
<target name="pushftp" if="ftppush">
<property name="remoteDirectory" value="${ftpRemoteDirectory}"/>
<echo message="FTP to: ${remoteDirectory}/${buildLabel}"/>
<exec executable="rsync">
<arg line="-e ssh -Cavz ${buildDirectory}/${buildLabel} ${ftpUser}@${ftpServer}:${remoteDirectory}" />
</exec>
</target>
<!-- =================================
target: notify
================================= -->
<target name="notify" depends="init" description="wtp monitor">
<wtp-monitor
hostname="127.0.0.1"
sender="buildmaster@lomboz.org"
recipients="wtp-releng@eclipse.org"
prefix="[wtp-build]"
buildLabel="${buildLabel}"
dropTokenList="%wst%,%jst%,%wstsdk%,%jstsdk%"
xmlDirectoryName="${buildDirectory}/${buildLabel}/testResults/xml"
testResultsTemplateFileName="${monitor.template.file}"
compileLogsDirectoryName="${buildDirectory}/${buildLabel}/compilelogs"
testManifestFileName="${basedir}/../components/testManifest.xml"
/>
</target>
</project>