Skip to content
Snippets Groups Projects
Commit b676cc54 authored by david_williams's avatar david_williams
Browse files

303564 - Run performance tests against the WTP

parent a41bf308
No related branches found
No related tags found
No related merge requests found
<project <project
name="Build specific targets and properties" name="Build specific targets and properties"
default="runTest"> default="runTest">
<!-- <!-- Note to be cross-platform, "environment variables" are only appropriate
Note to be cross-platform, "environment variables" are only for some variables, e.g. ones we set, since properties are case sensitive,
appropriate for some variables, e.g. ones we set, since even if the environment variables on your operating system are not, e.g.
properties are case sensitive, even if the environment variables it will be ${env.Path} not ${env.PATH} on Windows -->
on your operating system are not, e.g. it will be ${env.Path}
not ${env.PATH} on Windows
-->
<property environment="env"/> <property environment="env"/>
<fail <fail
message="testRoot must be set for this task" message="testRoot must be set for this task"
unless="testRoot"/> unless="testRoot"/>
<!-- required to get proper value of dropinsFolder --> <!-- required to get proper value of dropinsFolder -->
<property <property
name="keyCfgFile" name="keyCfgFile"
value="${env.PROJECT_BUILDERS}/${projectname}/${env.RELENG}/maps/build.cfg"/> value="${env.PROJECT_BUILDERS}/${projectname}/${env.RELENG}/maps/build.cfg"/>
...@@ -20,18 +17,13 @@ ...@@ -20,18 +17,13 @@
level="info" level="info"
message="keyCfgFile: ${keyCfgFile}"/> message="keyCfgFile: ${keyCfgFile}"/>
<property file="${keyCfgFile}"/> <property file="${keyCfgFile}"/>
<!-- <!-- typcially already set, but in case of standalone tests, may not be -->
typcially already set, but in case of standalone tests, may not
be
-->
<property <property
name="buildLabel" name="buildLabel"
value="${buildType}-${buildId}-${timestamp}"/> value="${buildType}-${buildId}-${timestamp}"/>
<!-- <!-- Steps to do after the build is done. -->
Steps to do after the build is done.
-->
<target name="test"> <target name="test">
<dirname <dirname
file="${ant.file}" file="${ant.file}"
...@@ -42,9 +34,7 @@ ...@@ -42,9 +34,7 @@
dir="${currentDirectory}"/> dir="${currentDirectory}"/>
</target> </target>
<!-- <!-- Steps to do to test the build results -->
Steps to do to test the build results
-->
<target name="runTest"> <target name="runTest">
<dirname <dirname
file="${ant.file}" file="${ant.file}"
...@@ -57,9 +47,8 @@ ...@@ -57,9 +47,8 @@
unless="testRoot"/> unless="testRoot"/>
<mkdir dir="${testRoot}"/> <mkdir dir="${testRoot}"/>
<!-- if results already exist, delete them --> <!-- if results already exist, delete them -->
<delete <delete
quiet="true"
dir="${testRoot}/results" dir="${testRoot}/results"
failOnError="false"/> failOnError="false"/>
<mkdir dir="${testRoot}/results"/> <mkdir dir="${testRoot}/results"/>
...@@ -80,77 +69,161 @@ ...@@ -80,77 +69,161 @@
<fail <fail
message="dependency file not found: ${dependency.properties}" message="dependency file not found: ${dependency.properties}"
unless="dependency.properties.exists"/> unless="dependency.properties.exists"/>
<property
name="test.dependency"
value="${wtp.builder.home}/scripts/dependency/dependency.xml"/>
<available
file="${test.dependency}"
property="test.dependency.exists"/>
<fail
message="test dependency file not found: ${test.dependency}"
unless="test.dependency.exists"/>
<echo message="test.dependency file: ${test.dependency}"/>
<ant <ant
antfile="${test.component.dir}/testdependency.xml" antfile="${test.dependency}"
target="get"> target="get">
<property <property
name="base.install.dir" name="base.install.dir"
value="${testRoot}"/> value="${testRoot}"/>
<property
name="tobeinstalled.properties"
value="${wtp.builder.home}/distribution/${build.distribution}.tests/tobeInstalled.properties"/>
<property
name="installWorkingDirectory"
value="${testRoot}"/>
</ant> </ant>
<antcall target="unzipTests"/> <echo message="Done setting up WTP"/>
<antcall target="runTestEclipse">
<param <!--We use the eclipse performance framework to run and install tests.
name="testTarget" This is no longer needed but it should stay just in case it is needed later.
value="all"/> <antcall target="installTests"/> <antcall target="runTestEclipse"> <param
</antcall> name="testTarget" value="all"/> </antcall> <antcall target="postRunTestEclipse">
<antcall target="postRunTestEclipse"> <param name="testTarget" value="all"/> </antcall> -->
<param </target>
name="testTarget" <target name="installTests">
value="all"/>
<!-- hard code for now <antcall target="installTestsFromZips"> <param name="compName"
value="patches32x"/> </antcall> -->
<antcall target="installTestsFromRepo">
</antcall> </antcall>
</target> </target>
<target name="unzipTests"> <target
<!-- name="installTestsFromZips"
unzip the builds and junit tests we use 'unzip' here, so we depends="init">
can continue on error, if desired. (such as if zip was not
created, due to other failures or options). <!-- a bit hard coded here, will need work for general case -->
--> <property
<exec name="zipFile"
dir="${buildDirectory}/${buildLabel}" value="${compName}-${buildLabel}.zip"/>
executable="unzip"
failonerror="true">
<arg line="-o -qq wtp-sdk-${buildLabel}.zip -d ${testRoot}${dropinsFolder}"/> <!-- We use the exec method for unzip, so we won't fail if a prereq can
</exec> not be unzipped for some reason. See https://bugs.eclipse.org/bugs/show_bug.cgi?id=283968 -->
<mkdir dir="${install.destination}"/>
<exec <exec
dir="${buildDirectory}/${buildLabel}" dir="."
executable="unzip" executable="unzip">
failonerror="false"> <arg line="-o -qq ${buildDirectory}/${buildLabel}/${zipFile} -d ${install.destination}/${compName}"/>
<arg line="-o -qq wtp-wst-Automated-Tests-${buildLabel}.zip -d ${testRoot}${dropinsFolder}"/>
</exec> </exec>
<exec
dir="${buildDirectory}/${buildLabel}" </target>
executable="unzip"
<target name="installTestsFromRepo">
<java
taskname="p2Director Install"
fork="true"
resultProperty="p2DirectorInstallResult"
failonerror="false"
timeout="${testTimeLimit}"
dir="${testRoot}"
jvm="${env.JAVA_6_HOME}/bin/java"
classname="org.eclipse.equinox.launcher.Main">
<classpath>
<fileset dir="${testRoot}/eclipse/plugins">
<include name="org.eclipse.equinox.launcher_*.jar"/>
</fileset>
</classpath>
<jvmarg value="-Djava.io.tmpdir=${env.RECOMMENDED_TMP_DIR}"/>
<jvmarg value="-Dwtp.builder.home=${wtp.builder.home}"/>
<jvmarg value="-Dbuild.distribution=${build.distribution}"/>
<arg value="-nosplash"/>
<arg value="-debug"/>
<arg value="-consolelog"/>
<arg value="-data"/>
<arg value="${testRoot}/p2DirectorInstall"/>
<arg value="-application"/>
<arg value="org.eclipse.equinox.p2.director"/>
<arg value="-destination"/>
<arg value="${testRoot}/eclipse"/>
<arg value="-repository"/>
<arg value="file://${buildDirectory}/${buildLabel}/repository/,file://${buildDirectory}/${buildLabel}/repositoryunittests/"/>
<arg value="-installIU"/>
<arg value="${wtpFeatureIUs},${testFeatureIUs}"/>
<!-- make sure our forked env has a DISPLAY -->
<env
key="DISPLAY"
value="${env.DISPLAY}"/>
<redirector
output="${testRoot}/results/fullOutput.txt"
error="${testRoot}/results/fullErrorLog.txt"/>
</java>
<!-- If the task succeeds, this ouput log won't be that relevent ... (can
be make better in future ... but for now we'll make a copy, just in case
we need it -->
<echo message="p2DirectorInstallResult: ${p2DirectorInstallResult}"/>
<condition property="p2DirectorInstallFailed">
<not>
<equals
arg1="0"
arg2="${p2DirectorInstallResult}"/>
</not>
</condition>
<!-- always copy to test results, even when successful -->
<copy
file="${testRoot}/results/fullOutput.txt"
tofile="${buildDirectory}/${buildLabel}/testResults/p2DirectorInstall.log.txt"
overwrite="false"
failonerror="false"> failonerror="false">
<arg line="-o -qq wtp-jst-Automated-Tests-${buildLabel}.zip -d ${testRoot}${dropinsFolder}"/> </copy>
</exec>
<exec <antcall target="handleFailedInstall"/>
dir="${buildDirectory}/${buildLabel}"
executable="unzip"
</target>
<target
name="handleFailedInstall"
if="p2DirectorInstallFailed">
<!-- copy to direct location, as a signal (to web pages) it failed and
link should be provided -->
<copy
file="${testRoot}/results/fullOutput.txt"
tofile="${buildDirectory}/${buildLabel}/p2DirectorInstall.log.txt"
overwrite="false"
failonerror="false"> failonerror="false">
<arg line="-o -qq wtp-jpt-sdk-${buildLabel}.zip -d ${testRoot}${dropinsFolder}"/> </copy>
</exec>
<exec <fail
dir="${buildDirectory}/${buildLabel}" message="installation of tests failed. See p2DirectorInstall.log.txt."
executable="unzip" if="p2DirectorInstallResult"/>
failonerror="true">
<arg line="-o -qq wtp-jpt-Automated-Tests-${buildLabel}.zip -d ${testRoot}${dropinsFolder}"/>
</exec>
</target> </target>
<!-- <!-- time out may need to be set/adjust for api or performance tests? This
time out may need to be set/adjust for api or performance tests? testTimeLimit is the whole, overall limit on tests. There's a shorter one
This testTimeLimit is the whole, overall limit on tests. There's for individual suites. some common values, of milliseconds to more recognizable
a shorter one for individual suites. some common values, of units: 18000000: 5 hours 14400000: 4 hours 7200000: 2 hours 3600000: 1 hour
milliseconds to more recognizable units: 1800000: 30 minutes 600000: 10 minutes -->
18000000: 5 hours
14400000: 4 hours
7200000: 2 hours
3600000: 1 hour
1800000: 30 minutes
600000: 10 minutes
-->
<property <property
name="testTimeLimit" name="testTimeLimit"
value="36000000"/> value="28800000"/>
<property <property
name="testFailOnError" name="testFailOnError"
value="false"/> value="false"/>
...@@ -160,18 +233,14 @@ ...@@ -160,18 +233,14 @@
<property <property
name="test-vm" name="test-vm"
value="${env.JAVA_6_HOME}/bin/java"/> value="${env.JAVA_6_HOME}/bin/java"/>
<!-- <!-- set path to eclipse folder. If local folder, use '.'; otherwise, use
set path to eclipse folder. If local folder, use '.'; c:\path\to\eclipse or /path/to/eclipse/ -->
otherwise, use c:\path\to\eclipse or /path/to/eclipse/
-->
<property <property
name="eclipse.home" name="eclipse.home"
value="${testRoot}"/> value="${testRoot}"/>
<echo message="testTarget: ${testTarget}"/> <echo message="testTarget: ${testTarget}"/>
<!-- <!-- can not pass in empty values in jvmargs so if not testBundle specified,
can not pass in empty values in jvmargs so if not testBundle we'll pass a junk (unused) value -->
specified, we'll pass a junk (unused) value
-->
<condition <condition
property="testBundleParam" property="testBundleParam"
value="-DtestBundle=${testBundle}" value="-DtestBundle=${testBundle}"
...@@ -179,28 +248,19 @@ ...@@ -179,28 +248,19 @@
<isset property="testBundle"/> <isset property="testBundle"/>
</condition> </condition>
<echo message="Running junits"/> <echo message="Running junits"/>
<!-- <!-- If there is not exactly one launcher in the stack, we'd best fail
If there is not exactly one launcher in the stack, we'd best fast, since we are not expecting that, and may indicate an installation that
fail fast, since we are not expecting that, and may indicate would produce unpredictable results -->
an installation that would produce unpredictable results <!-- requires ant 1.7, and at this point, we're running 1.6 from eclipse
--> ... <condition property="expectedNumberOfLaunchers"> <resourcecount when="equal"
<!-- count="1" > <fileset dir="${testRoot}/eclipse/plugins"> <include name="org.eclipse.equinox.launcher_*.jar"
requires ant 1.7, and at this point, we're running 1.6 from /> </fileset> </resourcecount> </condition> <fail message="Did not find expected
eclipse ... <condition property="expectedNumberOfLaunchers"> number of launcher jars. Check installation." unless="expectedNumberOfLaunchers"
<resourcecount when="equal" count="1" > <fileset /> -->
dir="${testRoot}/eclipse/plugins"> <include <!-- Remember: using dash 'debug' for org.eclipse.ant.core.antRunner produces
name="org.eclipse.equinox.launcher_*.jar" /> </fileset> ant debug info to be output ... which is a TON of stuff. Even 'verbose' is
</resourcecount> </condition> <fail message="Did not find a bit too much. -->
expected number of launcher jars. Check installation." <echo message="eclipse.launcher: ${eclipse.launcher}"/>
unless="expectedNumberOfLaunchers" />
-->
<condition
property="antQuietValue"
value="-quiet"
else="">
<istrue value="${env.USE_QUIET}"/>
</condition>
<java <java
taskname="unit-test-masterprocess" taskname="unit-test-masterprocess"
fork="true" fork="true"
...@@ -224,7 +284,6 @@ ...@@ -224,7 +284,6 @@
<jvmarg value="-DbuildBranch=${buildBranch}"/> <jvmarg value="-DbuildBranch=${buildBranch}"/>
<jvmarg value="-DbuildType=${buildType}"/> <jvmarg value="-DbuildType=${buildType}"/>
<jvmarg value="-DdependencyFileLocation=${dependencyFileLocation}"/> <jvmarg value="-DdependencyFileLocation=${dependencyFileLocation}"/>
<jvmarg value="-DbuildId=${buildId}"/> <jvmarg value="-DbuildId=${buildId}"/>
<jvmarg value="-Dprojectname=${projectname}"/> <jvmarg value="-Dprojectname=${projectname}"/>
<jvmarg value="-Djava.io.tmpdir=${env.RECOMMENDED_TMP_DIR}"/> <jvmarg value="-Djava.io.tmpdir=${env.RECOMMENDED_TMP_DIR}"/>
...@@ -238,14 +297,13 @@ ...@@ -238,14 +297,13 @@
<arg value="${testRoot}/overallTestWorkspace"/> <arg value="${testRoot}/overallTestWorkspace"/>
<arg value="-application"/> <arg value="-application"/>
<arg value="org.eclipse.ant.core.antRunner"/> <arg value="org.eclipse.ant.core.antRunner"/>
<arg value="${antQuietValue}"/>
<arg value="-logger"/> <arg value="-logger"/>
<arg value="org.apache.tools.ant.DefaultLogger"/> <arg value="org.apache.tools.ant.DefaultLogger"/>
<arg value="-file"/> <arg value="-file"/>
<arg value="${testRoot}/perftest.xml"/> <arg value="${testRoot}/perftest.xml"/>
<arg value="${testTarget}"/> <arg value="${testTarget}"/>
<!-- make sure our forked env has a DISPLAY --> <!-- make sure our forked env has a DISPLAY -->
<env <env
key="DISPLAY" key="DISPLAY"
value="${env.DISPLAY}"/> value="${env.DISPLAY}"/>
...@@ -259,10 +317,8 @@ ...@@ -259,10 +317,8 @@
<jvmarg value="-DtestRoot=${testRoot}"/> <jvmarg value="-DtestRoot=${testRoot}"/>
<jvmarg value="-DtestDir=${testRoot}"/> <jvmarg value="-DtestDir=${testRoot}"/>
<jvmarg value="-DeclipseBuilderDirectory=${pde.builder.path}"/> <jvmarg value="-DeclipseBuilderDirectory=${pde.builder.path}"/>
<!-- IBM_JAVA_OPTIONS contains JIT work arounds for bug 284441 --> <!-- IBM_JAVA_OPTIONS contains JIT work arounds for bug 284441 <env key="IBM_JAVA_OPTIONS"
<env value="-Xjit:{org/eclipse/wst/html/core/internal/contenttype/HTMLHeadTokenizer.primGetNextToken()Ljava/lang/String;}(disableLookahead),{org/eclipse/jst/jsp/core/internal/parser/internal/JSPTokenizer.primGetNextToken()Ljava/lang/String;}(disableLookahead)"/> -->
key="IBM_JAVA_OPTIONS"
value="-Xjit:{org/eclipse/wst/html/core/internal/contenttype/HTMLHeadTokenizer.primGetNextToken()Ljava/lang/String;}(disableLookahead),{org/eclipse/jst/jsp/core/internal/parser/internal/JSPTokenizer.primGetNextToken()Ljava/lang/String;}(disableLookahead)"/>
</java> </java>
<echo message="wtpmasterjunitresult ${wtpmasterjunitresult}"/> <echo message="wtpmasterjunitresult ${wtpmasterjunitresult}"/>
</target> </target>
...@@ -311,5 +367,26 @@ ...@@ -311,5 +367,26 @@
<include name="*.html"/> <include name="*.html"/>
</fileset> </fileset>
</copy> </copy>
<copy
todir="${buildDirectory}/${buildLabel}/testResults/"
overwrite="true"
failonerror="false">
<fileset dir="${testRoot}/results/">
<include name="*.html"/>
</fileset>
</copy>
</target> </target>
<target name="init">
<echo message="dropinsFolder: ${dropinsFolder} "/>
<condition
property="install.destination"
value="${testRoot}${dropinsFolder}/"
else="${testRoot}/eclipse">
<isset property="dropinsFolder"/>
</condition>
</target>
</project> </project>
\ No newline at end of file
<project
name="Automated Eclipse Testing"
default="all"
basedir=".">
<!--properties file containing the plugin directory name including version
number, and list of required test plug-ins expressed as command-line argument
to unzip executable. Generated and packaged at build time. -->
<property file="test.properties"/>
<property environment="env"/>
<property
name="J2SE-5.0"
value="%JAVA_6_HOME%/jre/bin/java"/>
<property
name="J2SE-6.0"
value="%JAVA_6_HOME%/jre/bin/java"/>
<property
name="java.home"
value="%JAVA_HOME%/jre"/>
<!--properties file containing the build information -->
<property file="label.properties"/>
<!--default directory where test-eclipse will be installed <property name="install"
value="${basedir}" /> -->
<!--suffix added to test output files to identify platform on which tests
ran. -->
<property
name="platform"
value="${os}.${ws}.${arch}"/>
<!-- The root of the eclipse installation -->
<property
name="eclipse-home"
value="${basedir}/eclipse"/>
<property
name="repoZip"
value="${basedir}/eclipse-junit-tests-${buildId}.zip"/>
<property
name="repoLocation"
value="${basedir}/testRepo"/>
<property
name="platformLocation"
value="${basedir}/platformLocation"/>
<!-- The directory that will contain all files containing information on
the tests that ran. -->
<property
name="results"
value="${basedir}/results"/>
<!--Directory for JUnit report output, console log output and .log content
for each test suite. Overrides default in org.eclipse.test/library.xml -->
<property
name="junit-report-output"
value="${results}/${platform}"/>
<!--Directory name of org.eclipse.test plug-in installed in ${eclipse-home} -->
<target
name="setup"
depends="init">
<condition
property="setupTarget"
value="setup-zip">
<contains
string="${runtimeArchive}"
substring=".zip"/>
</condition>
<condition
property="setupTarget"
value="setup-tar.gz">
<contains
string="${runtimeArchive}"
substring=".tar.gz"/>
</condition>
<condition
property="repoexists"
value="true">
<available file="${repoLocation}"/>
</condition>
<condition
property="extraIU"
value="org.eclipse.equinox.p2.discovery.feature.feature.group">
<equals
arg1="${testPlugin}"
arg2="org.eclipse.equinox.p2.tests.discovery"/>
</condition>
<antcall target="setupRepo"/>
<!--<antcall target="${setupTarget}" /> <antcall target="configureDeltaPack"
/> -->
</target>
<!--Extract test bundles repo -->
<target
name="setupRepo"
unless="repoexists">
<mkdir dir="${repoLocation}"/>
<exec
dir="."
executable="unzip">
<arg line="-o ${repoZip} -d ${repoLocation}"/>
</exec>
</target>
<!--setup for zip archives -->
<target
name="setup-zip"
description="Reinstall the test Eclipse installation if specified by user">
<delete dir="${eclipse-home}"/>
<mkdir dir="${eclipse-home}"/>
<exec
dir="."
executable="unzip">
<arg line="-o -qq ${runtimeArchive} -d ${basedir}"/>
</exec>
<antcall target="installExtraPlugins"/>
<antcall target="installTestPlugins"/>
</target>
<!--setup for tar.gz archives -->
<target
name="setup-tar.gz"
description="Reinstall the test Eclipse installation if specified by user">
<property
name="currentDir"
value="${basedir}"/>
<delete dir="${eclipse-home}"/>
<mkdir dir="${eclipse-home}"/>
<exec
dir="${eclipse-home}"
executable="tar">
<arg line="-xzf ${currentDir}/${runtimeArchive}"/>
</exec>
<antcall target="installExtraPlugins"/>
<antcall target="installTestPlugins"/>
</target>
<!--use an stable version of the director so that instability in the current
build doesn't cause all the tests to fail -->
<target name="setupPlatform">
<property file="equinoxp2tests.properties"/>
<condition
property="platformArchive"
value="${org.eclipse.equinox.p2.reconciler.tests.35.platform.archive.linux}">
<os family="unix"/>
</condition>
<condition
property="platformArchive"
value="${org.eclipse.equinox.p2.reconciler.tests.35.platform.archive.macosx}">
<os family="mac"/>
</condition>
<condition
property="platformArchive"
value="${org.eclipse.equinox.p2.reconciler.tests.platform.archive.win32}">
<os family="windows"/>
</condition>
<condition
property="platformTarget"
value="platform-zip">
<contains
string="${platformArchive}"
substring=".zip"/>
</condition>
<condition
property="platformTarget"
value="platform-tar.gz">
<contains
string="${platformArchive}"
substring=".tar.gz"/>
</condition>
<echo message="platform target ${platformTarget} platformArchive ${platformArchive}"/>
<antcall target="${platformTarget}"/>
</target>
<!--setup for platform zip archives -->
<target
name="platform-zip"
description="Reinstall the test Eclipse installation if specified by user">
<delete dir="${platformLocation}"/>
<mkdir dir="${platformLocation}"/>
<exec
dir="${platformLocation}"
executable="unzip">
<arg line="-o -qq ${platformArchive} -d ${platformLocation}"/>
</exec>
</target>
<!--setup for platform tar.gz archives -->
<target
name="platform-tar.gz"
description="Reinstall the test Eclipse installation if specified by user">
<delete dir="${platformLocation}"/>
<mkdir dir="${platformLocation}"/>
<exec
dir="${platformLocation}"
executable="tar">
<arg line="-xzf ${platformArchive}"/>
</exec>
</target>
<target
name="installExtraPlugins"
if="extraIU">
<property file="equinoxp2tests.properties"/>
<property
name="currentBuildRepo"
value="${org.eclipse.equinox.p2.tests.current.build.repo}"/>
<echo>-installIU ${extraIU} +</echo>
<exec
executable="${eclipse-home}/eclipse"
failonerror="false"
dir="${eclipse-home}"
timeout="900000"
output="${basedir}/director.log"
resultproperty="directorcode">
<arg line="-vm ${java.home}/bin/java"/>
<arg line="-application org.eclipse.equinox.p2.director"/>
<arg line="-nosplash"/>
<arg line="--launcher.suppressErrors"/>
<arg line="-consoleLog"/>
<arg line="-flavor tooling"/>
<arg line="-installIUs ${extraIU}"/>
<arg line="-p2.os ${os}"/>
<arg line="-p2.ws ${ws}"/>
<arg line="-p2.arch ${arch}"/>
<arg line="-roaming"/>
<arg line="-profile SDKProfile"/>
<arg line="-repository ${currentBuildRepo}"/>
<arg line="-destination ${eclipse-home}"/>
<arg line="-bundlepool ${eclipse-home}"/>
</exec>
</target>
<target name="installTestPlugins">
<!--<antcall target="setupPlatform" /> -->
<echo>-installIU ${testPlugin} +</echo>
<exec
executable="${eclipse-home}/eclipse"
failonerror="true"
dir="${eclipse-home}"
timeout="900000"
output="${basedir}/director.log"
resultproperty="directorcode">
<arg line="-vm ${java.home}/bin/java"/>
<arg line="-application org.eclipse.equinox.p2.director"/>
<arg line="-nosplash"/>
<arg line="--launcher.suppressErrors"/>
<arg line="-consoleLog"/>
<arg line="-flavor tooling"/>
<arg line="-installIUs ${testPlugin}"/>
<arg line="-p2.os ${os}"/>
<arg line="-p2.ws ${ws}"/>
<arg line="-p2.arch ${arch}"/>
<arg line="-roaming"/>
<arg line="-profile SDKProfile"/>
<arg line="-repository file:${repoLocation}"/>
<arg line="-destination ${eclipse-home}"/>
<arg line="-bundlepool ${eclipse-home}"/>
</exec>
<!--<antcall target="configureTeamTest" /> <antcall target="unzipderby"
/> -->
</target>
<target
name="unzipderby"
if="derby">
<exec
dir="."
executable="unzip">
<arg line="-o eclipse-junit-tests-*.zip ${derby} -d ${eclipse-home}"/>
</exec>
<copy todir="${eclipse-home}/dropins/eclipse/plugins">
<fileset
dir="${repoLocation}/eclipse/dropins/eclipse/plugins"
includes="org.apache.derby**/*"/>
</copy>
</target>
<target
name="init"
depends="setRuntimeArchive">
<mkdir dir="${results}/xml"/>
<mkdir dir="${results}/html"/>
<mkdir dir="${junit-report-output}"/>
<!--Unlock files on the Mac before starting tests. Required to delete some
workspace directories (org.eclipse.core.filebuffers.tests and Team CVS tests). -->
<exec
dir="${basedir}"
executable="chflags"
os="Mac OS X">
<arg line="-R nouchg ${eclipse-home}"/>
</exec>
</target>
<target name="setRuntimeArchive">
<condition
property="runtimeArchive"
value="eclipse-SDK-${buildId}-win32.zip">
<and>
<equals
arg1="${os}"
arg2="win32"/>
<equals
arg1="${ws}"
arg2="win32"/>
<equals
arg1="${arch}"
arg2="x86"/>
</and>
</condition>
<condition
property="runtimeArchive"
value="eclipse-SDK-${buildId}-win32-x86_64.zip">
<and>
<equals
arg1="${os}"
arg2="win32"/>
<equals
arg1="${ws}"
arg2="win32"/>
<equals
arg1="${arch}"
arg2="x86_64"/>
</and>
</condition>
<condition
property="runtimeArchive"
value="eclipse-SDK-${buildId}-linux-gtk.tar.gz">
<and>
<equals
arg1="${os}"
arg2="linux"/>
<equals
arg1="${ws}"
arg2="gtk"/>
<equals
arg1="${arch}"
arg2="x86"/>
</and>
</condition>
<condition
property="runtimeArchive"
value="eclipse-SDK-${buildId}-linux-motif.tar.gz">
<and>
<equals
arg1="${os}"
arg2="linux"/>
<equals
arg1="${ws}"
arg2="motif"/>
<equals
arg1="${arch}"
arg2="x86"/>
</and>
</condition>
<condition
property="runtimeArchive"
value="eclipse-SDK-${buildId}-linux-gtk-ppc.tar.gz">
<and>
<equals
arg1="${os}"
arg2="linux"/>
<equals
arg1="${ws}"
arg2="gtk"/>
<equals
arg1="${arch}"
arg2="ppc"/>
</and>
</condition>
<condition
property="runtimeArchive"
value="eclipse-SDK-${buildId}-linux-gtk-ppc64.tar.gz">
<and>
<equals
arg1="${os}"
arg2="linux"/>
<equals
arg1="${ws}"
arg2="gtk"/>
<equals
arg1="${arch}"
arg2="ppc64"/>
</and>
</condition>
<condition
property="runtimeArchive"
value="eclipse-SDK-${buildId}-linux-gtk-x86_64.tar.gz">
<and>
<equals
arg1="${os}"
arg2="linux"/>
<equals
arg1="${ws}"
arg2="gtk"/>
<equals
arg1="${arch}"
arg2="x86_64"/>
</and>
</condition>
<condition
property="runtimeArchive"
value="eclipse-SDK-${buildId}-macosx-carbon.tar.gz">
<and>
<equals
arg1="${os}"
arg2="macosx"/>
<equals
arg1="${ws}"
arg2="carbon"/>
<equals
arg1="${arch}"
arg2="ppc"/>
</and>
</condition>
<condition
property="runtimeArchive"
value="eclipse-SDK-${buildId}-macosx-carbon.tar.gz">
<and>
<equals
arg1="${os}"
arg2="macosx"/>
<equals
arg1="${ws}"
arg2="carbon"/>
<equals
arg1="${arch}"
arg2="x86"/>
</and>
</condition>
<condition
property="runtimeArchive"
value="eclipse-SDK-${buildId}-macosx-cocoa-ppc.tar.gz">
<and>
<equals
arg1="${os}"
arg2="macosx"/>
<equals
arg1="${ws}"
arg2="cocoa"/>
<equals
arg1="${arch}"
arg2="ppc"/>
</and>
</condition>
<condition
property="runtimeArchive"
value="eclipse-SDK-${buildId}-macosx-cocoa.tar.gz">
<and>
<equals
arg1="${os}"
arg2="macosx"/>
<equals
arg1="${ws}"
arg2="cocoa"/>
<equals
arg1="${arch}"
arg2="x86"/>
</and>
</condition>
<condition
property="runtimeArchive"
value="eclipse-SDK-${buildId}-macosx-cocoa-x86_64.tar.gz">
<and>
<equals
arg1="${os}"
arg2="macosx"/>
<equals
arg1="${ws}"
arg2="cocoa"/>
<equals
arg1="${arch}"
arg2="x86_64"/>
</and>
</condition>
<condition
property="runtimeArchive"
value="eclipse-SDK-${buildId}-hpux-motif.zip">
<and>
<equals
arg1="${os}"
arg2="hpux"/>
<equals
arg1="${ws}"
arg2="motif"/>
<equals
arg1="${arch}"
arg2="ia64_32"/>
</and>
</condition>
<condition
property="runtimeArchive"
value="eclipse-SDK-${buildId}-solaris-motif.zip">
<and>
<equals
arg1="${os}"
arg2="solaris"/>
<equals
arg1="${ws}"
arg2="motif"/>
<equals
arg1="${arch}"
arg2="sparc"/>
</and>
</condition>
<condition
property="runtimeArchive"
value="eclipse-SDK-${buildId}-solaris-gtk.zip">
<and>
<equals
arg1="${os}"
arg2="solaris"/>
<equals
arg1="${ws}"
arg2="gtk"/>
<equals
arg1="${arch}"
arg2="sparc"/>
</and>
</condition>
<condition
property="runtimeArchive"
value="eclipse-SDK-${buildId}-solaris-gtk-x86.zip">
<and>
<equals
arg1="${os}"
arg2="solaris"/>
<equals
arg1="${ws}"
arg2="gtk"/>
<equals
arg1="${arch}"
arg2="x86"/>
</and>
</condition>
<condition
property="runtimeArchive"
value="eclipse-SDK-${buildId}-aix-motif.zip">
<and>
<equals
arg1="${os}"
arg2="aix"/>
<equals
arg1="${ws}"
arg2="motif"/>
<equals
arg1="${arch}"
arg2="ppc"/>
</and>
</condition>
<condition
property="runtimeArchive"
value="eclipse-SDK-${buildId}-aix-gtk-ppc64.zip">
<and>
<equals
arg1="${os}"
arg2="aix"/>
<equals
arg1="${ws}"
arg2="gtk"/>
<equals
arg1="${arch}"
arg2="ppc64"/>
</and>
</condition>
</target>
<target
name="setJVMProperties"
depends="setJVMfromUserSpecified">
<!--enable tests requiring 1.5 or 1.6 vms to run if running vm level detected
matches required execution environment -->
<condition
property="J2SE-5.0"
value="${java.home}/bin/java">
<or>
<equals
arg1="${ant.java.version}"
arg2="1.5"/>
<equals
arg1="${ant.java.version}"
arg2="1.6"/>
</or>
</condition>
<condition
property="J2SE-6.0"
value="${java.home}/bin/java">
<equals
arg1="${ant.java.version}"
arg2="1.6"/>
</condition>
</target>
<target
name="setJVMfromUserSpecified"
if="jvm">
<exec
executable="${jvm}"
outputproperty="javaversion">
<arg line="-version"/>
</exec>
<echo message="java version of ${jvm} is ${javaversion}"/>
<condition
property="J2SE-6.0"
value="${jvm}">
<contains
string="${javaversion}"
substring="java version &quot;1.6"/>
</condition>
<condition
property="J2SE-5.0"
value="${jvm}">
<or>
<contains
string="${javaversion}"
substring="java version &quot;1.6"/>
<contains
string="${javaversion}"
substring="java version &quot;1.5"/>
</or>
</condition>
<echo message="J2SE-6.0: ${J2SE-6.0}"/>
<echo message="J2SE-5.0: ${J2SE-5.0}"/>
</target>
<target
name="configureTeamTest"
if="teamcvs">
<!-- Fill in cvs repository information to be able to run CVS perf tests -->
<replace
file="${eclipse-home}/plugins/${org.eclipse.team.tests.cvs.core}/repository.properties"
token="@user@"
value="${cvs_user}"/>
<replace
file="${eclipse-home}/plugins/${org.eclipse.team.tests.cvs.core}/repository.properties"
token="@password@"
value="${cvs_password}"/>
<replace
file="${eclipse-home}/plugins/${org.eclipse.team.tests.cvs.core}/repository.properties"
token="@host@"
value="${cvs_host}"/>
<replace
file="${eclipse-home}/plugins/${org.eclipse.team.tests.cvs.core}/repository.properties"
token="@root@"
value="${cvs_root}"/>
</target>
<target
name="configureDeltaPack"
if="pdebuild">
<property
name="deltapackArchive"
value="eclipse-${buildId}-delta-pack.zip"/>
<property
name="installDeltapack"
value="${eclipse-home}/deltapack"/>
<mkdir dir="${installDeltapack}"/>
<exec
dir="."
executable="unzip">
<arg line="-o -qq ${deltapackArchive} -d ${installDeltapack}"/>
</exec>
</target>
<macrodef name="runTests">
<attribute name="testPlugin"/>
<sequential>
<!--alwasy use eclipse executable to launch tests with the exception of
performance tests -->
<!--condition property="useEclipseExe" value="true"> <not> <equals arg1="${test.target}"
arg2="performance"/> </not> </condition -->
<condition
property="performance.target.present"
value="true">
<isset property="@{testPlugin}.has.performance.target"/>
</condition>
<!--override the value of this property with performance if the tests
run on performance machine -->
<property
name="test.target"
value="performance"/>
<property
name="report"
value="@{testPlugin}"/>
<!--install db plug-ins if running performance tests -->
<!--<condition property="derby" value="eclipse/dropins/eclipse/plugins/org.apache.derby*/**">
<equals arg1="${test.target}" arg2="performance" /> </condition> -->
<!-- <property name="derby" value="" /> -->
<!-- <param name="testPlugin" value="${@{testPlugin}}" /> -->
<antcall target="${test.target}">
<param
name="testPlugin"
value="@{testPlugin}"/>
<param
name="output-file"
value="@{testPlugin}.xml"/>
</antcall>
</sequential>
</macrodef>
<target
name="junit"
unless="skip.test">
<antcall target="setup">
</antcall>
<property
name="org.eclipse.test"
value="org.eclipse.test_3.3.0"/>
<property
name="library-file"
value="${basedir}/eclipse/eclipse/plugins/${org.eclipse.test}/library.xml"/>
<echo>trying to find ${testPlugin}_*</echo>
<fileset
id="test.plugin.file"
dir="${eclipse-home}/plugins">
<filename name="${testPlugin}_*/test.xml"/>
</fileset>
<property
name="testPluginX"
refid="test.plugin.file"/>
<echo>trying to find ${testPluginX}</echo>
<condition
property="pluginexists"
value="true">
<not>
<equals
arg1="${testPluginX}"
arg2=""/>
</not>
</condition>
<antcall target="runSuite"/>
<antcall target="genResults"/>
</target>
<target
name="runSuite"
if="pluginexists">
<ant
antfile="${eclipse-home}/plugins/${testPluginX}"
dir="${eclipse-home}"/>
</target>
<target
name="runSuitePerf"
if="pluginexists">
<echo message="testPluginX ${testPluginX}"/>
<ant
antfile="${eclipse-home}/plugins/${testPluginX}"
dir="${eclipse-home}"
target="performance"/>
</target>
<target
name="performance"
if="performance.target.present"
unless="skip.test">
<antcall target="setup"/>
<antcall target="installTestPlugins"/>
<property
name="org.eclipse.test"
value="org.eclipse.test_3.3.0"/>
<property
name="library-file"
value="${basedir}/eclipse/dropins/eclipseTestFramework/eclipse/plugins/${org.eclipse.test}/library.xml"/>
<echo>trying to find ${testPlugin}_*</echo>
<fileset
id="test.plugin.file"
dir="${eclipse-home}/plugins">
<filename name="${testPlugin}_*/test.xml"/>
</fileset>
<property
name="testPluginX"
refid="test.plugin.file"/>
<echo>trying to find ${testPluginX}</echo>
<condition
property="pluginexists"
value="true">
<not>
<equals
arg1="${testPluginX}"
arg2=""/>
</not>
</condition>
<antcall target="runSuitePerf"/>
<antcall target="genResults"/>
</target>
<target name="genResults">
<copy
file="${eclipse-home}/${report}.xml"
tofile="${results}/xml/${report}_${platform}.xml"
failonerror="false"/>
<xslt
style="${eclipse-home}/dropins/eclipseTestFramework/eclipse/plugins/${org.eclipse.test}/JUNIT.XSL"
basedir="${results}/xml"
destdir="${results}/html"/>
</target>
<target name="ant">
<runTests testPlugin="org.eclipse.ant.tests.core"/>
</target>
<target name="antui">
<runTests testPlugin="org.eclipse.ant.tests.ui"/>
</target>
<target name="compare">
<runTests testPlugin="org.eclipse.compare.tests"/>
</target>
<target name="debug">
<runTests testPlugin="org.eclipse.debug.tests"/>
</target>
<target name="coreresources">
<runTests testPlugin="org.eclipse.core.tests.resources"/>
</target>
<target name="coreruntime">
<runTests testPlugin="org.eclipse.core.tests.runtime"/>
</target>
<target name="osgi">
<runTests testPlugin="org.eclipse.osgi.tests"/>
</target>
<target name="coreexpressions">
<runTests testPlugin="org.eclipse.core.expressions.tests"/>
</target>
<target name="ltkuirefactoringtests">
<runTests testPlugin="org.eclipse.ltk.ui.refactoring.tests"/>
</target>
<target name="ltkcorerefactoringtests">
<runTests testPlugin="org.eclipse.ltk.core.refactoring.tests"/>
</target>
<target name="text">
<runTests testPlugin="org.eclipse.text.tests"/>
</target>
<target name="jface">
<runTests testPlugin="org.eclipse.jface.text.tests"/>
</target>
<target name="jfacedatabinding">
<runTests testPlugin="org.eclipse.jface.tests.databinding"/>
</target>
<target name="filebuffers">
<runTests testPlugin="org.eclipse.core.filebuffers.tests"/>
</target>
<target
name="jdttext"
unless="skip.jdttext">
<runTests testPlugin="org.eclipse.jdt.text.tests"/>
</target>
<target
name="relEng"
depends="setRuntimeArchive">
<runTests testPlugin="org.eclipse.releng.tests"/>
<move
todir="${results}/chkpii"
includeEmptyDirs="no"
failonerror="false">
<fileset dir="${results}/chkpii"/>
<mapper
type="glob"
from="*"
to="${platform}_*"/>
</move>
</target>
<target name="ua">
<runTests testPlugin="org.eclipse.ua.tests"/>
</target>
<target name="uadoc">
<runTests testPlugin="org.eclipse.ua.tests.doc"/>
</target>
<target name="coretestsnet">
<runTests testPlugin="org.eclipse.core.tests.net"/>
</target>
<target
name="jdtcorecompiler"
depends="setJVMProperties">
<condition
property="jvm"
value="${J2SE-5.0}">
<isset property="J2SE-5.0"/>
</condition>
<runTests testPlugin="org.eclipse.jdt.core.tests.compiler"/>
</target>
<target
name="jdtapt"
depends="setJVMProperties">
<property
name="jvm"
value="${J2SE-5.0}"/>
<!--only run test if J2SE-5.0 property set -->
<condition property="skip.test">
<not>
<isset property="J2SE-5.0"/>
</not>
</condition>
<runTests testPlugin="org.eclipse.jdt.apt.tests"/>
</target>
<target
name="jdtaptpluggable"
depends="setJVMProperties">
<property
name="jvm"
value="${J2SE-6.0}"/>
<!--only run test if J2SE-5.0 property set -->
<condition property="skip.test">
<not>
<isset property="J2SE-6.0"/>
</not>
</condition>
<runTests testPlugin="org.eclipse.jdt.apt.pluggable.tests"/>
</target>
<target
name="jdtcorebuilder"
depends="setJVMProperties">
<!--Run with 1.5 vm if it is available -->
<condition
property="jvm"
value="${J2SE-5.0}">
<isset property="J2SE-5.0"/>
</condition>
<runTests testPlugin="org.eclipse.jdt.core.tests.builder"/>
</target>
<target
name="jdtcompilertool"
depends="setJVMProperties">
<property
name="jvm"
value="${J2SE-6.0}"/>
<!--only run test if J2SE-6.0 property set -->
<condition property="skip.test">
<not>
<isset property="J2SE-6.0"/>
</not>
</condition>
<runTests testPlugin="org.eclipse.jdt.compiler.tool.tests"/>
</target>
<target
name="jdtcompilerapt"
depends="setJVMProperties">
<property
name="jvm"
value="${J2SE-6.0}"/>
<!--only run test if J2SE-6.0 property set -->
<condition property="skip.test">
<not>
<isset property="J2SE-6.0"/>
</not>
</condition>
<runTests testPlugin="org.eclipse.jdt.compiler.apt.tests"/>
</target>
<target
name="jdtcoremodel"
depends="setJVMProperties">
<condition
property="jvm"
value="${J2SE-5.0}">
<isset property="J2SE-5.0"/>
</condition>
<runTests testPlugin="org.eclipse.jdt.core.tests.model"/>
</target>
<target name="jdtcoreperf">
<runTests testPlugin="org.eclipse.jdt.core.tests.performance"/>
</target>
<target name="jdtdebug">
<runTests testPlugin="org.eclipse.jdt.debug.tests"/>
</target>
<target name="jdtui">
<runTests testPlugin="org.eclipse.jdt.ui.tests"/>
</target>
<target name="jdtuirefactoring">
<runTests testPlugin="org.eclipse.jdt.ui.tests.refactoring"/>
</target>
<target name="pdeui">
<runTests testPlugin="org.eclipse.pde.ui.tests"/>
</target>
<target name="pdebuild">
<property
name="pdebuild"
value="true"/>
<runTests testPlugin="org.eclipse.pde.build.tests"/>
</target>
<target name="swt">
<runTests testPlugin="org.eclipse.swt.tests"/>
</target>
<target name="teamcore">
<runTests testPlugin="org.eclipse.team.tests.core"/>
</target>
<target name="teamcvs">
<property
name="teamcvs"
value="true"/>
<runTests testPlugin="org.eclipse.team.tests.cvs.core"/>
</target>
<target name="ui">
<runTests testPlugin="org.eclipse.ui.tests"/>
</target>
<target name="uinavigator">
<runTests testPlugin="org.eclipse.ui.tests.navigator"/>
</target>
<target name="uircp">
<runTests testPlugin="org.eclipse.ui.tests.rcp"/>
</target>
<target name="uiforms">
<runTests testPlugin="org.eclipse.ui.tests.forms"/>
</target>
<target name="uieditors">
<runTests testPlugin="org.eclipse.ui.editors.tests"/>
</target>
<target name="uiperformance">
<runTests testPlugin="org.eclipse.ui.tests.performance"/>
</target>
<target name="uiviews">
<runTests testPlugin="org.eclipse.ui.tests.views.properties.tabbed"/>
</target>
<target name="uiworkbenchtexteditor">
<runTests testPlugin="org.eclipse.ui.workbench.texteditor.tests"/>
</target>
<target name="update">
<runTests testPlugin="org.eclipse.update.tests.core"/>
</target>
<target
name="pdeapitooling"
depends="setJVMProperties">
<property
name="jvm"
value="${J2SE-5.0}"/>
<!--only run test if J2SE-5.0 property set -->
<condition property="skip.test">
<not>
<isset property="J2SE-5.0"/>
</not>
</condition>
<runTests testPlugin="org.eclipse.pde.api.tools.tests"/>
</target>
<target name="equinoxsecurity">
<runTests testPlugin="org.eclipse.equinox.security.tests"/>
</target>
<target
name="equinoxp2"
depends="setJVMProperties">
<property
name="jvm"
value="${J2SE-5.0}"/>
<!--only run test if J2SE-5.0 property set -->
<condition property="skip.test">
<not>
<isset property="J2SE-5.0"/>
</not>
</condition>
<runTests testPlugin="org.eclipse.equinox.p2.tests"/>
</target>
<target
name="equinoxp2ui"
depends="setJVMProperties">
<property
name="jvm"
value="${J2SE-5.0}"/>
<!--only run test if J2SE-5.0 property set -->
<condition property="skip.test">
<not>
<isset property="J2SE-5.0"/>
</not>
</condition>
<runTests testPlugin="org.eclipse.equinox.p2.tests.ui"/>
</target>
<target
name="equinoxp2discovery"
depends="setJVMProperties">
<property
name="jvm"
value="${J2SE-5.0}"/>
<!--only run test if J2SE-5.0 property set -->
<condition property="skip.test">
<not>
<isset property="J2SE-5.0"/>
</not>
</condition>
<runTests testPlugin="org.eclipse.equinox.p2.tests.discovery"/>
</target>
<target name="search">
<runTests testPlugin="org.eclipse.search.tests"/>
</target>
<target name="pdeds">
<runTests testPlugin="org.eclipse.pde.ds.tests"/>
</target>
<target name="all">
<antcall target="jdtcompilertool"/>
<antcall target="jdtcompilerapt"/>
<antcall target="jdttext"/>
<antcall target="relEng"/>
<antcall target="pdeui"/>
<antcall target="ant"/>
<antcall target="compare"/>
<antcall target="coreruntime"/>
<antcall target="coreresources"/>
<antcall target="osgi"/>
<antcall target="coreexpressions"/>
<antcall target="update"/>
<antcall target="teamcore"/>
<antcall target="jdtcoreperf"/>
<antcall target="jdtcorebuilder"/>
<antcall target="jdtcorecompiler"/>
<antcall target="uiperformance"/>
<antcall target="uieditors"/>
<antcall target="uinavigator"/>
<antcall target="uiworkbenchtexteditor"/>
<antcall target="uircp"/>
<antcall target="uiviews"/>
<antcall target="jdtdebug"/>
<antcall target="jdtui"/>
<antcall target="jdtuirefactoring"/>
<antcall target="ltkuirefactoringtests"/>
<antcall target="ltkcorerefactoringtests"/>
<antcall target="text"/>
<antcall target="jface"/>
<antcall target="jfacedatabinding"/>
<antcall target="filebuffers"/>
<antcall target="antui"/>
<antcall target="swt"/>
<antcall target="teamcvs"/>
<antcall target="coretestsnet"/>
<antcall target="jdtapt"/>
<antcall target="pdebuild"/>
<antcall target="jdtaptpluggable"/>
<antcall target="ua"/>
<antcall target="uiforms"/>
<antcall target="pdeapitooling"/>
<antcall target="equinoxsecurity"/>
<antcall target="equinoxp2"/>
<antcall target="equinoxp2ui"/>
<antcall target="equinoxp2discovery"/>
<antcall target="search"/>
<antcall target="pdeds"/>
<antcall target="jdtcoremodel"/>
<antcall target="uadoc"/>
<antcall target="debug"/>
<antcall target="ui"/>
</target>
</project>
[Note to readers: please improve these instructions as you find things.] [Note to readers: please improve these instructions as you find things.]
The files in this folder are for installinging and runing unit tests and performance tests. The files in this folder are for installing and running unit tests and performance tests.
Your machine must have the following software installed and update Your machine must have the following software installed and update
the "runtest" scripts to point to their installation: the "runtest" scripts to point to their installation:
ant ant
java java 6
Your machine must have the following software installed and available to Your machine must have the following software installed and available to
be executed from the path: be executed from the path:
......
@echo off
REM default java executable for outer and test vm
set vmcmd=java
REM reset list of ant targets in test.xml to execute
set tests=
REM default switch to determine if eclipse should be reinstalled between running of tests
set installmode=clean
REM default values for os, ws and arch
set os=win32
set ws=win32
set arch=x86
REM reset ant command line args
set ANT_CMD_LINE_ARGS=
REM ****************************************************************
REM
REM Install Eclipse if it does not exist
REM
REM ****************************************************************
if NOT EXIST eclipseAnt unzip -qq -o %LOCAL_PREREQS_CACHE%/eclipse-SDK-*.zip -d eclipseAnt && unzip -qq -o -C eclipse-junit-tests*.zip plugins/org.eclipse.test* -d eclipseAnt/eclipse/dropins/
:processcmdlineargs
REM ****************************************************************
REM
REM Process command line arguments
REM
REM ****************************************************************
if x%1==x goto run
if x%1==x-ws set ws=%2 && shift && shift && goto processcmdlineargs
if x%1==x-os set os =%2 && shift && shift && goto processcmdlineargs
if x%1==x-arch set arch=%2 && shift && shift && goto processcmdlineargs
if x%1==x-noclean set installmode=noclean&& shift && goto processcmdlineargs
if x%1==x-vm set vmcmd="%2" && shift && shift && goto processcmdlineargs
set tests=%tests% %1 && shift && goto processcmdlineargs
:run
REM ***************************************************************************
REM Run tests by running Ant in Eclipse on the eclipsePerfTests.xml script
REM ***************************************************************************
REM get name of org.eclipse.equinox.launcher_*.jar with version label
dir /b eclipseAnt\eclipse\plugins\org.eclipse.equinox.launcher_*.jar>launcher-jar-name.txt
set /p launcher-jar=<launcher-jar-name.txt
%vmcmd% -Dosgi.os=%os% -Dosgi.ws=%ws% -Dosgi.arch=%arch% -jar eclipseAnt\eclipse\plugins\%launcher-jar% -data workspace -application org.eclipse.ant.core.antRunner -file eclipsePerfTests.xml %tests% -Dws=%ws% -Dos=%os% -Darch=%arch% -D%installmode%=true -logger org.apache.tools.ant.DefaultLogger
goto end
:end
REM Example script to run standalone test on Windows REM Example script to run standalone test on Windows
REM -performance and -functional options both require releng data to be present (i.e. call with -checkout first) REM Running performance or junit tests require releng data to be present (i.e. call with -checkout first)
@echo off @echo off
SETLOCAL SETLOCAL
...@@ -65,49 +65,49 @@ REM timestamp Basically the "end" part of a download zip or build name, ...@@ -65,49 +65,49 @@ REM timestamp Basically the "end" part of a download zip or build name,
REM build.stream (not sure if needed) REM build.stream (not sure if needed)
REM buildBranch Build branch used in various scripts ... usually the "middle" part of projectname, such as R3.2 in wtp-R3.2-I REM buildBranch Build branch used in various scripts ... usually the "middle" part of projectname, such as R3.2 in wtp-R3.2-I
REM testTarget The specific test suite(s) to run. These target names are from the test.xml file. Omit or use 'all' to run all tests. REM testTarget The specific test suite(s) to run. These target names are from the test.xml file. Omit or use 'all' to run all tests.
REM testBundle The specific plugin to test, such as org.eclipse.jst.jsp. Will run the selected tests only on that bundle. REM testBundle The specific plugin to test, such as org.eclipse.jst.jsp. Will run the selected tests only on that bundle.
REM -f antfile The name or path should not have to be changed, but the "releng.wtpbuilder" project must already be checked out from CVS REM -f antfile The name or path should not have to be changed, but the "releng.wtpbuilder" project must already be checked out from CVS
REM (or exported from Eclipse) into a directory named 'webtools.releng' which is immediately under the BUILD_HOME directory. REM (or exported from Eclipse) into a directory named 'webtools.releng' which is immediately under the BUILD_HOME directory.
REM It is assume this batch file, then, is in the BUILD_HOME directory. REM It is assume this batch file, then, is in the BUILD_HOME directory.
REM check to see what the user chose. Default is help. REM check to see what the user chose. Default is help.
if x%1==x-onesuite goto onesuite if x%1==x-funcSuite goto funcSuite
if x%1==x-perfSuite goto perfSuite
if x%1==x-functional goto func if x%1==x-functional goto func
if x%1==x-checkout goto chk if x%1==x-checkout goto chk
if x%1==x-performance goto perf if x%1==x-performance goto perf
goto hlp goto hlp
:chk :chk
echo Running standalonecheckout.xml echo Running standalonecheckout.xml
call ant ^ call ant ^
-Dprojectname=wtp-M3.2.3 ^ -Dprojectname=wtp-R3.2.3 ^
-DbuildType=M ^ -DbuildType=R ^
-DbuildId=3.2.3 ^ -DbuildId=3.2.3 ^
-Dtimestamp=20110121005429 ^ -Dtimestamp=20110217214612 ^
-DmapVersionTag=vM20110121005429 ^ -DmapVersionTag=R3_2_3 ^
-Dbuild.stream=R3.2.3 ^ -Dbuild.stream=R3.2.3 ^
-DbuildBranch=R3.2.3 ^ -DbuildBranch=R3.2.3 ^
-f standalonecheckout.xml -f standalonecheckout.xml
goto exit goto exit
:func :func
echo Running standaloneTest.xml echo Running standaloneTest.xml
call ant ^ call ant ^
-Dprojectname=wtp-M3.2.3 ^ -Dprojectname=wtp-R3.2.3 ^
-DbuildType=M ^ -DbuildType=R ^
-DbuildId=3.2.3 ^ -DbuildId=3.2.3 ^
-Dtimestamp=20110121005429 ^ -Dtimestamp=20110217214612 ^
-Dbuild.stream=R3.2.3 ^ -Dbuild.stream=R3.2.3 ^
-DbuildBranch=R3.2.3 ^ -DbuildBranch=R3.2.3 ^
-f standaloneTest.xml -f standaloneTest.xml
goto exit goto exit
:onesuite :funcSuite
echo Example Running standaloneTest.xml and running only one suite echo Example Running standaloneTest.xml and running only one suite
call ant ^ call ant ^
...@@ -124,19 +124,35 @@ goto exit ...@@ -124,19 +124,35 @@ goto exit
:perf :perf
echo Running standalonePerfTest.xml echo Running standalonePerfTest.xml
call ant ^ call ant ^
-Dprojectname=wtp-M3.2.3 ^ -Dprojectname=wtp-R3.2.3 ^
-DbuildType=M ^ -DbuildType=R ^
-DbuildId=3.2.3 ^ -DbuildId=3.2.3 ^
-Dtimestamp=20110121005429 ^ -Dtimestamp=20110217214612 ^
-Dbuild.stream=R3.2.3 ^ -Dbuild.stream=R3.2.3 ^
-DbuildBranch=R3.2.3 ^ -DbuildBranch=R3.2.3 ^
-f standalonePerfTest.xml -f standalonePerfTest.xml
goto exit
:perfSuite
rem For a complete list of available test suites see the 'all' target in eclipsePerfTests.xml
rem testBundle can be one suite (-DtestBundle=antui) or multiple (-DtestBundle="jdtcompilertool antui")
echo Running standalonePerfTest.xml
call ant ^
-Dprojectname=wtp-R3.2.3 ^
-DbuildType=R ^
-DbuildId=3.2.3 ^
-Dtimestamp=20110217214612 ^
-Dbuild.stream=R3.2.3 ^
-DbuildBranch=R3.2.3 ^
-DtestBundle=antui ^
-f standalonePerfTest.xml
goto exit goto exit
:hlp :hlp
echo Use -performance for performance tests, -funtional for function tests, -checkout to (re)fetch releng data, or anything else for this message echo Use -performance to run all performance tests, -perfSuite to run specific performance suites, -funtional for function tests, -funcSuite to run a specific junit test, -checkout to (re)fetch releng data, or anything else for this message
:exit :exit
ENDLOCAL ENDLOCAL
...@@ -2,18 +2,12 @@ ...@@ -2,18 +2,12 @@
name="standalonePerfTest" name="standalonePerfTest"
default="standalonePerfTest" default="standalonePerfTest"
basedir="."> basedir=".">
<!-- <!-- Required inputs: build.home buildType buildId timestamp build.stream
Required inputs: build.home buildType buildId timestamp [optional] build.committers [optional] testTarget [optional] -->
build.stream [optional] build.committers [optional] testTarget
[optional]
-->
<property environment="env"/> <property environment="env"/>
<!-- <!-- Let users override standard properties, if desired. If directory, file,
Let users override standard properties, if desired. If or some properties do not exist, then standard properties will be used. -->
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}"/> <echo message="LOCAL_BUILD_PROPERTIES_DIR: ${env.LOCAL_BUILD_PROPERTIES_DIR}"/>
...@@ -31,7 +25,7 @@ ...@@ -31,7 +25,7 @@
<echo <echo
level="info" level="info"
message="keyCfgFile: ${keyCfgFile}"/> message="keyCfgFile: ${keyCfgFile}"/>
<!-- required to get proper value of dropinsFolder --> <!-- required to get proper value of dropinsFolder -->
<property file="${keyCfgFile}"/> <property file="${keyCfgFile}"/>
<fail <fail
message="testRoot must be set for this task" message="testRoot must be set for this task"
...@@ -48,11 +42,7 @@ ...@@ -48,11 +42,7 @@
name="buildDirectory" name="buildDirectory"
value="${env.PROJECT_PROJECTS}/${projectName}/workdir"/> value="${env.PROJECT_PROJECTS}/${projectName}/workdir"/>
<!-- <!-- <property name="dependency.properties" value="${buildDirectory}/maps/${env.RELENG}/${dependencyFileLocation}"/> -->
<property
name="dependency.properties"
value="${buildDirectory}/maps/${env.RELENG}/${dependencyFileLocation}"/>
-->
<property <property
name="dependency.properties" name="dependency.properties"
value="${env.PROJECT_BUILDERS}/${projectname}/${env.RELENG}/${dependencyFileLocation}"/> value="${env.PROJECT_BUILDERS}/${projectname}/${env.RELENG}/${dependencyFileLocation}"/>
...@@ -70,13 +60,10 @@ ...@@ -70,13 +60,10 @@
<property <property
name="testRoot" name="testRoot"
value="${build.home}/testRoot/"/> value="${build.home}/testRoot/"/>
<!-- don't delete automatically <!-- don't delete automatically <delete quiet="true" dir="${testRoot}"
<delete quiet="true" failonerror="false"/> -->
dir="${testRoot}"
failonerror="false"/>
-->
<mkdir dir="${testRoot}"/> <mkdir dir="${testRoot}"/>
<condition property="installed"> <condition property="installed">
<available <available
...@@ -189,7 +176,7 @@ ...@@ -189,7 +176,7 @@
<property <property
name="testRoot" name="testRoot"
value="${testRoot}"/> value="${testRoot}"/>
<!-- if not otherwise set, assume all tests --> <!-- if not otherwise set, assume all tests -->
<property <property
name="testTarget" name="testTarget"
value="all"/> value="all"/>
...@@ -206,7 +193,8 @@ ...@@ -206,7 +193,8 @@
<property <property
name="testRoot" name="testRoot"
value="${build.home}/testRoot"/> value="${build.home}/testRoot"/>
<delete quiet="true" <delete
quiet="true"
dir="${testRoot}" dir="${testRoot}"
failonerror="false"/> failonerror="false"/>
</target> </target>
......
...@@ -150,7 +150,8 @@ ...@@ -150,7 +150,8 @@
<property <property
name="testRoot" name="testRoot"
value="${build.home}/testRoot"/> value="${build.home}/testRoot"/>
<delete quiet="true" <delete
quiet="true"
dir="${testRoot}" dir="${testRoot}"
failonerror="false"/> failonerror="false"/>
</target> </target>
......
...@@ -86,7 +86,8 @@ ...@@ -86,7 +86,8 @@
deleting WTP builder project location: <BUILD deleting WTP builder project location: <BUILD
HOME>/projectBuilders/<project>/webtools.releng/releng.wtpbuilder HOME>/projectBuilders/<project>/webtools.releng/releng.wtpbuilder
--> -->
<delete quiet="true" <delete
quiet="true"
dir="${codir}/${env.RELENG_BUILDER}" dir="${codir}/${env.RELENG_BUILDER}"
failonerror="true"/> failonerror="true"/>
<!-- <!--
...@@ -127,7 +128,8 @@ ...@@ -127,7 +128,8 @@
if="doClean"> if="doClean">
<echo message="Version tag for ${env.RELENG}: ${mapVersionTag}"/> <echo message="Version tag for ${env.RELENG}: ${mapVersionTag}"/>
<delete quiet="true" <delete
quiet="true"
dir="${codir}/${env.RELENG}" dir="${codir}/${env.RELENG}"
failonerror="true"/> failonerror="true"/>
<cvs <cvs
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment