diff --git a/releng.wtpbuilder/scripts/standaloneTest/standalonePerfTest.xml b/releng.wtpbuilder/scripts/standaloneTest/standalonePerfTest.xml index a095e4d9c15bd52a9c37440b64bc615d021747d3..10e96fa3ddaae7bb24d44feff443f89076769ada 100644 --- a/releng.wtpbuilder/scripts/standaloneTest/standalonePerfTest.xml +++ b/releng.wtpbuilder/scripts/standaloneTest/standalonePerfTest.xml @@ -8,10 +8,11 @@ <!-- Let users override standard properties, if desired. If directory, file, or some properties do not exist, then standard properties will be used. --> - <echo message="LOCAL_BUILD_PROPERTIES_DIR: ${env.LOCAL_BUILD_PROPERTIES_DIR}"/> - - - <property file="${env.LOCAL_BUILD_PROPERTIES_DIR}/${ant.project.name}.properties"/> + <property + name="wtp.builder.home" + value="${env.PROJECT_BUILDERS}/${projectname}/${env.RELENG_BUILDER}"/> + <property + file="${env.LOCAL_BUILD_PROPERTIES_DIR}/${ant.project.name}.properties"/> <fail unless="projectname" message="a projectname is required"/> @@ -33,7 +34,9 @@ <property name="testRoot" value="${env.PROJECT_TESTS}/${projectname}"/> - + <property + name="dependencyFileLocation" + value="helios/dependencies.properties"/> <property name="build.distribution" value="wtp"/> @@ -41,8 +44,6 @@ <property name="buildDirectory" value="${env.PROJECT_PROJECTS}/${projectName}/workdir"/> - - <!-- <property name="dependency.properties" value="${buildDirectory}/maps/${env.RELENG}/${dependencyFileLocation}"/> --> <property name="dependency.properties" value="${env.PROJECT_BUILDERS}/${projectname}/${env.RELENG}/${dependencyFileLocation}"/> @@ -53,19 +54,36 @@ message="dependency file not found: ${dependency.properties}" unless="dependency.properties.exists"/> <target name="standalonePerfTest"> - <property file="${build.home}/${env.RELENG_BUILDER}/build.properties"/> + <property + file="${build.home}/${env.RELENG_BUILDER}/build.properties"/> <property name="local.cache.dir" value="${env.LOCAL_PREREQS_CACHE}"/> <property - name="testRoot" - value="${build.home}/testRoot/"/> - <!-- don't delete automatically <delete quiet="true" dir="${testRoot}" - failonerror="false"/> --> - <mkdir dir="${testRoot}"/> - - - <condition property="installed"> + name="wtp.id" + value="${buildType}-${buildId}-${timestamp}"/> + <property + name="wtp.dir.id" + value="${build.stream}/${wtp.id}"/> + <property + name="getprereq.wtp" + value="true"/> + <property + name="getprereq.wtptests" + value="true"/> + <property + name="test.installed" + value="true"/> + <property + name="doNotPublishEarly" + value="true"/> + <mkdir + dir="${env.RECOMMENDED_TMP_DIR}"/> + <mkdir + dir="${testRoot}"/> + + <condition + property="installed"> <available file="${testRoot}/eclipse" type="dir"/> @@ -75,127 +93,90 @@ <echo message="installed location: ${testRoot}/eclipse"/> <antcall target="run"/> + <antcall target="getEclipseTestDependencies"/> + <antcall target="runEclipsePerfTests"/> </target> - <target name="getReleng"> - <property - name="releng.tag" - value="v${buildType}${timestamp}"/> - <mkdir dir="${env.PROJECT_BUILDERS}/${projectname}"/> - <cvs - cvsRoot=":pserver:anonymous@dev.eclipse.org:/cvsroot/webtools" - package="${env.RELENG}" - dest="${env.PROJECT_BUILDERS}/${projectname}" - command="export" - tag="${releng.tag}" - reallyquiet="${env.CVS_REALLY_QUIET}"/> - </target> + <target - name="getDependencies" - unless="installed"> + name="run"> <ant - antfile="${env.PROJECT_BUILDERS}/${projectname}/${env.RELENG_BUILDER}/distribution/${build.distribution}.tests/testdependency.xml"> + antfile="${wtp.builder.home}/distribution/${build.distribution}.tests/perfbuild.xml"> + <property + name="testRoot" + value="${testRoot}"/> + <!-- if not otherwise set, assume all tests + Not needed anymore + <property + name="testTarget" + value="all"/>--> <property name="base.install.dir" value="${testRoot}"/> <property name="dependencyTargets" - value="${env.PROJECT_BUILDERS}/${projectname}/${env.RELENG_BUILDER}/scripts/dependency/build.xml"/> + value="${wtp.builder.home}/scripts/dependency/build.xml"/> </ant> - - <antcall target="getAndInstallWTP"> - <param - name="file" - value="wtp-sdk-${buildType}-${buildId}-${timestamp}.zip"/> - </antcall> - <antcall target="getAndInstallWTP"> - <param - name="file" - value="wtp-tests-${buildType}-${buildId}-${timestamp}.zip"/> - </antcall> - + <copy + file="${wtp.builder.home}/distribution/${build.distribution}.tests/templateFiles/index.php" + todir="${testRoot}/results" + overwrite="true"/> </target> - <target name="getAndInstallWTP"> - <available - file="${local.cache.dir}/${file}" - property="file.exists"/> - <antcall target="getWTP"/> + + <target + name="runEclipsePerfTests"> + <!--set which tests are to be run. This can be a single test suite as well (specified by calling runtest -onePerfSuite) --> + <property + name="testBundle" + value="all"/> + <exec dir="${testRoot}" executable="cmd"> + <env key="JAVA_6_HOME" value="${env.JAVA_6_HOME}"/> + <env key="JAVA_HOME" value="${env.JAVA_HOME}"/> + <arg line="/c runEclipsePerfTests.bat -os ${env.BASEOS} -ws ${env.BASEWS} -arch ${env.BASEARCH} ${testBundle}"/> + </exec> + </target> + + <target + name="getEclipseTestDependencies"> + <property + file="${dependency.properties}"/> + <property name="eAT.url" value="${eclipse.url}"/> + <property name="eAT" value="eclipse-Automated-Tests-${wtp.eclipse.build.id}.zip"/> + <available - file="${local.cache.dir}/${file}" - property="file.exists"/> - <antcall target="installWTP"/> - </target> - <target name="getWTP"> - <condition - property="file.url.1" - value="http://build.eclipse.org/webtools/committers/${projectname}/${timestamp}" - else="http://download.eclipse.org/webtools/downloads"> - <isset property="build.committers"/> - </condition> - <condition - property="file.url" - value="${file.url.1}/drops/${build.stream}/${buildType}-${buildId}-${timestamp}" - else="${file.url.1}/drops/${buildType}-${buildId}-${timestamp}"> - <isset property="build.stream"/> - </condition> - <antcall target="getWTP2"/> + file="${local.cache.dir}/${eAT}" + property="eAT.exists"/> + + <antcall target="getEclipseAutomatedTests"/> + + <available + file="${local.cache.dir}/${eAT}" + property="eAT.exists"/> + + <antcall target="installEclipseAutomatedTests"/> + </target> + <target - name="getWTP2" - unless="file.exists"> - <property - name="file.url" - value="http://download.eclipse.org/webtools/downloads/drops/${build.stream}/${buildType}-${buildId}-${timestamp}"/> + name="getEclipseAutomatedTests" + unless="eAT.exists"> <get - dest="${local.cache.dir}/${file}" - src="${file.url}/${file}" + dest="${local.cache.dir}/${eAT}" + src="${eAT.url}/${eAT}" ignoreerrors="true"/> </target> <target - name="installWTP" - if="file.exists"> - <unzip - src="${local.cache.dir}/${file}" - dest="${testRoot}${dropinsFolder}" - overwrite="true"/> - </target> - <target - name="run" - depends="getDependencies"> - <mkdir dir="${testRoot}/results/consolelogs"/> - <mkdir dir="${testRoot}/results/xml"/> - <copy - todir="${testRoot}" - flatten="true" - overwrite="true"> - <fileset - dir="${env.PROJECT_BUILDERS}/${projectname}/${env.RELENG_BUILDER}/distribution/${build.distribution}.tests/testScripts"/> - </copy> - <ant - antfile="${env.PROJECT_BUILDERS}/${projectname}/${env.RELENG_BUILDER}/distribution/${build.distribution}.tests/perfbuild.xml" - target="runTestEclipse"> - <property - name="testRoot" - value="${testRoot}"/> - <!-- if not otherwise set, assume all tests --> - <property - name="testTarget" - value="all"/> - </ant> - <copy - file="${env.PROJECT_BUILDERS}/${projectname}/${env.RELENG_BUILDER}/distribution/${build.distribution}.tests/templateFiles/index.php" - todir="${testRoot}/results" - overwrite="true"/> - </target> - <target - name="clean" - if="clean"> - <property file="${env.PROJECT_BUILDERS}/${projectname}/${env.RELENG_BUILDER}/build.properties"/> - <property - name="testRoot" - value="${build.home}/testRoot"/> - <delete - quiet="true" - dir="${testRoot}" - failonerror="false"/> - </target> + name="installEclipseAutomatedTests" + if="eAT.exists"> + <!--this extracts the eclipse Automated Tests zip and then the eclipse test framework will install everything correctly.--> + <exec dir="." executable="unzip"> + <arg line="-o -qq ${local.cache.dir}/${eAT} -d ${testRoot}"/> + </exec> + <copy todir="${testRoot}"> + <fileset dir="${testRoot}/eclipse-testing"/> + </copy> + <copy file="${wtp.builder.home}/scripts/standaloneTest/runEclipsePerfTests.bat" todir="${testRoot}" overwrite="true"/> + <copy file="${wtp.builder.home}/scripts/standaloneTest/eclipsePerfTests.xml" todir="${testRoot}" overwrite="true" /> + <delete dir="${testRoot}/eclipse-testing" /> + </target> + </project> \ No newline at end of file