295153 Can streamline unit test scripts
diff --git a/tests/org.eclipse.wtp.releng.tests/test.xml b/tests/org.eclipse.wtp.releng.tests/test.xml
index 0ab97c7..808d39f 100644
--- a/tests/org.eclipse.wtp.releng.tests/test.xml
+++ b/tests/org.eclipse.wtp.releng.tests/test.xml
@@ -96,7 +96,7 @@
             dir="${workspace}"
             quiet="true"/>
         <mkdir
-            dir="${workspace}"/> 
+            dir="${workspace}"/>
     </target>
     <!--
         This suite target defines the tests that need to be run.
@@ -123,37 +123,12 @@
                 name="extraVMargs"
                 value="-DrelengTestsPropertiesFile=${keyCfgFile}"/>
         </ant>
-        <copy
-            failonerror="false"
-            file="${workspace}/.metadata/.log"
-            tofile="${buildDirectory}/${buildLabel}/testResults/consolelogs/${plugin-name}.consolelog.txt"/>
-
-
-
-
-        <!-- copy our particular xsl files to web directory for prosperity-->
-        <copy
-            todir="${buildDirectory}/${buildLabel}/"
-            flatten="true">
-            <fileset
-                dir="${eclipse-home}/plugins/">
-                <include
-                    name="**/org.eclipse.wtp.releng.tests*/*.xsl"/>
-            </fileset>
-        </copy>
-        <!-- and use them to create basic display -->
-        <xslt
-            basedir="${buildDirectory}/${buildLabel}/"
-            includes="versioningReport_*"
-            destdir="${buildDirectory}/${buildLabel}/"
-            style="versioningReportToHTML.xsl"
-            force="true"/>
-        <echo
-            file="${buildDirectory}/${buildLabel}/versioningReportName.php">
-            <![CDATA[<?php $versionReportFilename="versioningReport_${buildLabel}" ?>]]>
-        </echo>
+        <condition
+            property="dotlogavailable">
+            <available
+                file="${workspace}/.metadata/.log"/>
+        </condition>
     </target>
-
     <!--
         This clean target holds code to cleanup the testing environment
         after after all of the tests have been run. You can use this
@@ -174,17 +149,42 @@
     -->
     <target
         name="run"
-        depends="init,suite,cleanup">
-        <ant
-            target="collect"
-            antfile="${library-file}"
-            dir="${eclipse-home}">
-            <property
-                name="includes"
-                value="${plugin-name}.*xml"/>
-            <property
-                name="output-file"
-                value="${plugin-name}.xml"/>
-        </ant>
+        depends="init,suite,copylogs,copyxsl,cleanup">
+        <echo
+            message="unit test ran: ${ant.file}"/>
+        <echo
+            message="library-file: ${library-file}"/>
+    </target>
+    <target
+        name="copylogs"
+        if="dotlogavailable">
+        <copy
+            failonerror="false"
+            file="${workspace}/.metadata/.log"
+            tofile="${buildDirectory}/${buildLabel}/testResults/consolelogs/${plugin-name}.consolelog.txt"/>
+    </target>
+    <target
+        name="copyxsl">
+        <!-- copy our particular xsl files to web directory for prosperity-->
+        <copy
+            todir="${buildDirectory}/${buildLabel}/"
+            flatten="true">
+            <fileset
+                dir="${eclipse-home}/plugins/">
+                <include
+                    name="**/org.eclipse.wtp.releng.tests*/*.xsl"/>
+            </fileset>
+        </copy>
+        <!-- and use them to create basic display -->
+        <xslt
+            basedir="${buildDirectory}/${buildLabel}/"
+            includes="versioningReport_*"
+            destdir="${buildDirectory}/${buildLabel}/"
+            style="versioningReportToHTML.xsl"
+            force="true"/>
+        <echo
+            file="${buildDirectory}/${buildLabel}/versioningReportName.php">
+           <![CDATA[<?php $versionReportFilename="versioningReport_${buildLabel}" ?>]]>
+        </echo>
     </target>
 </project>
\ No newline at end of file