Updated for recent changes to the builder.
diff --git a/releng.wtpbuilder/distribution/dali.tests/testScripts/junit-tests.xml b/releng.wtpbuilder/distribution/dali.tests/testScripts/junit-tests.xml
index d2109f6..20c2e41 100644
--- a/releng.wtpbuilder/distribution/dali.tests/testScripts/junit-tests.xml
+++ b/releng.wtpbuilder/distribution/dali.tests/testScripts/junit-tests.xml
@@ -3,37 +3,281 @@
     name="JUnit tests"
     basedir=".">
 
-    <property
-        name="library-xml-file"
-        value="${basedir}/plugins/org.eclipse.test_3.1.0/library.xml" />
-    <import file="${library-xml-file}" />
+    <property environment="env" />
 
-    <target name="core-test">
+    <target name="init">
+        <!--
+            Parameters:
+            (Mandatory)
+            data-dir                - the workspace directory for Eclipse to write its data
+            plugin-name             - symboic name of the plugin to test
+            testPlugin				- directory name of plugin (with version suffix)
+            classname               - the name of the test class
+            
+            (Optional - overrides defaults set in script)
+            extraVMargs             - allows separate setting of VM args from separate caller.
+            timeout                 - overrides default test timeout value (in milliseconds).
+        -->
+
+        <property
+            name="junit-report-output"
+            value="${testRoot}/results" />
+        <mkdir dir="${junit-report-output}/raw" />
+
+
+        <!-- if not otherwise set, be sure extraVMargs is at least empty string -->
         <property
             name="extraVMargs"
             value="" />
-        <antcall target="eclipse-test">
-            <param
+
+        <!-- if not otherwise set, use a unique workspace name -->
+        <property
+            name="data-dir"
+            value="${testRoot}/junitworkspaces/workspace-${classname}" />
+
+        <property
+            name="testRoot"
+            value="${testRoot}" />
+        <property
+            name="timeout"
+            value="1800000" />
+        <property
+            name="junit-report-output"
+            value="${junit-report-output}" />
+        <property
+            name="plugin-path"
+            value="${testRoot}/plugins/${testPlugin}" />
+        <property
+            name="formatter"
+            value="org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter" />
+        <property
+            name="test-output"
+            value="${junit-report-output}/raw/${classname}.xml" />
+        <property
+            name="jvm"
+            value="${env.JAVA_5_HOME}/bin/java" />
+
+        <dirname
+            file="${ant.file}"
+            property="currentDir" />
+
+
+        <echo
+            level="debug"
+            message="data-dir: ${data-dir}" />
+        <echo
+            level="debug"
+            message="plugin-name: ${plugin-name}" />
+        <echo
+            level="debug"
+            message="testPlugin: ${testPlugin}" />
+        <echo
+            level="debug"
+            message="classname: ${classname}" />
+        <echo
+            level="debug"
+            message="extraVMargs: ${extraVMargs}" />
+        <echo
+            level="debug"
+            message="timeout: ${timeout}" />
+        <echo
+            level="debug"
+            message="testRoot: ${testRoot}" />
+
+        <echo
+            level="debug"
+            message="basedir: ${basedir}" />
+        <echo
+            level="debug"
+            message="eclipse-home: ${eclipse-home}" />
+        <echo
+            level="debug"
+            message="plugin-path: ${plugin-path}" />
+        <echo
+            level="debug"
+            message="junit-report-output: ${junit-report-output}" />
+        <echo
+            level="debug"
+            message="test-output: ${test-output}" />
+        <echo
+            level="debug"
+            message="buildDirectory: ${buildDirectory}" />
+        <echo
+            level="debug"
+            message="buildLabel: ${buildLabel}" />
+        <echo
+            level="debug"
+            message="jvm: ${env.JAVA_5_HOME}/bin/java" />
+
+    </target>
+
+	
+    <target
+        name="core-test"
+        depends="init">
+        <echo
+            level="info"
+            message="test-type: core-test" />
+        <ant
+            antfile="${ant.file}"
+            dir="${currentDir}"
+            target="eclipse-test">
+            <property
                 name="application"
                 value="org.eclipse.test.coretestapplication" />
-            <param
-                name="extraVMargs"
-                value="${extraVMargs} -Dwtp.autotest.noninteractive=true" />
-        </antcall>
+        </ant>
     </target>
 
-    <target name="ui-test">
-        <property
-            name="extraVMargs"
-            value="" />
-        <antcall target="eclipse-test">
-            <param
+
+    <target
+        name="ui-test"
+        depends="init">
+        <echo
+            level="info"
+            message="test-type: ui-test" />
+        <ant
+            antfile="${ant.file}"
+            dir="${currentDir}"
+            target="eclipse-test">
+            <property
                 name="application"
                 value="org.eclipse.test.uitestapplication" />
-            <param
-                name="extraVMargs"
-                value="${extraVMargs} -Dwtp.autotest.noninteractive=true" />
-        </antcall>
+        </ant>
     </target>
 
+    <target
+        name="eclipse-test"
+        description="Runs the specified classname as a plug-in test.">
+
+        <echo
+            level="info"
+            message="Running ${classname}" />
+        <echo
+            level="debug"
+            message="Result file: ${junit-report-output}/${classname}.xml." />
+        <echo
+            level="debug"
+            message="DISPLAY: ${env.DISPLAY}" />
+
+        <!-- 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" />
+        -->
+        <java
+            taskname="suiteUnitTest"
+            fork="true"
+            resultProperty="suitejunitresult"
+            failonerror="false"
+            timeout="${timeout}"
+            dir="${testRoot}/eclipse"
+            jvm="${env.JAVA_5_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="-Xms256m" />
+            <jvmarg value="-Xmx1024m" />
+
+            <jvmarg value="-Dosgi.ws=${env.BASEWS}" />
+            <jvmarg value="-Dosgi.os=${env.BASEOS}" />
+            <jvmarg value="-Dosgi.arch=${env.BASEARCH}" />
+            <jvmarg value="-DbuildLabel=${buildLabel}" />
+            <jvmarg value="-DbuildDirectory=${buildDirectory}" />
+        	
+        	  <jvmarg value="-Djava.protocol.handler.pkgs=com.ibm.etools.www.protocol" />
+            <jvmarg value="-DurlLogLocation=${buildDirectory}/outgoinghttplogfromtests.log" />
+
+            <jvmarg value="-Dwtp.autotest.noninteractive=true" />
+            <jvmarg value="-Dosgi.clean=true" />
+            <jvmarg value="-DPLUGIN_PATH=${plugin-path}" />
+            <jvmarg line="${extraVMargs}" />
+
+            <arg value="-nosplash" />
+            <arg value="-consolelog" />
+            <arg value="-debug" />
+            <arg value="-data" />
+            <arg value="${data-dir}" />
+            <arg value="-application" />
+            <arg value="${application}" />
+            <arg value="formatter=${formatter},${test-output}" />
+            <arg value="-testPluginName" />
+            <arg value="${plugin-name}" />
+            <arg value="-className" />
+            <arg value="${classname}" />
+            <env
+                key="DISPLAY"
+                value="${env.DISPLAY}" />
+            <redirector
+                output="${junit-report-output}/${classname}.output.txt"
+                error="${junit-report-output}/${classname}.error.txt" />
+        </java>
+
+
+
+
+
+
+        <antcall target="collect-results" />
+
+        <echo
+            level="info"
+            message="suitejunitresult: ${suitejunitresult}" />
+
+    </target>
+
+    <target name="collect-results">
+        <dirname
+            property="output-dir"
+            file="${test-output}" />
+        <basename
+            property="output-file-name"
+            file="${test-output}" />
+        <mkdir dir="${junit-report-output}/xml" />
+        <junitreport
+            todir="${junit-report-output}/xml"
+            tofile="${classname}.xml">
+            <fileset dir="${output-dir}">
+                <include name="${output-file-name}" />
+            </fileset>
+        </junitreport>
+
+        <mkdir dir="${junit-report-output}/html" />
+        <xslt
+            style="${testRoot}/JUNIT.XSL"
+            basedir="${junit-report-output}"
+            includes="${classname}.xml"
+            destdir="${junit-report-output}/html" />
+
+
+        <copy
+            file="${data-dir}/.metadata/.log"
+            toFile="${testRoot}/results/consolelogs/metadata-logs/${classname}.workspace.log"
+            overwrite="true"
+            failonError="false" />
+
+        <!-- todo: this, especially, should be concat (there could be more than one, in theory) -->
+        <copy
+            file="${testRoot}/eclipse/configuration/*.log"
+            toFile="${testRoot}/results/consolelogs/configuration-logs/${classname}.config.log"
+            overwrite="true"
+            failonError="false" />
+
+    </target>
+
+
 </project>
diff --git a/releng.wtpbuilder/distribution/dali.tests/testScripts/test.xml b/releng.wtpbuilder/distribution/dali.tests/testScripts/test.xml
index b22d57e..4e3a523 100644
--- a/releng.wtpbuilder/distribution/dali.tests/testScripts/test.xml
+++ b/releng.wtpbuilder/distribution/dali.tests/testScripts/test.xml
@@ -2,17 +2,32 @@
     name="Automated Eclipse Testing"
     default="all"
     basedir=".">
-
-    <!--properties file containing the plugin directory name including version number-->
-    <property file="testServer.properties" />
+    <echo
+        level="info"
+        message="starting Automated Eclipse Testing" />
+    <echo
+        level="debug"
+        message="basedir: ${basedir}" />
+    <echo
+        level="debug"
+        message="testRoot: ${testRoot}" />
+    <fail
+        message="testRoot must be set"
+        unless="testRoot" />
+	
+    <property environment="env" />
+    <!--properties file containing the Dali tests plugin names and versions -->
+    <property
+        file="${env.LOCAL_BUILD_PROPERTIES_DIR}/daliTestPluginsVersions.properties" />
 
     <!--properties file containing the build information-->
-    <property file="label.properties" />
+    <property
+        file="${buildDirectory}/label.properties" />
 
     <!--default directory where test-eclipse will be installed-->
     <property
         name="install"
-        value="${basedir}" />
+        value="${testRoot}" />
 
     <!--name that can be added to report name to identify which platform tests results come from-->
     <property
@@ -22,36 +37,43 @@
     <!-- The root of the eclipse installation -->
     <property
         name="eclipse-home"
-        value="${install}/eclipse" />
+        value="${testRoot}/eclipse" />
 
     <!-- The directory that will contain the xml and html results from the tests that are run -->
     <property
         name="results"
-        value="${basedir}/results" />
+        value="${testRoot}/results" />
 
-    <target name="init">
-
+    <target
+        name="init">
+<!--
+        <antcall
+            target="computePluginVersion" />
+-->
+        <property
+            file="${testRoot}/test2.properties" />
     </target>
-
+	
     <target
         name="setup"
         if="clean"
         description="Reinstall the test Eclipse installation if specified by user">
-        <delete dir="${install}" />
-        <mkdir dir="${install}" />
+        <delete
+            dir="${install}" />
+        <mkdir
+            dir="${install}" />
         <exec
             dir="."
             executable="unzip">
-            <arg line="-o -qq ../downloads/*.zip -d ${install}" />
+            <arg
+                line="-o -qq ../downloads/*.zip -d ${install}" />
         </exec>
-
         <exec
             dir="."
             executable="unzip">
             <arg
                 line="-o -qq  wtp-wst-tests-feature*.zip -d ${install}" />
         </exec>
-
     </target>
 
     <target
@@ -61,70 +83,46 @@
         <available
             file="${eclipse-home}/plugins/${testPlugin}/test.xml"
             property="test.xml.exists" />
-        <antcall target="runtests2" />
+        <antcall
+            target="runtests2" />
     </target>
-
     <target
         name="runtests2"
         if="test.xml.exists">
-        <antcall target="runtests-normal" />
-        <!--
-            <antcall target="runtests-runAsPerfApp"/>
-        -->
+        <antcall
+            target="runtests-normal" />
         <copy
             file="${eclipse-home}/${report}.xml"
             tofile="${results}/xml/${report}_${platform}.xml"
             failonerror="false" />
-        <antcall target="genHtml" />
+        <antcall
+            target="genHtml" />
     </target>
-
     <target
-        name="runtests-normal"
-        unless="runAsPerfApp">
+        name="runtests-normal">
         <ant
             antfile="${eclipse-home}/plugins/${testPlugin}/test.xml"
             dir="${eclipse-home}">
             <property
                 name="library-file"
-                value="${testDir}/junit-tests.xml" />
+                value="${testRoot}/junit-tests.xml" />
         </ant>
         <copy
             file="${eclipse-home}/${report}.xml"
             tofile="${results}/xml/${report}_${platform}.xml"
             failonerror="false" />
-        <antcall target="genHtml" />
+        <antcall
+            target="genHtml" />
     </target>
 
+    <!-- Dali tests -->
     <target
-        name="runtests-runAsPerfApp"
-        if="runAsPerfApp">
-        <ant
-            antfile="${eclipse-home}/plugins/${testPlugin}/test.xml"
-            dir="${eclipse-home}">
-            <property
-                name="library-file"
-                value="${testDir}/performance-tests.xml" />
-            <property
-                name="runAsPerfApp"
-                value="true" />
-        </ant>
-        <copy
-            file="${eclipse-home}/${report}.xml"
-            tofile="${results}/xml/${report}_${platform}.xml"
-            failonerror="false" />
-        <antcall target="genHtml" />
-    </target>
-
-    <target name="runperftests">
-        <antcall target="setupPerformance" />
-        <antcall target="runtests"></antcall>
-    </target>
-
-
-    <target
-        name="dali-utility-tests"
+        name="jpt-utility-tests"
+        depends="init"
         description="Runs the org.eclipse.jpt.utility.tests test.xml">
-        <antcall target="runtests">
+    	<echo message="Running target=runtests - testPlugin=${org.eclipse.jpt.utility.tests}" />
+        <antcall
+            target="runtests">
             <param
                 name="testPlugin"
                 value="${org.eclipse.jpt.utility.tests}" />
@@ -133,11 +131,13 @@
                 value="org.eclipse.jpt.utility.tests" />
         </antcall>
     </target>
-
+	
     <target
         name="dali-core-tests"
         description="Runs the org.eclipse.jpt.core.tests test.xml">
-        <antcall target="runtests">
+    	<echo message="Running target=runtests - testPlugin=${org.eclipse.jpt.core.tests}" />
+        <antcall
+            target="runtests">
             <param
                 name="testPlugin"
                 value="${org.eclipse.jpt.core.tests}" />
@@ -147,73 +147,49 @@
         </antcall>
     </target>
 
+	<!-- releng Tests -->
+    <target
+        name="releng-tests"
+        depends="init"
+        description="Runs the releng tests.">
+        <antcall
+            target="runtests">
+            <param
+                name="testPlugin"
+                value="${org.eclipse.wtp.releng.tests}" />
+            <param
+                name="report"
+                value="org.eclipse.wtp.releng.tests" />
+        </antcall>
+    </target>
 
+	<!-- Target: all -->
     <target
         name="all"
         depends="init">
         <echo
             level="info"
-            message="Starting Dali Unit Tests" />
+            message="Starting releng tests" />
+        <antcall
+            target="releng-tests" />
 
         <echo
             level="info"
-            message="Starting dali-utility-tests" />
-        <antcall target="dali-utility-tests" />
+            message="Starting JPT Unit Tests" />
+        <echo
+            level="info"
+            message="Starting jpt-utility-tests" />
+        <antcall
+            target="jpt-utility-tests" />
 
         <echo
             level="info"
             message="Starting dali-core-tests" />
-        <antcall target="dali-core-tests" />
-
+        <antcall
+            target="dali-core-tests" />
         <echo
             level="info"
-            message="Ended Dali Unit Tests" />
-    </target>
-
-
-    <target name="setupPerformance">
-        <delete dir="${perfDir}" />
-        <mkdir dir="${perfDir}" />
-        <ant
-            antfile="buildAll.xml"
-            dir="${build.home}/org.eclipse.wtp.releng"
-            target="getPreReq" />
-        <ant
-            antfile="buildAll.xml"
-            dir="${build.home}/org.eclipse.wtp.releng"
-            target="setupTestEclipse">
-            <property
-                name="testDir"
-                value="${perfDir}" />
-        </ant>
-        <ant
-            antfile="buildAll.xml"
-            dir="${build.home}/org.eclipse.wtp.releng"
-            target="setupPerformance" />
-    </target>
-
-    <target
-        name="performance"
-        depends="init">
-        <!--
-            <antcall target="all">
-            <param name="runAsPerfApp" value="true"/>
-            </antcall>
-        -->
-        <antcall target="wst-common-perfTests" />
-        <antcall target="wst-wsdl-perfTests" />
-        <antcall target="wst-server-perfTests" />
-        <antcall target="jst-server-tomcat-perfTests" />
-        <antcall target="jst-jsp-perfTests" />
-        <antcall target="wst-xml-perfTests" />
-        <antcall target="wst-html-perfTests" />
-        <antcall target="wst-css-perfTests" />
-        <antcall target="jst-ws-perfTests" />
-        <antcall target="wst-xsd-perfTests" />
-        <antcall target="jst-j2ee-perfTests" />
-        <!--
-            <antcall target="genPerfGraphs" />
-        -->
+            message="Ended JPT Unit Tests" />
     </target>
 
     <target
@@ -225,94 +201,29 @@
             basedir="${results}/xml"
             destdir="${results}/html" />
     </target>
-
+	
     <target
-        name="genPerfGraphs"
-        description="Generates performance graphs">
-        <condition
-            property="osWindows"
-            value="true">
-            <os family="windows" />
-        </condition>
-        <condition
-            property="java.library.path"
-            value="${eclipseBuilderDirectory}/swt-win32">
-            <os family="windows" />
-        </condition>
-        <condition
-            property="swt.library.path"
-            value="${eclipseBuilderDirectory}/swt-linux-motif">
-            <os family="unix" />
-        </condition>
-        <antcall target="genPerfGraphsWindows" />
-        <antcall target="genPerfGraphsLinux" />
-    </target>
-
-    <target
-        name="genPerfGraphsWindows"
-        if="osWindows">
+        name="computePluginVersion"
+        depends="test2properties"
+        unless="test2propertiesexists">
         <java
-            classname="org.eclipse.test.performance.ui.Main"
-            fork="true"
-            maxmemory="256m">
-            <arg
-                line="-baseline ${perf.ref.buildId} -current ${perf.buildId} -jvm ${perf.jvm} -config ${perf.config} -config.properties ${perf.config},${perf.config},${perf.config},${results}/graph/${perf.config} -output ${results}/graph" />
+            classname="org.eclipse.wtp.releng.test.ComputePluginVersion">
             <classpath>
-                <fileset dir="${eclipseBuilderDirectory}/plugins">
-                    <exclude name="**/*swt.motif*.jar" />
-                    <exclude name="**/*swt.gtk*.jar" />
-                    <include name="**/*.jar" />
-                </fileset>
-                <fileset dir="${build.home}/${cloudscapeLib}">
-                    <include name="**/*.jar" />
-                </fileset>
+                <pathelement
+                    location="ComputePluginVersion.jar" />
             </classpath>
-            <env
-                key="LD_LIBRARY_PATH"
-                value="${eclipseBuilderDirectory}/swt-win32" />
-            <sysproperty
-                key="PLUGIN_PATH"
-                value="${eclipseBuilderDirectory}/plugins/org.eclipse.test.performance.ui" />
-            <sysproperty
-                key="eclipse.perf.dbloc"
-                value="${build.home}/${perf.dbloc}" />
-            <sysproperty
-                key="java.library.path"
-                value="${eclipseBuilderDirectory}/swt-win32" />
+            <arg
+                value="${testRoot}/eclipse/plugins" />
+            <arg
+                value="${testRoot}/test2.properties" />
         </java>
     </target>
-
     <target
-        name="genPerfGraphsLinux"
-        unless="osWindows">
-        <java
-            classname="org.eclipse.test.performance.ui.Main"
-            fork="true"
-            maxmemory="256m">
-            <arg
-                line="-baseline ${perf.ref.buildId} -current ${perf.buildId} -jvm ${perf.jvm} -config ${perf.config} -config.properties ${perf.config},${perf.config},${perf.config},${results}/graph/${perf.config} -output ${results}/graph" />
-            <classpath>
-                <fileset dir="${eclipseBuilderDirectory}/plugins">
-                    <exclude name="**/*swt.win32*.jar" />
-                    <include name="**/*.jar" />
-                </fileset>
-                <fileset dir="${build.home}/${cloudscapeLib}">
-                    <include name="**/*.jar" />
-                </fileset>
-            </classpath>
-            <env
-                key="LD_LIBRARY_PATH"
-                value="${eclipseBuilderDirectory}/swt-linux-motif" />
-            <sysproperty
-                key="PLUGIN_PATH"
-                value="${eclipseBuilderDirectory}/plugins/org.eclipse.test.performance.ui" />
-            <sysproperty
-                key="eclipse.perf.dbloc"
-                value="${build.home}/${perf.dbloc}" />
-            <sysproperty
-                key="java.library.path"
-                value="${eclipseBuilderDirectory}/swt-linux-motif" />
-        </java>
+        name="test2properties">
+        <condition
+            property="test2propertiesexists">
+            <available
+                file="${testRoot}/test2.properties" />
+        </condition>
     </target>
-
-</project>
+</project>
\ No newline at end of file