blob: c14d7b9c9735059b56a1e4c1bbcd6e42ce5fd181 [file]
<!--
Copyright (c) 2010, 2019 IBM Corporation and others.
This program and the accompanying materials
are made available under the terms of the Eclipse Public License 2.0
which accompanies this distribution, and is available at
https://www.eclipse.org/legal/epl-2.0/
SPDX-License-Identifier: EPL-2.0
Contributors:
IBM Corporation - initial API and implementation
-->
<project
name="standalonePerfTest"
default="standalonePerfTest"
basedir=".">
<!-- Required inputs: build.home buildType buildId timestamp build.stream
[optional] build.committers [optional] testTarget [optional] -->
<property environment="env"/>
<!-- Let users override standard properties, if desired. If directory, file,
or some properties do not exist, then standard properties will be used. -->
<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"/>
<property
name="keyCfgFile"
value="${env.PROJECT_BUILDERS}/${projectname}/${env.RELENG}/maps/build.cfg"/>
<property
name="build.home"
value="${env.BUILD_HOME}"/>
<echo
level="info"
message="keyCfgFile: ${keyCfgFile}"/>
<!-- required to get proper value of dropinsFolder -->
<property file="${keyCfgFile}"/>
<fail
message="testRoot must be set for this task"
unless="env.PROJECT_TESTS"/>
<property
name="testRoot"
value="${env.PROJECT_TESTS}/${projectname}"/>
<property
name="dependencyFileLocation"
value="helios/dependencies.properties"/>
<property
name="build.distribution"
value="wtp"/>
<property
name="buildDirectory"
value="${env.PROJECT_PROJECTS}/${projectName}/workdir"/>
<property
name="dependency.properties"
value="${env.PROJECT_BUILDERS}/${projectname}/${env.RELENG}/${dependencyFileLocation}"/>
<available
file="${dependency.properties}"
property="dependency.properties.exists"/>
<fail
message="dependency file not found: ${dependency.properties}"
unless="dependency.properties.exists"/>
<target name="standalonePerfTest">
<property
file="${build.home}/${env.RELENG_BUILDER}/build.properties"/>
<property
name="local.cache.dir"
value="${env.LOCAL_PREREQS_CACHE}"/>
<property
name="wtp.id"
value="${buildType}-${buildId}-${timestamp}"/>
<property
name="wtp.dir.id"
value="${build.stream}/${wtp.id}"/>
<property file="${dependency.properties}"/>
<condition property="eclipse.id" value="${wtp.eclipse.build.id}">
<isset property="wtp.eclipse.build.id"/>
</condition>
<property
name="wtptests.repo"
value="wtp-tests-repo-${wtptests.id}.zip"/>
<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"/>
</condition>
<echo message="installed: ${installed}"/>
<echo message="installed location: ${testRoot}/eclipse"/>
<antcall target="run"/>
<antcall target="getEclipseTestDependencies"/>
<antcall target="runEclipsePerfTests"/>
</target>
<target
name="run">
<ant
antfile="${wtp.builder.home}/distribution/${build.distribution}.tests/perfbuild.xml">
<property
name="testRoot"
value="${testRoot}"/>
<property
name="base.install.dir"
value="${testRoot}"/>
<property
name="dependencyTargets"
value="${wtp.builder.home}/scripts/dependency/build.xml"/>
</ant>
<copy
file="${wtp.builder.home}/distribution/${build.distribution}.tests/templateFiles/index.php"
todir="${testRoot}/results"
overwrite="true"/>
</target>
<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}"/>
<env key="ECLIPSE_ID" value="${eclipse.id}"/>
<arg line="/c runEclipsePerfTests.bat -os ${env.BASEOS} -ws ${env.BASEWS} -arch ${env.BASEARCH} ${testBundle}"/>
</exec>
</target>
<target
name="getEclipseTestDependencies">
<property name="eAT.url" value="${eclipse.url}"/>
<property name="eAT" value="eclipse-Automated-Tests-${eclipse.id}.zip"/>
<available
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="getEclipseAutomatedTests"
unless="eAT.exists">
<get
dest="${local.cache.dir}/${eAT}"
src="${eAT.url}/${eAT}"
ignoreerrors="true"/>
</target>
<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>