From b676cc54e88832137e52dcb597ccd9e7a177c3ce Mon Sep 17 00:00:00 2001
From: david_williams <david_williams>
Date: Tue, 5 Apr 2011 01:50:04 +0000
Subject: [PATCH] 303564 - Run performance tests against the WTP

---
 .../distribution/wtp.tests/perfbuild.xml      |  303 +++--
 .../standaloneTest/eclipsePerfTests.xml       | 1202 +++++++++++++++++
 .../scripts/standaloneTest/instructions.txt   |    4 +-
 .../standaloneTest/runEclipsePerfTests.bat    |   59 +
 .../scripts/standaloneTest/runtest.bat        |   56 +-
 .../standaloneTest/standalonePerfTest.xml     |   36 +-
 .../scripts/standaloneTest/standaloneTest.xml |    3 +-
 .../standaloneTest/standalonecheckout.xml     |    6 +-
 8 files changed, 1507 insertions(+), 162 deletions(-)
 create mode 100644 releng.wtpbuilder/scripts/standaloneTest/eclipsePerfTests.xml
 create mode 100644 releng.wtpbuilder/scripts/standaloneTest/runEclipsePerfTests.bat

diff --git a/releng.wtpbuilder/distribution/wtp.tests/perfbuild.xml b/releng.wtpbuilder/distribution/wtp.tests/perfbuild.xml
index d185510b8..7fe9b130c 100644
--- a/releng.wtpbuilder/distribution/wtp.tests/perfbuild.xml
+++ b/releng.wtpbuilder/distribution/wtp.tests/perfbuild.xml
@@ -1,18 +1,15 @@
 <project
     name="Build specific targets and properties"
     default="runTest">
-    <!--
-        Note to be cross-platform, "environment variables" are only
-        appropriate for some variables, e.g. ones we set, since
-        properties are case sensitive, even if the environment variables
-        on your operating system are not, e.g. it will be ${env.Path}
-        not ${env.PATH} on Windows
-    -->
+	<!-- Note to be cross-platform, "environment variables" are only appropriate 
+		for some variables, e.g. ones we set, since properties are case sensitive, 
+		even if the environment variables on your operating system are not, e.g. 
+		it will be ${env.Path} not ${env.PATH} on Windows -->
     <property environment="env"/>
     <fail
         message="testRoot must be set for this task"
         unless="testRoot"/>
-    <!-- required to get proper value of dropinsFolder -->
+	<!-- required to get proper value of dropinsFolder -->
     <property
         name="keyCfgFile"
         value="${env.PROJECT_BUILDERS}/${projectname}/${env.RELENG}/maps/build.cfg"/>
@@ -20,18 +17,13 @@
         level="info"
         message="keyCfgFile: ${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
         name="buildLabel"
         value="${buildType}-${buildId}-${timestamp}"/>
 
 
-    <!-- 
-      Steps to do after the build is done. 
-    -->
+	<!-- Steps to do after the build is done. -->
     <target name="test">
         <dirname
             file="${ant.file}"
@@ -42,9 +34,7 @@
             dir="${currentDirectory}"/>
     </target>
 
-    <!-- 
-        Steps to do to test the build results
-    -->
+	<!-- Steps to do to test the build results -->
     <target name="runTest">
         <dirname
             file="${ant.file}"
@@ -57,9 +47,8 @@
             unless="testRoot"/>
         <mkdir dir="${testRoot}"/>
 
-        <!-- if results already exist, delete them -->
+		<!-- if results already exist, delete them -->
         <delete
-       quiet="true"
             dir="${testRoot}/results"
             failOnError="false"/>
         <mkdir dir="${testRoot}/results"/>
@@ -80,77 +69,161 @@
         <fail
             message="dependency file not found: ${dependency.properties}"
             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
-            antfile="${test.component.dir}/testdependency.xml"
+            antfile="${test.dependency}"
             target="get">
             <property
                 name="base.install.dir"
                 value="${testRoot}"/>
+            <property
+                name="tobeinstalled.properties"
+                value="${wtp.builder.home}/distribution/${build.distribution}.tests/tobeInstalled.properties"/>
+            <property
+                name="installWorkingDirectory"
+                value="${testRoot}"/>
         </ant>
-        <antcall target="unzipTests"/>
-        <antcall target="runTestEclipse">
-            <param
-                name="testTarget"
-                value="all"/>
-        </antcall>
-        <antcall target="postRunTestEclipse">
-            <param
-                name="testTarget"
-                value="all"/>
+        <echo message="Done setting up WTP"/>
+
+		<!--We use the eclipse performance framework to run and install tests. 
+			This is no longer needed but it should stay just in case it is needed later. 
+			<antcall target="installTests"/> <antcall target="runTestEclipse"> <param 
+			name="testTarget" value="all"/> </antcall> <antcall target="postRunTestEclipse"> 
+			<param name="testTarget" value="all"/> </antcall> -->
+    </target>
+    <target name="installTests">
+
+		<!-- hard code for now <antcall target="installTestsFromZips"> <param name="compName" 
+			value="patches32x"/> </antcall> -->
+        <antcall target="installTestsFromRepo">
         </antcall>
+
+
     </target>
-    <target name="unzipTests">
-        <!--
-            unzip the builds and junit tests we use 'unzip' here, so we
-            can continue on error, if desired. (such as if zip was not
-            created, due to other failures or options).
-        -->
-        <exec
-            dir="${buildDirectory}/${buildLabel}"
-            executable="unzip"
-            failonerror="true">
-            <arg line="-o -qq wtp-sdk-${buildLabel}.zip -d ${testRoot}${dropinsFolder}"/>
-        </exec>
+    <target
+        name="installTestsFromZips"
+        depends="init">
+
+		<!-- a bit hard coded here, will need work for general case -->
+        <property
+            name="zipFile"
+            value="${compName}-${buildLabel}.zip"/>
+
+
+		<!-- We use the exec method for unzip, so we won't fail if a prereq can 
+			not be unzipped for some reason. See https://bugs.eclipse.org/bugs/show_bug.cgi?id=283968 -->
+        <mkdir dir="${install.destination}"/>
         <exec
-            dir="${buildDirectory}/${buildLabel}"
-            executable="unzip"
-            failonerror="false">
-            <arg line="-o -qq wtp-wst-Automated-Tests-${buildLabel}.zip -d ${testRoot}${dropinsFolder}"/>
+            dir="."
+            executable="unzip">
+            <arg line="-o -qq ${buildDirectory}/${buildLabel}/${zipFile} -d ${install.destination}/${compName}"/>
         </exec>
-        <exec
-            dir="${buildDirectory}/${buildLabel}"
-            executable="unzip"
+
+    </target>
+
+    <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">
-            <arg line="-o -qq wtp-jst-Automated-Tests-${buildLabel}.zip -d ${testRoot}${dropinsFolder}"/>
-        </exec>
-        <exec
-            dir="${buildDirectory}/${buildLabel}"
-            executable="unzip"
+        </copy>
+
+        <antcall target="handleFailedInstall"/>
+
+
+    </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">
-            <arg line="-o -qq wtp-jpt-sdk-${buildLabel}.zip -d ${testRoot}${dropinsFolder}"/>
-        </exec>
-        <exec
-            dir="${buildDirectory}/${buildLabel}"
-            executable="unzip"
-            failonerror="true">
-            <arg line="-o -qq wtp-jpt-Automated-Tests-${buildLabel}.zip -d ${testRoot}${dropinsFolder}"/>
-        </exec>
+        </copy>
+
+        <fail
+            message="installation of tests failed. See p2DirectorInstall.log.txt."
+            if="p2DirectorInstallResult"/>
+
     </target>
-    <!--
-        time out may need to be set/adjust for api or performance tests?
-        This testTimeLimit is the whole, overall limit on tests. There's
-        a shorter one for individual suites. some common values, of
-        milliseconds to more recognizable units: 
-        18000000: 5 hours
-        14400000: 4 hours
-        7200000: 2 hours 
-        3600000: 1 hour  
-        1800000: 30 minutes 
-        600000: 10 minutes
-    -->
+	<!-- time out may need to be set/adjust for api or performance tests? This 
+		testTimeLimit is the whole, overall limit on tests. There's a shorter one 
+		for individual suites. some common values, of milliseconds to more recognizable 
+		units: 18000000: 5 hours 14400000: 4 hours 7200000: 2 hours 3600000: 1 hour 
+		1800000: 30 minutes 600000: 10 minutes -->
     <property
         name="testTimeLimit"
-        value="36000000"/>
+        value="28800000"/>
     <property
         name="testFailOnError"
         value="false"/>
@@ -160,18 +233,14 @@
         <property
             name="test-vm"
             value="${env.JAVA_6_HOME}/bin/java"/>
-       <!--
-            set path to eclipse folder. If local folder, use '.';
-            otherwise, use c:\path\to\eclipse or /path/to/eclipse/
-        -->
+		<!-- set path to eclipse folder. If local folder, use '.'; otherwise, use 
+			c:\path\to\eclipse or /path/to/eclipse/ -->
         <property
             name="eclipse.home"
             value="${testRoot}"/>
         <echo message="testTarget: ${testTarget}"/>
-        <!--
-            can not pass in empty values in jvmargs so if not testBundle
-            specified, we'll pass a junk (unused) value
-        -->
+		<!-- can not pass in empty values in jvmargs so if not testBundle specified, 
+			we'll pass a junk (unused) value -->
         <condition
             property="testBundleParam"
             value="-DtestBundle=${testBundle}"
@@ -179,28 +248,19 @@
             <isset property="testBundle"/>
         </condition>
         <echo message="Running junits"/>
-        <!--
-            If there is not exactly one launcher in the stack, we'd best
-            fail fast, since we are not expecting that, and may indicate
-            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" /> </fileset>
-            </resourcecount> </condition> <fail message="Did not find
-            expected number of launcher jars. Check installation."
-            unless="expectedNumberOfLaunchers" />
-        -->
-
-        <condition
-            property="antQuietValue"
-            value="-quiet"
-            else="">
-            <istrue value="${env.USE_QUIET}"/>
-        </condition>
+		<!-- If there is not exactly one launcher in the stack, we'd best fail 
+			fast, since we are not expecting that, and may indicate 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" 
+			/> </fileset> </resourcecount> </condition> <fail message="Did not find expected 
+			number of launcher jars. Check installation." unless="expectedNumberOfLaunchers" 
+			/> -->
+		<!-- Remember: using dash 'debug' for org.eclipse.ant.core.antRunner produces 
+			ant debug info to be output ... which is a TON of stuff. Even 'verbose' is 
+			a bit too much. -->
+        <echo message="eclipse.launcher: ${eclipse.launcher}"/>
         <java
             taskname="unit-test-masterprocess"
             fork="true"
@@ -224,7 +284,6 @@
             <jvmarg value="-DbuildBranch=${buildBranch}"/>
             <jvmarg value="-DbuildType=${buildType}"/>
             <jvmarg value="-DdependencyFileLocation=${dependencyFileLocation}"/>
-
             <jvmarg value="-DbuildId=${buildId}"/>
             <jvmarg value="-Dprojectname=${projectname}"/>
             <jvmarg value="-Djava.io.tmpdir=${env.RECOMMENDED_TMP_DIR}"/>
@@ -238,14 +297,13 @@
             <arg value="${testRoot}/overallTestWorkspace"/>
             <arg value="-application"/>
             <arg value="org.eclipse.ant.core.antRunner"/>
-            <arg value="${antQuietValue}"/>
             <arg value="-logger"/>
             <arg value="org.apache.tools.ant.DefaultLogger"/>
             <arg value="-file"/>
             <arg value="${testRoot}/perftest.xml"/>
             <arg value="${testTarget}"/>
 
-            <!--  make sure our forked env has a DISPLAY -->
+			<!-- make sure our forked env has a DISPLAY -->
             <env
                 key="DISPLAY"
                 value="${env.DISPLAY}"/>
@@ -259,10 +317,8 @@
             <jvmarg value="-DtestRoot=${testRoot}"/>
             <jvmarg value="-DtestDir=${testRoot}"/>
             <jvmarg value="-DeclipseBuilderDirectory=${pde.builder.path}"/>
-            <!-- IBM_JAVA_OPTIONS contains JIT work arounds for bug 284441 -->
-            <env
-                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)"/>
+			<!-- IBM_JAVA_OPTIONS contains JIT work arounds for bug 284441 <env 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>
         <echo message="wtpmasterjunitresult ${wtpmasterjunitresult}"/>
     </target>
@@ -311,5 +367,26 @@
                 <include name="*.html"/>
             </fileset>
         </copy>
+        <copy
+            todir="${buildDirectory}/${buildLabel}/testResults/"
+            overwrite="true"
+            failonerror="false">
+            <fileset dir="${testRoot}/results/">
+                <include name="*.html"/>
+            </fileset>
+        </copy>
     </target>
+
+    <target name="init">
+
+        <echo message="dropinsFolder: ${dropinsFolder} "/>
+        <condition
+            property="install.destination"
+            value="${testRoot}${dropinsFolder}/"
+            else="${testRoot}/eclipse">
+            <isset property="dropinsFolder"/>
+        </condition>
+
+    </target>
+
 </project>
\ No newline at end of file
diff --git a/releng.wtpbuilder/scripts/standaloneTest/eclipsePerfTests.xml b/releng.wtpbuilder/scripts/standaloneTest/eclipsePerfTests.xml
new file mode 100644
index 000000000..eea9c3b6d
--- /dev/null
+++ b/releng.wtpbuilder/scripts/standaloneTest/eclipsePerfTests.xml
@@ -0,0 +1,1202 @@
+<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>
+
diff --git a/releng.wtpbuilder/scripts/standaloneTest/instructions.txt b/releng.wtpbuilder/scripts/standaloneTest/instructions.txt
index fe60ad23f..62c93b83d 100644
--- a/releng.wtpbuilder/scripts/standaloneTest/instructions.txt
+++ b/releng.wtpbuilder/scripts/standaloneTest/instructions.txt
@@ -1,12 +1,12 @@
 
 [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 
 the "runtest" scripts to point to their installation: 
   ant 
-  java 
+  java 6
 
 Your machine must have the following software installed and available to 
 be executed from the path: 
diff --git a/releng.wtpbuilder/scripts/standaloneTest/runEclipsePerfTests.bat b/releng.wtpbuilder/scripts/standaloneTest/runEclipsePerfTests.bat
new file mode 100644
index 000000000..bcde67a0d
--- /dev/null
+++ b/releng.wtpbuilder/scripts/standaloneTest/runEclipsePerfTests.bat
@@ -0,0 +1,59 @@
+@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
diff --git a/releng.wtpbuilder/scripts/standaloneTest/runtest.bat b/releng.wtpbuilder/scripts/standaloneTest/runtest.bat
index 31f86581a..d48f8424a 100644
--- a/releng.wtpbuilder/scripts/standaloneTest/runtest.bat
+++ b/releng.wtpbuilder/scripts/standaloneTest/runtest.bat
@@ -1,6 +1,6 @@
 
 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
 SETLOCAL
 
@@ -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 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 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                   (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 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-checkout goto chk
 if x%1==x-performance goto perf
 goto hlp
 
 :chk
- echo Running standalonecheckout.xml
+echo Running standalonecheckout.xml
 call ant ^
-      -Dprojectname=wtp-M3.2.3 ^
-      -DbuildType=M ^
+      -Dprojectname=wtp-R3.2.3 ^
+      -DbuildType=R ^
       -DbuildId=3.2.3 ^
-      -Dtimestamp=20110121005429 ^
-      -DmapVersionTag=vM20110121005429 ^
+      -Dtimestamp=20110217214612 ^
+      -DmapVersionTag=R3_2_3 ^
       -Dbuild.stream=R3.2.3 ^
       -DbuildBranch=R3.2.3 ^
       -f standalonecheckout.xml
 
-
 goto exit
 
 
 :func
 
 echo Running standaloneTest.xml
-call ant  ^
-      -Dprojectname=wtp-M3.2.3 ^
-      -DbuildType=M ^
+call ant ^
+      -Dprojectname=wtp-R3.2.3 ^
+      -DbuildType=R ^
       -DbuildId=3.2.3 ^
-      -Dtimestamp=20110121005429 ^
+      -Dtimestamp=20110217214612 ^
       -Dbuild.stream=R3.2.3 ^
       -DbuildBranch=R3.2.3 ^
      -f standaloneTest.xml 
 goto exit
 
-:onesuite
+:funcSuite
 
 echo Example Running standaloneTest.xml and running only one suite
 call ant  ^
@@ -124,19 +124,35 @@ goto exit
 
 :perf
 echo Running standalonePerfTest.xml
-call ant  ^
-      -Dprojectname=wtp-M3.2.3 ^
-      -DbuildType=M ^
+call ant ^
+      -Dprojectname=wtp-R3.2.3 ^
+      -DbuildType=R ^
       -DbuildId=3.2.3 ^
-      -Dtimestamp=20110121005429 ^
+      -Dtimestamp=20110217214612 ^
       -Dbuild.stream=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
 
 :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
 ENDLOCAL
diff --git a/releng.wtpbuilder/scripts/standaloneTest/standalonePerfTest.xml b/releng.wtpbuilder/scripts/standaloneTest/standalonePerfTest.xml
index a720d10cf..a095e4d9c 100644
--- a/releng.wtpbuilder/scripts/standaloneTest/standalonePerfTest.xml
+++ b/releng.wtpbuilder/scripts/standaloneTest/standalonePerfTest.xml
@@ -2,18 +2,12 @@
     name="standalonePerfTest"
     default="standalonePerfTest"
     basedir=".">
-    <!--
-        Required inputs: build.home buildType buildId timestamp
-        build.stream [optional] build.committers [optional] testTarget
-        [optional]
-    -->
+	<!-- 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.
-    -->
+	<!-- 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}"/>
 
 
@@ -31,7 +25,7 @@
     <echo
         level="info"
         message="keyCfgFile: ${keyCfgFile}"/>
-    <!-- required to get proper value of dropinsFolder -->
+	<!-- required to get proper value of dropinsFolder -->
     <property file="${keyCfgFile}"/>
     <fail
         message="testRoot must be set for this task"
@@ -48,11 +42,7 @@
         name="buildDirectory"
         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
         name="dependency.properties"
         value="${env.PROJECT_BUILDERS}/${projectname}/${env.RELENG}/${dependencyFileLocation}"/>
@@ -70,13 +60,10 @@
         <property
             name="testRoot"
             value="${build.home}/testRoot/"/>
-            <!-- don't delete automatically
-        <delete quiet="true"
-            dir="${testRoot}"
-            failonerror="false"/>
-             -->
+		<!-- don't delete automatically <delete quiet="true" dir="${testRoot}" 
+			failonerror="false"/> -->
         <mkdir dir="${testRoot}"/>
-           
+
 
         <condition property="installed">
             <available
@@ -189,7 +176,7 @@
             <property
                 name="testRoot"
                 value="${testRoot}"/>
-            <!-- if not otherwise set, assume all tests -->
+			<!-- if not otherwise set, assume all tests -->
             <property
                 name="testTarget"
                 value="all"/>
@@ -206,7 +193,8 @@
         <property
             name="testRoot"
             value="${build.home}/testRoot"/>
-        <delete quiet="true"
+        <delete
+            quiet="true"
             dir="${testRoot}"
             failonerror="false"/>
     </target>
diff --git a/releng.wtpbuilder/scripts/standaloneTest/standaloneTest.xml b/releng.wtpbuilder/scripts/standaloneTest/standaloneTest.xml
index e6d8aec70..9eacf12f3 100644
--- a/releng.wtpbuilder/scripts/standaloneTest/standaloneTest.xml
+++ b/releng.wtpbuilder/scripts/standaloneTest/standaloneTest.xml
@@ -150,7 +150,8 @@
         <property
             name="testRoot"
             value="${build.home}/testRoot"/>
-        <delete quiet="true"
+        <delete
+            quiet="true"
             dir="${testRoot}"
             failonerror="false"/>
     </target>
diff --git a/releng.wtpbuilder/scripts/standaloneTest/standalonecheckout.xml b/releng.wtpbuilder/scripts/standaloneTest/standalonecheckout.xml
index c5cb41b2b..6012ef807 100644
--- a/releng.wtpbuilder/scripts/standaloneTest/standalonecheckout.xml
+++ b/releng.wtpbuilder/scripts/standaloneTest/standalonecheckout.xml
@@ -86,7 +86,8 @@
             deleting WTP builder project location: <BUILD
             HOME>/projectBuilders/<project>/webtools.releng/releng.wtpbuilder
         -->
-        <delete quiet="true"
+        <delete
+            quiet="true"
             dir="${codir}/${env.RELENG_BUILDER}"
             failonerror="true"/>
         <!--
@@ -127,7 +128,8 @@
         if="doClean">
         <echo message="Version tag for ${env.RELENG}: ${mapVersionTag}"/>
 
-        <delete quiet="true"
+        <delete
+            quiet="true"
             dir="${codir}/${env.RELENG}"
             failonerror="true"/>
         <cvs
-- 
GitLab