harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From smish...@apache.org
Subject svn commit: r576965 [1/2] - in /harmony/enhanced/buildtest/branches/2.0: adaptors/eut/ adaptors/eut33/ tests/eut/ tests/eut/summary-reporter/ tests/eut/summary-reporter/src/ tests/eut/summary-reporter/src/org/ tests/eut/summary-reporter/src/org/apache/...
Date Tue, 18 Sep 2007 16:09:30 GMT
Author: smishura
Date: Tue Sep 18 09:09:29 2007
New Revision: 576965

URL: http://svn.apache.org/viewvc?rev=576965&view=rev
Log:
Apply patch from HARMONY-4807:
([buildtest][eut] EUT summary reporter)

Plus update EUT 3.2 and EUT 3.3 adaptors to reflect changes in build.xml

Added:
    harmony/enhanced/buildtest/branches/2.0/tests/eut/eut3.2.efl
      - copied, changed from r576955, harmony/enhanced/buildtest/branches/2.0/tests/eut/eut32.efl
    harmony/enhanced/buildtest/branches/2.0/tests/eut/eut3.2.suites.properties   (with props)
    harmony/enhanced/buildtest/branches/2.0/tests/eut/eut3.3.efl
      - copied, changed from r576955, harmony/enhanced/buildtest/branches/2.0/tests/eut/eut33.efl
    harmony/enhanced/buildtest/branches/2.0/tests/eut/eut3.3.suites.properties   (with props)
    harmony/enhanced/buildtest/branches/2.0/tests/eut/summary-reporter/
    harmony/enhanced/buildtest/branches/2.0/tests/eut/summary-reporter/src/
    harmony/enhanced/buildtest/branches/2.0/tests/eut/summary-reporter/src/org/
    harmony/enhanced/buildtest/branches/2.0/tests/eut/summary-reporter/src/org/apache/
    harmony/enhanced/buildtest/branches/2.0/tests/eut/summary-reporter/src/org/apache/harmony/
    harmony/enhanced/buildtest/branches/2.0/tests/eut/summary-reporter/src/org/apache/harmony/eut/
    harmony/enhanced/buildtest/branches/2.0/tests/eut/summary-reporter/src/org/apache/harmony/eut/reporter/
    harmony/enhanced/buildtest/branches/2.0/tests/eut/summary-reporter/src/org/apache/harmony/eut/reporter/EUTHTMLSummaryEmitter.java   (with props)
    harmony/enhanced/buildtest/branches/2.0/tests/eut/summary-reporter/src/org/apache/harmony/eut/reporter/EUTReporter.java   (with props)
    harmony/enhanced/buildtest/branches/2.0/tests/eut/summary-reporter/src/org/apache/harmony/eut/reporter/EUTStatusCollector.java   (with props)
    harmony/enhanced/buildtest/branches/2.0/tests/eut/summary-reporter/src/org/apache/harmony/eut/reporter/EUTSuiteInfo.java   (with props)
    harmony/enhanced/buildtest/branches/2.0/tests/eut/summary-reporter/src/org/apache/harmony/eut/reporter/EUTTXTReportEmitter.java   (with props)
Removed:
    harmony/enhanced/buildtest/branches/2.0/tests/eut/eut32.efl
    harmony/enhanced/buildtest/branches/2.0/tests/eut/eut33.efl
Modified:
    harmony/enhanced/buildtest/branches/2.0/adaptors/eut/adaptor.xml
    harmony/enhanced/buildtest/branches/2.0/adaptors/eut33/adaptor.xml
    harmony/enhanced/buildtest/branches/2.0/tests/eut/build.xml

Modified: harmony/enhanced/buildtest/branches/2.0/adaptors/eut/adaptor.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/buildtest/branches/2.0/adaptors/eut/adaptor.xml?rev=576965&r1=576964&r2=576965&view=diff
==============================================================================
--- harmony/enhanced/buildtest/branches/2.0/adaptors/eut/adaptor.xml (original)
+++ harmony/enhanced/buildtest/branches/2.0/adaptors/eut/adaptor.xml Tue Sep 18 09:09:29 2007
@@ -43,7 +43,7 @@
                 value="${eut.parameters.optional.eclipse.buildid}" />
             <property name="work.dir"
                 value="${checkouts.dir}/${suite.name}"/>
-            <property name="result.dir"
+            <property name="results.root.dir"
                 value="${results.dir}/${suite.name}"/>
             <property name="test.jre.home"
                 value="${eut.parameters.required.tested.runtime}"/>
@@ -70,7 +70,7 @@
                 value="${eut.parameters.optional.timeout}" />
             <property name="work.dir"
                 value="${checkouts.dir}/${suite.name}"/>
-            <property name="result.dir"
+            <property name="results.root.dir"
                 value="${results.dir}/${suite.name}"/>
             <propertyset id="ws.id">
                 <propertyref name="eut.parameters.optional.ws"/>

Modified: harmony/enhanced/buildtest/branches/2.0/adaptors/eut33/adaptor.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/buildtest/branches/2.0/adaptors/eut33/adaptor.xml?rev=576965&r1=576964&r2=576965&view=diff
==============================================================================
--- harmony/enhanced/buildtest/branches/2.0/adaptors/eut33/adaptor.xml (original)
+++ harmony/enhanced/buildtest/branches/2.0/adaptors/eut33/adaptor.xml Tue Sep 18 09:09:29 2007
@@ -44,7 +44,7 @@
                 value="${eut33.parameters.optional.eclipse.buildid}" />
             <property name="work.dir"
                 value="${checkouts.dir}/${suite.name}"/>
-            <property name="result.dir"
+            <property name="results.root.dir"
                 value="${results.dir}/${suite.name}"/>
             <property name="test.jre.home"
                 value="${eut33.parameters.required.tested.runtime}"/>
@@ -71,7 +71,7 @@
                 value="${eut33.parameters.optional.timeout}" />
             <property name="work.dir"
                 value="${checkouts.dir}/${suite.name}"/>
-            <property name="result.dir"
+            <property name="results.root.dir"
                 value="${results.dir}/${suite.name}"/>
             <propertyset id="ws.id">
                 <propertyref name="eut33.parameters.optional.ws"/>

Modified: harmony/enhanced/buildtest/branches/2.0/tests/eut/build.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/buildtest/branches/2.0/tests/eut/build.xml?rev=576965&r1=576964&r2=576965&view=diff
==============================================================================
--- harmony/enhanced/buildtest/branches/2.0/tests/eut/build.xml (original)
+++ harmony/enhanced/buildtest/branches/2.0/tests/eut/build.xml Tue Sep 18 09:09:29 2007
@@ -25,21 +25,19 @@
     <!-- ================ Setting global properties ================ -->
     <property file="eut.properties" />
 
-    <!-- Work properties -->
-    <tstamp>
-        <format property="timestamp" pattern="yyyyMMdd_hhmm" />
-    </tstamp>
+    <tstamp><format property="timestamp" pattern="yyyyMMdd_hhmm" /></tstamp>
+
+    <!--property name="timestamp" value="20070917_0436" /-->
 
     <property name="work.dir" value="${basedir}"/>
 
     <property name="eut.work.dir" location="${work.dir}/eclipse-testing"/>
 
-    <!-- Test suite specific properties -->
     <property name="tests" value=""/>
 
-    <!-- Properties that can be optionally set outside this build.xml file -->
-    <property name="result.dir" value="${basedir}/results"/>
-    <property name="res.dir" value="${result.dir}/${timestamp}"/>
+    <property name="results.root.dir" value="${basedir}/results"/>
+
+    <property name="results.dir" value="${results.root.dir}/${timestamp}"/>
 
     <property name="vm.options" value=""/>
 
@@ -54,9 +52,7 @@
 
     <!-- Define Eclipse Automated Test version specific properties -->
     <condition property="is.eut32">
-        <and>
-            <equals arg1="${eclipse.buildid}" arg2="3.2"/>
-        </and>
+        <and><equals arg1="${eclipse.buildid}" arg2="3.2"/></and>
     </condition>
 
     <!-- Define architecture and OS -->
@@ -173,7 +169,7 @@
 
     <!-- ================ Setup ================ -->
     <target name="setup"
-        depends="install.eut,install.eclipse,setup.configuration"
+        depends="install.eut,install.eclipse,setup.configuration,build.reporter"
         description="Download and install EUT, Eclipse SDK; configuring EUT settings">
     </target>
 
@@ -230,18 +226,26 @@
         <echo file="${eut.work.dir}/label.properties" append="false">
             buildId=${eclipse.buildid}
         </echo>
-   </target>
+    </target>
 
-   <!-- EUT32 specific replacement... -->
-   <target name="patch.test.xml" if="is.eut32"
+    <!-- EUT32 specific replacement... -->
+    <target name="patch.test.xml" if="is.eut32"
         description="Modify EUT test.xml configuration file to always use J2SE-5.0">
         <replace file="${eut.work.dir}/test.xml">
             <replacetoken><![CDATA[<param name="testPlugin"]]></replacetoken>
             <replacevalue><![CDATA[<param name="jvm" value="${J2SE-5.0}" />
             <param name="testPlugin"]]></replacevalue>
         </replace>
-   </target>
+    </target>
 
+    <target name="build.reporter"
+        description="Build summary reporter classes">
+        <mkdir dir="${basedir}/summary-reporter/classes"/>
+        <javac 
+            srcdir="${basedir}/summary-reporter/src"
+            destdir="${basedir}/summary-reporter/classes"
+            includes="**/*.java" />
+    </target>
 
     <!-- ================ Run ================ -->
     <path id="test.jre.home.path.id">
@@ -300,582 +304,122 @@
         <delete file="${work.dir}/report.txt" failonerror="false"/>
     </target>
 
+    <!--                        -->
+    <!--                        -->
     <!-- Launch main EUT script -->
+    <!--                        -->
+    <!--                        -->
     <target name="run.tests" description="Launch EUT run">
-        <exec executable="${cmd}" dir="${eut.work.dir}" failonerror="false" logError="false" resultproperty="resultproperty">
-            <arg line="${cmd.arg} runtests${cmd.suffix} -os ${os.eclipse.notation} -ws ${ws} -arch ${arch} -properties properties.file ${tests}"/>
+        <exec executable="${cmd}" dir="${eut.work.dir}" failonerror="false"
+            logError="false" resultproperty="resultproperty">
+            <arg line="${cmd.arg} runtests${cmd.suffix}
+                -os ${os.eclipse.notation} -ws ${ws} -arch ${arch}
+                -properties properties.file ${tests}"/>
             <redirector alwaysLog="true" logError="false" output="${work.dir}/output.txt"/>
         </exec>
-        <loadfile srcfile="${work.dir}/output.txt"
-            property="output.contains.build.failed.message">
-            <filterchain>
-                <linecontains>
-                    <contains value="BUILD FAILED"/>
-                </linecontains>
-            </filterchain>
-        </loadfile>
-        <loadfile srcfile="${work.dir}/output.txt"
-            property="output.contains.build.success.message">
-            <filterchain>
-                <linecontains>
-                    <contains value="BUILD SUCCESSFUL"/>
-                </linecontains>
-            </filterchain>
-        </loadfile>
-        <condition property="eut.script.status" value="EUT SCRIPT FAILED" else="EUT SCRIPT PASSED">
-            <or>
-                <isset property="output.contains.build.failed.message"/>
-                <not>
-                <isset property="output.contains.build.success.message"/>
-                </not>
-                <not>
-                    <equals arg1="${resultproperty}" arg2="0"/>
-                </not>
-            </or>
-        </condition>
-        <echo file="${work.dir}/output.txt"
-            message="${eut.script.status}"
-            append="true"/>
     </target>
 
-    <!-- Post-process run results, compose report, store results and decide whether run failed or not -->
+    <!--                                       -->
+    <!--                                       -->
+    <!-- Process results and generate summary  -->
+    <!--                                       -->
+    <!--                                       -->
     <target name="run.postprocess"
-        depends="create.postprocess.tmpdir,run.postprocess.check.output,compose.report,store.results,clean.postprocess.tmpdir,check.status"
-        description="Post-process run results">
+        depends="
+            collect.output.to.summarize,
+            setup.efl,
+            generate.reports,
+            duplicate.results.in.latest"
+        description="Processes JUnit reports and creates a summary">
     </target>
 
-    <!-- clean & create tmp directory for temporary files generated during results post-processing -->
-    <target name="create.postprocess.tmpdir">
-        <delete dir="${work.dir}/postprocess.tmpdir"/>
-        <mkdir dir="${work.dir}/postprocess.tmpdir"/>
-        <property name="tmp.dir" location="${work.dir}/postprocess.tmpdir"/>
-    </target>
-
-    <!-- clean tmp directory -->
-    <target name="clean.postprocess.tmpdir">
-        <delete dir="${tmp.dir}"/>
-    </target>
-
-    <!-- Make some preparations before post-processing results -->
-    <target name="run.postprocess.check.output">
-        <condition property="output.txt.available">
-            <available file="${work.dir}/output.txt"/>
-        </condition>
-        <condition property="result.xml.directory.not.empty">
-            <and>
-                <available file="${eut.work.dir}/results/xml"/>
-                <length when="greater" length="0">
-                    <fileset dir="${eut.work.dir}/results/xml" includes="*.xml"/>
-                </length>
-           </and>
-        </condition>
-        <condition property="all.output.available">
-            <and>
-                <isset property="output.txt.available"/>
-                <isset property="result.xml.directory.not.empty"/>
-            </and>
-        </condition>
-    </target>
-
-    <!-- Process run results and compose report taking into account efl -->
-    <target name="compose.report"
-        depends="setup.efl,compose.report.header,compose.report.print.unexpected,compose.report.fatal.failure.message"
-        description="Process run results and compose report taking into account efl">
+    <!-- Copy EUT generated reports and execution log to results directory -->
+    <target name="collect.output.to.summarize"
+        description="Collect logs and report to one directory to process">
+        <delete dir="${results.dir}"/>
+        <mkdir dir="${results.dir}"/>
+        <copy todir="${results.dir}">
+            <fileset dir="${work.dir}" includes="output.txt"/>
+        </copy>
+        <delete dir="${results.dir}/results"/>
+        <mkdir dir="${results.dir}/results"/>
+        <copy todir="${results.dir}/results">
+            <fileset dir="${eut.work.dir}/results"/>
+        </copy>
     </target>
 
     <!-- Concats EFL files for specific platform -->
-     <target name="setup.efl"
-        description="Combine a platform specific EFL file or create an empty one">
-        <condition property="efl.pref" value="eut32" else="eut33">
-            <isset property="is.eut32"/>
-        </condition>
-        <delete file="${tmp.dir}/work.efl"/>
-        <touch file="${tmp.dir}/work.efl"/>
-        <concat destfile="${tmp.dir}/work.efl">
-            <filelist dir="${basedir}"
-                    files="${efl.pref}.efl ${efl.pref}.${os}.efl
-                    ${efl.pref}.${os}.${arch}.efl" />
-            <filterchain>
-                <tokenfilter>
-                    <!-- EUT32/EUT33 universal pattern -->
-                    <replaceregex pattern="(.*?)#.*" replace="\1" flags="m"/>
-                </tokenfilter>
-            </filterchain>
+    <target name="setup.efl"
+        description="Combine a platform specific EFL file or create empty one">
+        <delete file="${results.dir}/eut.efl"/>
+        <touch file="${results.dir}/eut.efl"/>
+        <concat destfile="${results.dir}/eut.efl">
+            <filelist dir="${basedir}" files="
+                eut${eclipse.buildid}.efl
+                eut${eclipse.buildid}.${os.eclipse.notation}.efl
+                eut${eclipse.buildid}.${os.eclipse.notation}.${ws}.efl
+                eut${eclipse.buildid}.${os.eclipse.notation}.${ws}.${arch}.efl"
+            />
         </concat>
     </target>
 
     <!-- Print arch, os and JRE under test info to report file -->
-    <target name="compose.report.header" depends="compose.report.get.java.version">
-        <concat destfile="${work.dir}/report.txt" append="false">
-            <header trimleading="true">
-            ================================================
-            Eclipse Unit Tests on ${os} ${arch}. Tested JRE:
-            ================================================
-            </header>
-            <fileset dir="${work.dir}" includes="tmpfile.java.version"/>
-            <footer trimleading="true">
-            JRE options: ${vm.options}
-            ===============================
-            </footer>
-        </concat>
-    </target>
+    <target name="generate.reports" 
+        depends="setup.efl,collect.output.to.summarize,
+                compose.report.get.java.version">
+
+        <!-- Run reporter -->
+        <java
+            classpath="${work.dir}/summary-reporter/classes"
+            classname="org.apache.harmony.eut.reporter.EUTReporter"
+            fork="true"
+            output="${work.dir}/r_output.txt"> 
+            <arg value="${eclipse.buildid}"/>
+            <arg value="${results.dir}"/>
+            <arg value="${os.eclipse.notation}"/>
+            <arg value="${ws}"/>
+            <arg value="${arch}"/>
+            <arg value="${vm.options}"/>
+        </java>
 
-    <!-- Print unexpected failures, errors, crashes details to report file -->
-    <target name="compose.report.print.unexpected"
-        depends="compose.report.crashes,compose.report.failures.errors"
-        description="Print the list of unexpected failures, errors and crashes"
-        if="all.output.available">
-        <length file="${tmp.dir}/tmpfile.unexpected.crash.count" property="unexpected.crash.count"/>
-        <length file="${tmp.dir}/tmpfile.unexpected.failure.count" property="unexpected.failure.count"/>
-        <length file="${tmp.dir}/tmpfile.unexpected.error.count" property="unexpected.error.count"/>
-        <concat destfile="${work.dir}/report.txt" append="false">
-            <header trimleading="true">
-            ================================================
-            Eclipse Unit Tests on ${os} ${arch}. Tested JRE:
-            ================================================
-            </header>
-            <fileset dir="${tmp.dir}" includes="tmpfile.java.version"/>
-            <footer trimleading="true">
-            JRE options: ${vm.options}
-            ===============================
-            </footer>
-        </concat>
-        <concat destfile="${work.dir}/report.txt" append="true">
-            <header trimleading="true">
-                Unexpected failures (${unexpected.failure.count}):
-            </header>
-            <fileset dir="${tmp.dir}" includes="tmpfile.unexpected.failure"/>
-        </concat>
-        <concat destfile="${work.dir}/report.txt" append="true">
-            <header trimleading="true">
-                Unexpected errors (${unexpected.error.count}):
-            </header>
-            <fileset dir="${tmp.dir}" includes="tmpfile.unexpected.error"/>
-        </concat>
-        <concat destfile="${work.dir}/report.txt" append="true">
-            <header trimleading="true">
-                Unexpected crashes (${unexpected.crash.count}):
-            </header>
-            <fileset dir="${tmp.dir}" includes="tmpfile.unexpected.crash"/>
+        <concat destfile="${results.dir}/output.txt" append="true">
+            <fileset dir="${work.dir}" includes="r_output.txt"/>
         </concat>
-    </target>
+        <delete file="${work.dir}/r_output.txt"/>
+        <delete file="${basedir}/tested.java.version"/>
+        <delete file="${basedir}/running.java.version"/>
 
-    <!-- If results files (eclipse-testing/results/xml/*.xml or output file miss,
-    compose fatal error report -->
-    <target name="compose.report.fatal.failure.message"
-        depends="compose.report.check.fatal.failure.type,compose.report.if.no.output,compose.report.if.eut.script.failed,compose.report.if.results.dir.empty"
-        unless="all.output.available">
     </target>
 
-    <!-- Copy report file and detailed output to specified results directory -->
-    <target name="store.results"
-        depends="compose.report">
-        <copy todir="${res.dir}">
-            <fileset dir="${work.dir}" includes="output.txt,report.txt"/>
-        </copy>
-        <mkdir dir="${res.dir}/results"/>
-        <copy todir="${res.dir}/results">
-            <fileset dir="${eut.work.dir}/results"/>
-        </copy>
-
-        <delete dir="${result.dir}/latest"/>
-        <mkdir dir="${result.dir}/latest"/>
-        <copy todir="${result.dir}/latest">
-            <fileset dir="${res.dir}">
+    <!-- Copy specific files of report to 'latest' directory -->
+    <target name="duplicate.results.in.latest">
+        <delete dir="${results.root.dir}/latest"/>
+        <mkdir dir="${results.root.dir}/latest"/>
+        <copy todir="${results.root.dir}/latest">
+            <fileset dir="${results.dir}">
                 <include name="results/html/*.html"/>
                 <include name="output.txt"/>
                 <include name="report.txt"/>
+                <include name="index.htm"/>
             </fileset>
         </copy>
     </target>
 
-    <!-- Check whether there are fatal failure messages in report file or
-    unexpected failures information and fail/pass depending on this check -->
-    <target name="check.status"
-        depends="compose.report">
-        <loadfile srcfile="${work.dir}/report.txt"
-                property="fatal.failed.status">
-                <filterchain>
-                    <linecontains>
-                        <contains value="EUT FAILED:"/>
-                    </linecontains>
-                </filterchain>
-        </loadfile>
-        <loadfile srcfile="${work.dir}/report.txt"
-            property="report.contains.unexpected.failures.info">
-            <filterchain>
-                <linecontains>
-                    <contains value="Unexpected failures ("/>
-                </linecontains>
-            </filterchain>
-        </loadfile>
-        <loadfile srcfile="${work.dir}/report.txt"
-            property="no.unexpected.failures">
-            <filterchain>
-                <linecontains>
-                    <contains value="Unexpected failures (0):"/>
-                </linecontains>
-            </filterchain>
-        </loadfile>
-        <loadfile srcfile="${work.dir}/report.txt"
-            property="no.unexpected.errors">
-            <filterchain>
-                <linecontains>
-                    <contains value="Unexpected errors (0):"/>
-                </linecontains>
-            </filterchain>
-        </loadfile>
-        <loadfile srcfile="${work.dir}/report.txt"
-            property="no.unexpected.crashes">
-            <filterchain>
-                <linecontains>
-                    <contains value="Unexpected crashes (0):"/>
-                </linecontains>
-            </filterchain>
-        </loadfile>
-        <condition property="unexpected.failures.exist">
-            <and>
-                <isset property="report.contains.unexpected.failures.info"/>
-                <not>
-                    <and>
-                        <isset property="no.unexpected.failures"/>
-                        <isset property="no.unexpected.errors"/>
-                        <isset property="no.unexpected.crashes"/>
-                    </and>
-                </not>
-            </and>
-        </condition>
-        <fail message="EUT failed: Fatal error">
-            <condition>
-                <or>
-                    <isset property="fatal.failed.status"/>
-                    <not>
-                        <isset property="report.contains.unexpected.failures.info"/>
-                    </not>
-                </or>
-            </condition>
-        </fail>
-        <fail message="EUT failed: There are unexpected failures">
-            <condition>
-                <isset property="unexpected.failures.exist"/>
-            </condition>
-        </fail>
-        <echo message="EUT passed!"/>
-   </target>
-
-    <!-- Auxiliary results post-process tasks -->
-    <condition property="running.pattern" 
-      value=".*(org.eclipse[\.|\w]+).*"
-      else=".*(org.eclipse[\.|\w]+)\.\ Result.*">
-      <isset property="is.eut32"/>
-    </condition>
-
-    <target name="compose.report.crashes"
-        description="Compose the list of unexpected crashes and its number"
-        if="all.output.available">
-        <!-- Getting the list of all suites that were actually run -->
-        <copy file="${work.dir}/output.txt"
-            tofile="${tmp.dir}/tmpfile.all.run.suites"
-            overwrite="true">
-            <filterchain>
-                <linecontains>
-                    <contains value="Running org.eclipse." />
-                </linecontains>
-                <tokenfilter>
-                    <containsregex pattern="${running.pattern}"
-                        replace="\1"
-                        flags=""/>
-                </tokenfilter>
-            </filterchain>
-        </copy>
-        <!-- Getting the list of suites that have results written in junit format logs (not crashed) -->
-        <concat destfile="${tmp.dir}/tmpfile.not.crashed.suites"
-            append="false">
-            <fileset dir="${eut.work.dir}/results/xml" includes="*.xml"/>
-               <filterchain>
-                <tokenfilter>
-                    <!-- EUT32/EUT33 universal pattern -->
-                    <containsregex pattern=".*?testsuite.*name=&quot;(.*?)&quot;.*package=&quot;(.*?)&quot;.*"
-                        replace="\2.\1"
-                        flags="mg"/>
-                </tokenfilter>
-            </filterchain>
-        </concat>
-        <!-- Getting crashes list -->
-        <copy file="${tmp.dir}/tmpfile.all.run.suites"
-            tofile="${tmp.dir}/tmpfile.crashes.list"
-            overwrite="true"/>
-        <!-- Using fake token and value in order to avoid failures in case of empty replacefilterfile -->
-        <replace file="${tmp.dir}/tmpfile.crashes.list"
-            replacefilterfile="${tmp.dir}/tmpfile.not.crashed.suites"
-            token="fake_token"
-            value="fake_token">
-        </replace>
-        <!-- Get unexpected crashes only -->
-        <copy file="${tmp.dir}/tmpfile.crashes.list"
-            tofile="${tmp.dir}/tmpfile.unexpected.crash"
-            overwrite="true"/>
-        <replace file="${tmp.dir}/tmpfile.unexpected.crash"
-            replacefilterfile="${tmp.dir}/work.efl"
-            token="fake_token"
-            value="fake_token">
-        </replace>
-        <!-- Get the number of unexpected crashes -->
-        <replaceregexp file="${tmp.dir}/tmpfile.unexpected.crash"
-            match="^\s*$"
-            replace=""
-            flags="gm"/>
-        <copy file="${tmp.dir}/tmpfile.unexpected.crash"
-            tofile="${tmp.dir}/tmpfile.unexpected.crash.ignoreblank"
-            overwrite="true">
-            <filterchain>
-                <ignoreblank/>
-            </filterchain>
-        </copy>
-        <move file="${tmp.dir}/tmpfile.unexpected.crash.ignoreblank" tofile="${tmp.dir}/tmpfile.unexpected.crash"/>
-        <copy file="${tmp.dir}/tmpfile.unexpected.crash"
-            tofile="${tmp.dir}/tmpfile.unexpected.crash.count.tmp"
-            overwrite="true">
-            <filterchain>
-                <tokenfilter>
-                    <!-- EUT32/EUT33 universal pattern -->
-                    <replaceregex pattern="^.*$" replace="+" flags="mg"/>
-                </tokenfilter>
-            </filterchain>
-        </copy>
-        <copy file="${tmp.dir}/tmpfile.unexpected.crash.count.tmp"
-            tofile="${tmp.dir}/tmpfile.unexpected.crash.count"
-            overwrite="true">
-            <filterchain>
-                <striplinebreaks/>
-            </filterchain>
-        </copy>
-    </target>
-
-    <condition property="testcase.pattern" 
-      value="\s*&lt;testcase.*?&gt;\s*&lt;\/testcase&gt;\s*"
-      else="\s*&lt;testcase.*?\/&gt;\s*">
-      <isset property="is.eut32"/>
-    </condition>
-
-    <condition property="property.pattern" 
-      value="\s*&lt;property.*?&gt;\s*&lt;\/property&gt;\s*"
-      else="\s*&lt;property.*?\/&gt;\s*">
-      <isset property="is.eut32"/>
-    </condition>
-
-    <condition property="expected.pattern" 
-      value="\s*EXPECTED&lt;testcase.*?&lt;\/testcase&gt;"
-       else="\s*EXPECTED&lt;testcase.*?\/&gt;">
-      <isset property="is.eut32"/>
-    </condition>
-
-    <target name="compose.report.pre-process.failures.and.errors"
-        description="Pre-processing results to compose the list of unexpected failures and errors and its number"
-        if="all.output.available">
-        <!-- Process run results and remove passed testcases and properties tags,
-        leaving failures, errors and additional testsuites info in order to work
-        with a smaller file -->
-        <concat destfile="${tmp.dir}/tmpfile.failures.errors.testcases"
-            append="false">
-            <header trimleading="true">This file shouldn't be empty</header>
-            <fileset dir="${eut.work.dir}/results/xml" includes="*.xml"/>
-             <filterchain>
-                <tokenfilter>
-                    <replaceregex pattern='${testcase.pattern}'
-                        replace=""
-                        flags="mg"/>
-                </tokenfilter>
-                <tokenfilter>
-                    <replaceregex pattern='${property.pattern}'
-                        replace=""
-                        flags="mg"/>
-                </tokenfilter>
-                <tokenfilter>
-                    <ignoreblank/>
-                </tokenfilter>
-            </filterchain>
-        </concat>
-        <fixcrlf srcdir="${tmp.dir}"
-            eol="unix"
-            includes="tmpfile.failures.errors.testcases"
-        />
-        <!-- Make copy of work.efl with replace pattern in order to match expected failures -->
-        <copy file="${tmp.dir}/work.efl" tofile="${tmp.dir}/tmpfile.work.efl.pattern">
-            <filterchain>
-                <tokenfilter>
-                   <!-- EUT32/EUT33 universal pattern -->
-                   <replaceregex pattern='(.*)\.([a-z].*)'
-                        replace='&lt;testcase\\\\\\\ classname\\\\\\\=\\\\\\\"\1\\\\\\\"\\\\\\\ name\\\\\\\=\\\\\\\"\2\\\\\\\"=EXPECTED&lt;testcase classname="\1" name="\2"'
-                        flags="mg"/>
-                </tokenfilter>
-            </filterchain>
-        </copy>
-        <!-- Mark all expected failures and errors -->
-        <replace file="${tmp.dir}/tmpfile.failures.errors.testcases"
-            replacefilterfile="${tmp.dir}/tmpfile.work.efl.pattern"
-            token="fake_token"
-            value="fake_token"/>
-        <!-- Remove all expected failures and errors -->
-        <copy file="${tmp.dir}/tmpfile.failures.errors.testcases"
-            tofile="${tmp.dir}/tmpfile.unexpected.failures.errors.testcases"/>
-            <!-- EUT32/EUT33 universal pattern -->
-        <replaceregexp file="${tmp.dir}/tmpfile.unexpected.failures.errors.testcases"
-            match='\s*EXPECTED&lt;testcase.*?&lt;\/testcase&gt;'
-            replace=''
-            flags="sg"/>
-    </target>
-
-    <target name="compose.report.process.unexpected.failures.errors"
-        description="Process the log file with marked expected failure and cut unexpected failures or errors depending on given ${type}"
-        if="all.output.available">
-        <!-- Type should be specified as param: failure or error -->
-        <echo message="Processing: ${type} using file ${work.dir}/tmpfile.unexpected.failures.errors.testcases"/>
-        <fail message="FAIL: type of failure (failure or error) should be specified!">
-            <condition>
-                <not>
-                    <isset property="type"/>
-                </not>
-            </condition>
-        </fail>
-        <copy file="${tmp.dir}/tmpfile.unexpected.failures.errors.testcases" tofile="${tmp.dir}/tmpfile.unexpected.${type}"/>
-        <!-- Mark testcases -->
-        <!-- EUT32/EUT33 universal pattern -->
-        <replaceregexp
-            file="${tmp.dir}/tmpfile.unexpected.${type}"
-            match='\s*&lt;testcase\s*classname="(\S*?)"\s*name="([\S ]*?)"[\S ]*?&gt;\s*&lt;${type}.*?&gt;(.*?)&lt;\/${type}&gt;.*?&lt;\/testcase&gt;\s*'
-            replace='@BEGIN_MARK@${line.separator}Testcase: \1.\2:${line.separator}\3@END_MARK@'
-            flags="sg"
-        />
-        <concat append="true" destfile="${tmp.dir}/tmpfile.unexpected.${type}.tmp">
-            <header trimleading="true">@END_MARK@</header>
-            <fileset dir="${tmp.dir}" includes="tmpfile.unexpected.${type}"/>
-        </concat>
-        <copy file="${tmp.dir}/tmpfile.unexpected.${type}.tmp"
-            tofile="${tmp.dir}/tmpfile.unexpected.${type}"/>
-        <!-- Remove everything expect marked testcases -->
-        <move file="${tmp.dir}/tmpfile.unexpected.${type}.tmp"
-            tofile="${tmp.dir}/tmpfile.unexpected.${type}"/>
-        <replaceregexp file="${tmp.dir}/tmpfile.unexpected.${type}"
-            match='@END_MARK@.*?@BEGIN_MARK@'
-            replace=''
-            flags="sg"/>
-        <replaceregexp file="${tmp.dir}/tmpfile.unexpected.${type}"
-            match='@END_MARK@.*'
-            replace=''
-            flags="s"/>
-        <!-- Get the number of unexpected failures/errors -->
-        <copy file="${tmp.dir}/tmpfile.unexpected.${type}"
-            tofile="${tmp.dir}/tmpfile.unexpected.${type}.count">
-            <filterchain>
-                <tokenfilter>
-                    <containsregex pattern="\s*Testcase:.*" replace="+" flags=""/>
-                </tokenfilter>
-                <striplinebreaks/>
-            </filterchain>
-        </copy>
-    </target>
-
-    <target name="compose.report.failures.errors"
-        description="Compose the list of unexpected failures and errors and its number"
-        depends="compose.report.pre-process.failures.and.errors"
-        if="all.output.available">
-         <!-- Get the list of unexpected failures -->
-        <antcall target="compose.report.process.unexpected.failures.errors">
-            <param name="type" value="failure"/>
-        </antcall>
-        <!-- Get the list of unexpected errors -->
-        <antcall target="compose.report.process.unexpected.failures.errors">
-            <param name="type" value="error"/>
-        </antcall>
-    </target>
-
     <target name="compose.report.get.java.version">
+
+        <!-- tested java is specified in ${test.jre.home.path} var  -->
         <java jvm="${test.jre.home.path}/bin/java"
-            fork="true"
-            classname="."
-            failonerror="false"
-            logError="false"
-            output="${tmp.dir}/tmpfile.java.version">
+            fork="true" classname="." failonerror="false" logError="false"
+            output="${basedir}/tested.java.version">
             <jvmarg value="-version"/>
         </java>
-    </target>
 
-    <target name="compose.report.check.fatal.failure.type"
-        unless="all.output.available">
-        <loadfile srcfile="${work.dir}/output.txt"
-                property="eut.script.passed">
-                <filterchain>
-                    <linecontains>
-                        <contains value="EUT SCRIPT PASSED"/>
-                    </linecontains>
-                </filterchain>
-        </loadfile>
-        <condition property="eut.script.failed">
-            <not>
-                <isset property="eut.script.passed"/>
-            </not>
-        </condition>
-        <condition property="output.txt.not.avaliable">
-            <not>
-        <isset property="output.txt.available"/>
-            </not>
-        </condition>
-    </target>
-
-    <target name="compose.report.if.no.output"
-        description="Fail if not output file found"
-        if="output.txt.not.available"
-        unless="all.output.available">
-        <echo
-            file="${work.dir}/report.txt"
-            append="true">
-EUT FAILED: Fatal error. EUT output (${work.dir}/output.txt) not found!
-        </echo>
-    </target>
-
-    <target name="compose.report.if.results.dir.empty"
-        description="Fail if result xml directory is empty"
-        depends="compose.report.tail.eut.output"
-        unless="all.output.available"
-        if="output.txt.available">
-        <echo
-            file="${work.dir}/report.txt"
-            append="true">
-EUT FAILED: Fatal error. Results directory is empty!
-        </echo>
-    </target>
-
-    <target name="compose.report.if.eut.script.failed"
-        description="Fail if output contains failure message or EUT script returned non-zero code"
-        depends="compose.report.tail.eut.output"
-        unless="all.output.available"
-        if="eut.script.failed">
-        <echo
-            file="${work.dir}/report.txt"
-            append="true">
-EUT FAILED: Fatal error. Output contains failure message or EUT script returned non-zero code
-        </echo>
-    </target>
-
-    <target name="compose.report.tail.eut.output"
-        unless="all.output.available">
-        <concat destfile="${work.dir}/report.txt"
-            append="true"
-            fixlastline="true">
-            <header trimleading="true">
-                ===========
-                EUT output:
-
-            </header>
-            <filelist dir="${work.dir}" files="output.txt"/>
-            <filterchain>
-                <tailfilter lines="20"/>
-            </filterchain>
-            <footer trimleading="true">
-                =================
-            </footer>
-        </concat>
+        <!-- runtests(.bat) gets the running java directly from PATH var -->
+        <java jvm="java"
+            fork="true" classname="." failonerror="false" logError="false"
+            output="${basedir}/running.java.version">
+            <jvmarg value="-version"/>
+        </java>
     </target>
 
 </project>

Copied: harmony/enhanced/buildtest/branches/2.0/tests/eut/eut3.2.efl (from r576955, harmony/enhanced/buildtest/branches/2.0/tests/eut/eut32.efl)
URL: http://svn.apache.org/viewvc/harmony/enhanced/buildtest/branches/2.0/tests/eut/eut3.2.efl?p2=harmony/enhanced/buildtest/branches/2.0/tests/eut/eut3.2.efl&p1=harmony/enhanced/buildtest/branches/2.0/tests/eut/eut32.efl&r1=576955&r2=576965&rev=576965&view=diff
==============================================================================
--- harmony/enhanced/buildtest/branches/2.0/tests/eut/eut32.efl (original)
+++ harmony/enhanced/buildtest/branches/2.0/tests/eut/eut3.2.efl Tue Sep 18 09:09:29 2007
@@ -1,18 +1,19 @@
 #
 # This file contains the Expected Failure List (EFL) of EUT3.2 tests 
-# for the run on Harmony DRLVM on Windows/x86 platform.
+# for the run on Harmony DRLVM for all platforms.
 #
-# This file is used for generating results\<date>\report.txt file
-# by ./build.xml using information from 
-# results\<date>\results\xml\*.xml and results\<date>\output.txt
+# This file is used for generating results/<date>/report.txt and summary
+# index.htm files by ./build.xml using information from 
+# results/<date>/results/xml/*.xml and results/<date>/output.txt.
 #
-# The following rules are used to create this file:
+# The following rule is used to create this file:
 #
-# - specify test suite name to expect failure for all tests in suite, like
-#   "org.eclipse.team.tests.ccvs.core.AllTests"
 # - specify particular test name to expect its failure, the test name 
 #   is to be taken from results\<date>\results\xml\*.xml, like
 #   "org.eclipse.jdt.core.tests.compiler.regression.LookupTest.test044 - 1.4"
+#
+# - no expected crashes is possible - there shoould be no crashes
+#
 
 ###############################################################################
 #
@@ -26,10 +27,6 @@
 #
 # Failure is caused by Harmony bug
 #
-
-# HARMONY-4298 ([drlvm][thread]1 EUT testcase from teamcvs suite intermittently
-# crashes since r549864)
-org.eclipse.team.tests.ccvs.core.AllTests
 
 # HARMONY-4409 ([drlvm][verifier] Harmony throws VerifyError (Incompatible
 # argument for function) on generics/varargs specific bytecode while 

Added: harmony/enhanced/buildtest/branches/2.0/tests/eut/eut3.2.suites.properties
URL: http://svn.apache.org/viewvc/harmony/enhanced/buildtest/branches/2.0/tests/eut/eut3.2.suites.properties?rev=576965&view=auto
==============================================================================
--- harmony/enhanced/buildtest/branches/2.0/tests/eut/eut3.2.suites.properties (added)
+++ harmony/enhanced/buildtest/branches/2.0/tests/eut/eut3.2.suites.properties Tue Sep 18 09:09:29 2007
@@ -0,0 +1,94 @@
+suite.1.name=org.eclipse.ant.tests.core.AutomatedSuite
+suite.1.tests=85
+suite.2.name=org.eclipse.ant.tests.ui.testplugin.AntUITests
+suite.2.tests=169
+suite.3.name=org.eclipse.compare.tests.AllTests
+suite.3.tests=29
+suite.4.name=org.eclipse.core.internal.expressions.tests.AllTests
+suite.4.tests=75
+suite.5.name=org.eclipse.core.filebuffers.tests.FileBuffersTestSuite
+suite.5.tests=218
+suite.6.name=org.eclipse.core.tests.resources.AutomatedTests
+suite.6.tests=804
+suite.7.name=org.eclipse.core.tests.runtime.AutomatedTests
+suite.7.tests=325
+suite.8.name=org.eclipse.help.tests.AllHelpCoreTests
+suite.8.tests=60
+suite.9.name=org.eclipse.jdt.apt.tests.TestAll
+suite.9.tests=99
+suite.10.name=org.eclipse.jdt.core.tests.builder.BuilderTests
+suite.10.tests=129
+suite.11.name=org.eclipse.jdt.core.tests.compiler.parser.TestAll
+suite.11.tests=4797
+suite.12.name=org.eclipse.jdt.core.tests.compiler.regression.TestAll
+suite.12.tests=6805
+suite.13.name=org.eclipse.jdt.core.tests.eval.TestAll
+suite.13.tests.win32.win32.x86=528
+suite.13.tests.linux.gtk.x86=0
+suite.14.name=org.eclipse.jdt.core.tests.RunFormatterTests
+suite.14.tests=689
+suite.15.name=org.eclipse.jdt.core.tests.dom.RunAllTests
+suite.15.tests=2797
+suite.16.name=org.eclipse.jdt.core.tests.model.AllJavaModelTests
+suite.16.tests=4876
+suite.17.name=org.eclipse.jdt.core.tests.performance.OneTest
+suite.17.tests=1
+suite.18.name=org.eclipse.jdt.debug.tests.AutomatedSuite
+suite.18.tests=520
+suite.19.name=org.eclipse.jdt.text.tests.JdtTextTestSuite
+suite.19.tests=502
+suite.20.name=org.eclipse.jdt.ui.tests.all.AllAllTests
+suite.20.tests=3411
+suite.21.name=org.eclipse.jdt.ui.tests.AutomatedSuite
+suite.21.tests=1290
+suite.22.name=org.eclipse.jdt.ui.tests.LeakTestSuite
+suite.22.tests.win32.win32.x86=9
+suite.22.tests.linux.gtk.x86=0
+suite.23.name=org.eclipse.jface.tests.databinding.BindingTestSuite
+suite.23.tests=88
+suite.24.name=org.eclipse.jface.text.tests.JFaceTextTestSuite
+suite.24.tests=119
+suite.25.name=org.eclipse.ltk.core.refactoring.tests.AllTests
+suite.25.tests=2
+suite.26.name=org.eclipse.ltk.ui.refactoring.tests.AllTests
+suite.26.tests=1
+suite.27.name=org.eclipse.osgi.tests.AutomatedTests
+suite.27.tests=154
+suite.28.name=org.eclipse.pde.ui.tests.AllPDETests
+suite.28.tests=310
+suite.29.name=org.eclipse.releng.tests.BuildTests
+suite.29.tests=4
+suite.30.name.win32.win32.x86=org.eclipse.swt.tests.junit.AllTests
+suite.30.tests.win32.win32.x86=5294
+suite.30.name.linux.gtk.x86=org.eclipse.swt.tests.junit.AllGtkTests
+suite.30.tests.linux.gtk.x86=5273
+suite.31.name=org.eclipse.team.tests.core.AllTeamTests
+suite.31.tests=15
+suite.32.name=org.eclipse.team.tests.ccvs.core.AllCoreTests
+suite.32.tests=35
+suite.33.name=org.eclipse.team.tests.ccvs.core.AllTests
+suite.33.tests=135
+suite.34.name=org.eclipse.text.tests.EclipseTextTestSuite
+suite.34.tests=388
+suite.35.name=org.eclipse.ua.tests.AllTests
+suite.35.tests=138
+suite.36.name=org.eclipse.ui.editors.tests.EditorsTestSuite
+suite.36.tests=11
+suite.37.name=org.eclipse.ui.tests.navigator.NavigatorTestSuite
+suite.37.tests=11
+suite.38.name=org.eclipse.ui.tests.rcp.RcpTestSuite
+suite.38.tests=23
+suite.39.name=org.eclipse.ui.tests.views.properties.tabbed.AllTests
+suite.39.tests=6
+suite.40.name=org.eclipse.jface.tests.AllTests
+suite.40.tests=590
+suite.41.name=org.eclipse.ui.parts.tests.PartsReferencesTestSuite
+suite.41.tests=12
+suite.42.name=org.eclipse.ui.tests.UiTestSuite
+suite.42.tests=1090
+suite.43.name=org.eclipse.ui.tests.session.SessionTests
+suite.43.tests=17
+suite.44.name=org.eclipse.ui.workbench.texteditor.tests.WorkbenchTextEditorTestSuite
+suite.44.tests=36
+suite.45.name=org.eclipse.update.tests.AllTests
+suite.45.tests=130

Propchange: harmony/enhanced/buildtest/branches/2.0/tests/eut/eut3.2.suites.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Copied: harmony/enhanced/buildtest/branches/2.0/tests/eut/eut3.3.efl (from r576955, harmony/enhanced/buildtest/branches/2.0/tests/eut/eut33.efl)
URL: http://svn.apache.org/viewvc/harmony/enhanced/buildtest/branches/2.0/tests/eut/eut3.3.efl?p2=harmony/enhanced/buildtest/branches/2.0/tests/eut/eut3.3.efl&p1=harmony/enhanced/buildtest/branches/2.0/tests/eut/eut33.efl&r1=576955&r2=576965&rev=576965&view=diff
==============================================================================
--- harmony/enhanced/buildtest/branches/2.0/tests/eut/eut33.efl (original)
+++ harmony/enhanced/buildtest/branches/2.0/tests/eut/eut3.3.efl Tue Sep 18 09:09:29 2007
@@ -1,18 +1,19 @@
 #
 # This file contains the Expected Failure List (EFL) of EUT3.3 tests 
-# for the run on Harmony DRLVM on any platform.
+# for the run on Harmony DRLVM for all platforms.
 #
-# This file is used for generating results/<date>/report.txt file
-# by ./build.xml using information from 
-# results/<date>/results/xml/*.xml and results/<date>/output.txt
+# This file is used for generating results/<date>/report.txt and summary
+# index.htm files by ./build.xml using information from 
+# results/<date>/results/xml/*.xml and results/<date>/output.txt.
 #
-# The following rules are used to create this file:
+# The following rule is used to create this file:
 #
-# - specify test suite name to expect failure for all tests in suite, like
-#   "org.eclipse.team.tests.ccvs.core.AllTests"
 # - specify particular test name to expect its failure, the test name 
-#   is to be taken from results/<date>/results/xml/*.xml, like
+#   is to be taken from results\<date>\results\xml\*.xml, like
 #   "org.eclipse.jdt.core.tests.compiler.regression.LookupTest.test044 - 1.4"
+#
+# - no expected crashes is possible - there shoould be no crashes
+#
 
 ###############################################################################
 #

Added: harmony/enhanced/buildtest/branches/2.0/tests/eut/eut3.3.suites.properties
URL: http://svn.apache.org/viewvc/harmony/enhanced/buildtest/branches/2.0/tests/eut/eut3.3.suites.properties?rev=576965&view=auto
==============================================================================
--- harmony/enhanced/buildtest/branches/2.0/tests/eut/eut3.3.suites.properties (added)
+++ harmony/enhanced/buildtest/branches/2.0/tests/eut/eut3.3.suites.properties Tue Sep 18 09:09:29 2007
@@ -0,0 +1,100 @@
+suite.1.name=org.eclipse.ant.tests.core.AutomatedSuite
+suite.1.tests=85
+suite.2.name=org.eclipse.ant.tests.ui.testplugin.AntUITests
+suite.2.tests=171
+suite.3.name=org.eclipse.compare.tests.AllTests
+suite.3.tests=60
+suite.4.name=org.eclipse.core.internal.expressions.tests.AllTests
+suite.4.tests=94
+suite.5.name=org.eclipse.core.filebuffers.tests.FileBuffersTestSuite
+suite.5.tests=362
+suite.6.name=org.eclipse.core.tests.resources.AutomatedTests
+suite.6.tests=862
+suite.7.name=org.eclipse.core.tests.runtime.AutomatedTests
+suite.7.tests=360
+suite.8.name=org.eclipse.core.tests.net.AllNetTests
+suite.8.tests=6
+suite.9.name=org.eclipse.jdt.apt.tests.TestAll
+suite.9.tests=109
+suite.10.name=org.eclipse.jdt.compiler.apt.tests.AllTests
+suite.10.tests=22
+suite.11.name=org.eclipse.jdt.compiler.tool.tests.AllTests
+suite.11.tests=8
+suite.12.name=org.eclipse.jdt.core.tests.builder.BuilderTests
+suite.12.tests=175
+suite.13.name=org.eclipse.jdt.core.tests.compiler.parser.TestAll
+suite.13.tests=5763
+suite.14.name=org.eclipse.jdt.core.tests.compiler.regression.TestAll
+suite.14.tests=8213
+suite.15.name=org.eclipse.jdt.core.tests.eval.TestAll
+suite.15.tests.win32.win32.x86=531
+suite.15.tests.linux.gtk.x86=0
+suite.16.name=org.eclipse.jdt.core.tests.RunFormatterTests
+suite.16.tests=758
+suite.17.name=org.eclipse.jdt.core.tests.dom.RunAllTests
+suite.17.tests=2917
+suite.18.name=org.eclipse.jdt.core.tests.model.AllJavaModelTests
+suite.18.tests=5328
+suite.19.name=org.eclipse.jdt.core.tests.performance.OneTest
+suite.19.tests=1
+suite.20.name=org.eclipse.jdt.debug.tests.AutomatedSuite
+suite.20.tests=598
+suite.21.name=org.eclipse.jdt.text.tests.JdtTextTestSuite
+suite.21.tests=515
+suite.22.name=org.eclipse.jdt.ui.tests.refactoring.all.AllAllRefactoringTests
+suite.22.tests=3449
+suite.23.name=org.eclipse.jdt.ui.tests.AutomatedSuite
+suite.23.tests=1488
+suite.24.name=org.eclipse.jdt.ui.tests.LeakTestSuite
+suite.24.tests.win32.win32.x86=9
+suite.24.tests.linux.gtk.x86=0
+suite.25.name=org.eclipse.jface.tests.databinding.BindingTestSuite
+suite.25.tests=730
+suite.26.name=org.eclipse.jface.text.tests.JFaceTextTestSuite
+suite.26.tests=138
+suite.27.name=org.eclipse.ltk.core.refactoring.tests.AllTests
+suite.27.tests=57
+suite.28.name=org.eclipse.ltk.ui.refactoring.tests.AllTests
+suite.28.tests=1
+suite.29.name=org.eclipse.osgi.tests.AutomatedTests
+suite.29.tests=198
+suite.30.name=org.eclipse.pde.ui.tests.AllPDETests
+suite.30.tests=310
+suite.31.name=org.eclipse.releng.tests.BuildTests
+suite.31.tests=5
+suite.32.name.win32.win32.x86=org.eclipse.swt.tests.junit.AllTests
+suite.32.tests.win32.win32.x86=5297
+suite.32.name.linux.gtk.x86=org.eclipse.swt.tests.junit.AllGtkTests
+suite.32.tests.linux.gtk.x86=5276
+suite.33.name=org.eclipse.team.tests.core.AllTeamTests
+suite.33.tests=15
+suite.34.name=org.eclipse.team.tests.core.AllTeamUITests
+suite.34.tests=1
+suite.35.name=org.eclipse.team.tests.ccvs.core.AllCoreTests
+suite.35.tests=41
+suite.36.name=org.eclipse.team.tests.ccvs.core.AllTests
+suite.36.tests=155
+suite.37.name=org.eclipse.text.tests.EclipseTextTestSuite
+suite.37.tests=441
+suite.38.name=org.eclipse.ua.tests.AllTests
+suite.38.tests=228
+suite.39.name=org.eclipse.ui.editors.tests.EditorsTestSuite
+suite.39.tests=11
+suite.40.name=org.eclipse.ui.tests.navigator.NavigatorTestSuite
+suite.40.tests=12
+suite.41.name=org.eclipse.ui.tests.rcp.RcpTestSuite
+suite.41.tests=29
+suite.42.name=org.eclipse.ui.tests.views.properties.tabbed.AllTests
+suite.42.tests=6
+suite.43.name=org.eclipse.jface.tests.AllTests
+suite.43.tests=674
+suite.44.name=org.eclipse.ui.parts.tests.PartsReferencesTestSuite
+suite.44.tests=12
+suite.45.name=org.eclipse.ui.tests.UiTestSuite
+suite.45.tests=1234
+suite.46.name=org.eclipse.ui.tests.session.SessionTests
+suite.46.tests=25
+suite.47.name=org.eclipse.ui.workbench.texteditor.tests.WorkbenchTextEditorTestSuite
+suite.47.tests=56
+suite.48.name=org.eclipse.update.tests.AllTests
+suite.48.tests=130

Propchange: harmony/enhanced/buildtest/branches/2.0/tests/eut/eut3.3.suites.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Added: harmony/enhanced/buildtest/branches/2.0/tests/eut/summary-reporter/src/org/apache/harmony/eut/reporter/EUTHTMLSummaryEmitter.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/buildtest/branches/2.0/tests/eut/summary-reporter/src/org/apache/harmony/eut/reporter/EUTHTMLSummaryEmitter.java?rev=576965&view=auto
==============================================================================
--- harmony/enhanced/buildtest/branches/2.0/tests/eut/summary-reporter/src/org/apache/harmony/eut/reporter/EUTHTMLSummaryEmitter.java (added)
+++ harmony/enhanced/buildtest/branches/2.0/tests/eut/summary-reporter/src/org/apache/harmony/eut/reporter/EUTHTMLSummaryEmitter.java Tue Sep 18 09:09:29 2007
@@ -0,0 +1,227 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.harmony.eut.reporter;
+import java.io.PrintWriter;
+
+/**
+ * Emits the summary information about EUT status in txt and hml form. 
+ */
+final class EUTHTMLSummaryEmitter {
+
+    /** Keeps the output stream to write the index.htm data into. */
+    private static PrintWriter out;
+
+    /** Emits JUnit like html report with EUT specific fields w/o frames. */
+    static void emitHTMLReport(PrintWriter out, EUTSummaryInfo esi) {
+        EUTHTMLSummaryEmitter.out = out;
+
+        emitiHTMLheaderAndBodyStart(esi.eut_version);
+        emitRelativeSummary(esi.ss, esi.tests_run_total,
+                esi.tests_crashed_total);
+        emitAbsoluteSummary(esi.ss, esi.tests_run_total,
+                esi.tests_crashed_total);
+        emitNoteOfErrorFailures();
+        emitNoteOfSummary();
+        emitSuitesStatictics();
+        emitHTMLEnd();
+    }
+
+    private static void emitStylesheet() {
+        out.println("<style type=\"text/css\">");
+        out.println(
+                "    BODY { FONT: 68% verdana,arial,helvetica; "
+                + "COLOR: #000000}");
+        out.println("    TABLE TR TD, TABLE TR TH { FONT-SIZE: 68% }");
+        out.println("    TABLE.details TR TH { FONT-WEIGHT: bold; "
+                + "BACKGROUND: #a6caf0; TEXT-ALIGN: left }");
+        out.println("    TABLE.details TR TD { BACKGROUND: #eeeee0 }");
+        out.println("    P { MARGIN-TOP: 0.5em; MARGIN-BOTTOM: 1em; "
+                + "LINE-HEIGHT: 1.5em }");
+        out.println("    H1 { MARGIN: 0px 0px 5px; "
+                + "FONT: 165% verdana,arial,helvetica }");
+        out.println("    H2 { MARGIN-TOP: 1em; MARGIN-BOTTOM: 0.5em; "
+                + "FONT: bold 125% verdana,arial,helvetica }");
+        out.println("    .Error { FONT-WEIGHT: bold; COLOR: red }");
+        out.println("    .Failure { FONT-WEIGHT: bold; COLOR: purple }");
+        out.println("    .Properties { TEXT-ALIGN: right }");
+        out.println("</style>");
+    }
+
+    private static void emitiHTMLheaderAndBodyStart(String eut_version) {
+        out.println("<HTML><HEAD><TITLE>Eclipse Unit Test " + eut_version
+                + " Results: Summary</TITLE>");
+        out.println("<META http-equiv=Content-Type content=\"text/html; "
+                + "charset=windows-1252\">");
+        emitStylesheet();
+        out.println("</HEAD>");
+        out.println();
+        out.println("<BODY>");
+        out.println("<H1>Eclipse Unit Test " + eut_version + " Results</H1>");
+        out.println("<TABLE width=\"100%\">");
+        out.println("  <TBODY>");
+        out.println("  <TR><TD align=left></TD><TD align=right>"
+                + "Designed for use with");
+        out.println("      <A href=\"http://www.junit.org/\">JUnit</A> and");
+        out.println("      <A href=\"http://jakarta.apache.org/\">Ant</A>."
+                + "</TD></TR></TBODY></TABLE>");
+        out.println();
+        out.println("<HR SIZE=1>");
+        out.println();
+    }
+
+    private static void emitSummary(String header, String ctPref,
+            int total, int passes, int failures, int errors, int crashes) {
+        out.println("<H2>" + header + "</H2>");
+        out.println("<TABLE class=details cellSpacing=2 cellPadding=5 "
+                + "width=\"95%\" border=0>");
+        out.println("  <TBODY>");
+        out.println("  <TR vAlign=top>");
+        out.println("    <TH width=\"20%\">Tests</TH>");
+        out.println("    <TH width=\"20%\">" + ctPref + " Failures</TH>");
+        out.println("    <TH width=\"20%\">" + ctPref + " Errors</TH>");
+        out.println("    <TH width=\"20%\">" + ctPref + " Crashes</TH>");
+        out.println("    <TH>Success rate</TH>");
+
+        // set the results class style depends on results value
+        String tClass = "\"\"";
+
+        if (crashes != 0) {
+            tClass = "Error";
+        } else if (errors != 0) {
+            tClass = "Failure";
+        } else if (failures != 0) {
+            tClass = "Failure";
+        }
+        out.println("  <TR class=" + tClass + " vAlign=top>");
+        out.println("    <TD>" + total + "</TD>");
+        out.println("    <TD>" + failures + "</TD>");
+        out.println("    <TD>" + errors + "</TD>");
+        out.println("    <TD>" + crashes + "</TD>");
+        out.println("    <TD>" + EUTReporter.makePassrateString(passes, total)
+                + "</TD></TR></TBODY></TABLE>");
+    }
+
+    private static void emitRelativeSummary(EUTSuiteInfo ss,
+            int tests_run_total, int tests_crashed_total) {
+        emitSummary("Relative Summary", "Sudden",
+                tests_run_total, ss.tests_reported_passed, 
+                ss.tests_unexpected_end_with_failure, 
+                ss.tests_unexpected_end_with_error,
+                tests_crashed_total);
+    }
+
+    private static void emitAbsoluteSummary(EUTSuiteInfo ss,
+            int tests_run_total, int tests_crashed_total) {
+        emitSummary("Absolute Summary", "Total",
+                ss.tests_total, ss.tests_reported_passed, 
+                ss.tests_reported_end_with_failure, 
+                ss.tests_reported_end_with_error,
+                tests_crashed_total);
+    }
+
+    private static void emitNoteOfErrorFailures() {
+        out.println("<TABLE width=\"95%\" border=0>");
+        out.println("  <TBODY><TR>");
+        out.println("  <TD style=\"TEXT-ALIGN: justify\">"
+                + "Note: <EM>failures</EM> are anticipated and checked for "
+                + "with assertions while <EM>errors</EM> are unanticipated.");
+        out.println("  </TD></TR></TBODY></TABLE>");
+    }
+
+    private static void emitNoteOfSummary() {
+        out.println("<TABLE width=\"95%\" border=0>");
+        out.println("  <TBODY><TR>");
+        out.println("  <TD style=\"TEXT-ALIGN: justify\">"
+                + "Note: In <EM>Relative Summary</EM> one considers Expected "
+                + "Failures List, i.e. the total tests number may be reduced, "
+                + "actual failures / error can be ommitted if they are "
+                + "expected, and pass rate may be 100%, in <EM>Absolute "
+                + "Summary</EM> the real tests status statistics is given.");
+        out.println("  </TD></TR></TBODY></TABLE>");
+    }
+
+    private static void emitSuitesStatictics() {
+        out.println("<H2>Suites Detailes</H2>");
+        out.println("<TABLE class=details cellSpacing=2 cellPadding=5 "
+                + "width=\"95%\" border=0>");
+        out.println("  <TBODY>");
+        out.println("  <TR vAlign=top>");
+        out.println("    <TH width=\"80%\">Name</TH>");
+        out.println("    <TH>Total Tests</TH>");
+        out.println("    <TH>Sudden Errors</TH>");
+        out.println("    <TH>Sudden Failures</TH>");
+        out.println("    <TH>Sudden Crashes</TH></TR>");
+
+        for (int i = 0; i < EUTReporter.suiteList.size(); i++) {
+            EUTSuiteInfo si = EUTReporter.suiteList.get(i);
+
+            if (si.wasRun) {
+                emitOneSuiteStatictics(si);
+            } else {
+                out.println("  <TR class=\"\" vAlign=top>");
+                out.println("    <TD>" + si.name + "</TD>");
+                out.println("    <TD>" + si.tests_total + "</TD>");
+                out.println("    <TD colspan=3 align=center><EM>not run</EM></TD>");
+            }
+        }
+        out.println("  </TBODY></TABLE>");
+    }
+
+    private static void emitOneSuiteStatictics(EUTSuiteInfo si) {
+        String tClass = "\"\"";
+        String strError = Integer.toString(si.tests_unexpected_end_with_error);
+        String strFailure = Integer.toString(
+                si.tests_unexpected_end_with_failure);
+        String strCrash = "&nbsp;";
+
+        // detect report style based on issue type
+        if (si.isCrashed) {
+            tClass = "Error";
+            strError = "&nbsp;";
+            strFailure = "&nbsp;";
+            strCrash = "crashed";
+        } else if (si.tests_unexpected_end_with_error != 0) {
+            tClass = "Failure";
+        }  else if (si.tests_unexpected_end_with_failure != 0) {
+            tClass = "Failure";
+        }
+
+        // emit html code finally
+        out.println("  <TR class=" + tClass + " vAlign=top>");
+
+        // no link to html report in case of crash (because there is no html)
+        String html_ref_prefix = "";
+        String html_ref_suffix = "";
+
+        if (!si.isCrashed && si.html_report_file_name != null) {
+            String html_name = EUTReporter.path_to_html_prefix 
+                    + si.html_report_file_name;
+            html_ref_prefix = "<A href=\"" + html_name + "\">";
+            html_ref_suffix = "</A>";
+        }
+        out.println("    <TD>" + html_ref_prefix);
+        out.println("        " + si.name + html_ref_suffix + "</TD>");
+        out.println("    <TD>" + si.tests_total + "</TD>");
+        out.println("    <TD>" + strError + "</TD>");
+        out.println("    <TD>" + strFailure + "</TD>");
+        out.println("    <TD>" + strCrash + "</TD></TR>");
+    }
+
+    private static void emitHTMLEnd() {
+        out.println("</BODY></HTML>");
+    }
+} // end of class 'EUTHTMLSummaryEmitter' definition

Propchange: harmony/enhanced/buildtest/branches/2.0/tests/eut/summary-reporter/src/org/apache/harmony/eut/reporter/EUTHTMLSummaryEmitter.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: harmony/enhanced/buildtest/branches/2.0/tests/eut/summary-reporter/src/org/apache/harmony/eut/reporter/EUTReporter.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/buildtest/branches/2.0/tests/eut/summary-reporter/src/org/apache/harmony/eut/reporter/EUTReporter.java?rev=576965&view=auto
==============================================================================
--- harmony/enhanced/buildtest/branches/2.0/tests/eut/summary-reporter/src/org/apache/harmony/eut/reporter/EUTReporter.java (added)
+++ harmony/enhanced/buildtest/branches/2.0/tests/eut/summary-reporter/src/org/apache/harmony/eut/reporter/EUTReporter.java Tue Sep 18 09:09:29 2007
@@ -0,0 +1,201 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.harmony.eut.reporter;
+import java.io.File;
+import java.io.PrintWriter;
+import java.util.ArrayList;
+
+/**
+ *
+ * There are "os", "arch" and "ws" mandatory arguments required by this class -
+ * these arguments can be detected from this class through SDK API, still this
+ * is not done to avoid duplication - build.xml already did this work.
+ */
+public final class EUTReporter {
+
+    /** Keeps the list of test suites being processed. */
+    static ArrayList<EUTSuiteInfo> suiteList = new ArrayList<EUTSuiteInfo>();
+
+    /** Keeps the list of expected failure/errors/crashes. */
+    static ArrayList<String> eflList = new ArrayList<String>();
+
+    /** Keeps the relative path to html suite summary page name. */
+    static final String path_to_html_prefix = "results/html/";
+
+    private static void usage() {
+        System.err.println("=================================================");
+        System.err.println(
+                "Usage: java EUTReporter <eut_version> <result_dir> " +
+                "<os> <ws> <arch> <tested_vm_args>");
+        System.err.println("    <eut_version>      : 3.2 or 3.3");
+        System.err.println("    <resultis_dir>     : path to directory "
+                + "which is supposed to have the files:");
+        System.err.println("    *  output.txt - the log output of EUT run");
+        System.err.println("    *  eut.efl    - Excpected Failures List file");
+        System.err.println("    *  results    - JUnit generated reports");
+        System.err.println("    <os>, <ws>, <arch> : same to 'runtests'");
+        System.err.println("    <tested_vm_args>   : tested VM arguments " + 
+                "to be printed to report");
+        System.err.println("    Note: the current directory must contains:");
+        System.err.println("    *  <eut_version>.suites.properties file");
+        System.err.println("    *  tested.java.version file");
+        System.err.println("    *  running.java.version file");
+        System.exit(1);
+    }
+
+    private static void checkFileExistance(File f) {
+        if (f.exists()) {
+            return;
+        }
+        System.err.println("=================================================");
+        System.err.println("Error: missed file or directory: " + f.getPath());
+        usage();
+    }
+
+    /** Helper method to produce a well formatted passrate string. */
+    static String makePassrateString(double passed, double total) {
+        if (total == 0.) {
+            return "0.00%";
+        }
+        double passrate = (passed * 100.0) / total;
+        int aliquot = (int) passrate;
+
+        if (aliquot == 100) {
+            return "100%";
+        }
+        String fractionStr = String.valueOf((int) Math.round((passrate -
+                        (double) aliquot) * 100.0));
+
+        if (fractionStr.length() != 2) {
+            fractionStr = "0" + fractionStr;
+        }
+        return String.valueOf(aliquot) + "." + fractionStr + "%";
+    }
+
+    public static void main(String[] args) throws Exception {
+
+        // check the run arguments
+        if (args.length != 6) {
+            usage();
+        }
+        String eut_version = args[0];
+        String results_dir = args[1];
+        String arg_os = args[2];
+        String arg_ws = args[3];
+        String arg_arch = args[4];
+        String tested_vm_args = args[5];
+
+        if (!eut_version.equals("3.2") && !eut_version.equals("3.3")) {
+            System.err.println("Error: unknown EUT version: " + eut_version);
+            usage();
+        }
+
+        if (!arg_os.equals("win32") && !arg_os.equals("linux")) {
+            System.err.println("Error: unknown os: " + arg_os);
+            usage();
+        }
+
+        if (!arg_ws.equals("win32") && !arg_ws.equals("gtk")) {
+            System.err.println("Error: unknown ws: " + arg_ws);
+            usage();
+        }
+
+        if (!arg_arch.equals("x86") && !arg_arch.equals("x86_64") &&
+                !arg_arch.equals("ia64")) {
+            System.err.println("Error: unknown arch: " + arg_arch);
+            usage();
+        }
+        File resultsXML = new File(results_dir + File.separatorChar
+                + "results" + File.separatorChar + "xml");
+        checkFileExistance(resultsXML);
+        File outputTXT = new File(results_dir + File.separatorChar
+                + "output.txt");
+        checkFileExistance(outputTXT);
+        File eutEFL = new File(results_dir + File.separatorChar
+                + "eut.efl");
+        checkFileExistance(eutEFL);
+        File eutSuitesProperties = new File("eut" + eut_version
+                + ".suites.properties");
+        checkFileExistance(eutSuitesProperties);
+        File testedJavaVersionLog = new File("tested.java.version");
+        checkFileExistance(testedJavaVersionLog);
+        File runningJavaVersionLog = new File("running.java.version");
+        checkFileExistance(runningJavaVersionLog);
+
+        // collect statistics from XML reports and output.txt
+        EUTStatusCollector.readExpectedFailureList(eutEFL);
+        EUTStatusCollector.readSuiteProperties(eutSuitesProperties,
+                arg_os, arg_ws, arg_arch);
+        EUTStatusCollector.getRunSuiteListFromLog(outputTXT, results_dir);
+        EUTStatusCollector.parseXMLReports(resultsXML);
+
+        // caclulate summary statictics
+        EUTSummaryInfo esi = new EUTSummaryInfo();
+        esi.ss = new EUTSuiteInfo(); // Summary Suite
+        esi.crashed_suites = new ArrayList<EUTSuiteInfo>();
+
+        for (int i = 0; i < suiteList.size(); i++) {
+            EUTSuiteInfo si = suiteList.get(i);
+
+            esi.ss.tests_total += si.tests_total; // need for Absolute Summary
+            esi.ss.tests_expected_failures_errors +=
+                    si.tests_expected_failures_errors;
+            esi.ss.tests_reported_passed += si.tests_reported_passed;
+            esi.ss.tests_reported_end_with_error +=
+                    si.tests_reported_end_with_error;
+            esi.ss.tests_reported_end_with_failure +=
+                    si.tests_reported_end_with_failure;
+            esi.ss.tests_unexpected_end_with_error +=
+                    si.tests_unexpected_end_with_error;
+            esi.ss.tests_unexpected_end_with_failure +=
+                    si.tests_unexpected_end_with_failure;
+
+            if (si.wasRun) {
+                esi.tests_run_total += si.tests_total;
+                esi.tests_run_total -= si.tests_expected_failures_errors;
+
+                if (si.isCrashed) {
+                    esi.tests_crashed_total += si.tests_total;
+                    esi.suites_crashed_total++;
+                    esi.crashed_suites.add(si);
+                }
+            }
+        }
+
+        // store remained data to strcuture to pass to emitters...
+        esi.eut_version = eut_version;
+        esi.os = arg_os;
+        esi.ws = arg_ws;
+        esi.arch = arg_arch;
+        esi.tested_vm_ags = tested_vm_args;
+        esi.testedJavaVersionLog = testedJavaVersionLog;
+        esi.runningJavaVersionLog = runningJavaVersionLog;
+
+        // print statistics into summary index.htm 
+        PrintWriter out = new PrintWriter(results_dir + File.separatorChar +
+                "index.htm");
+        EUTHTMLSummaryEmitter.emitHTMLReport(out, esi);
+        out.close();
+
+        // print statistics into summary report.txt 
+        out = new PrintWriter(results_dir + File.separatorChar +
+                "report.txt");
+        EUTTXTReportEmitter.emitTXTReport(out, esi);
+        out.close();
+        System.out.println("EUT summary report was successfully generated");
+    }
+} // end of class 'EUTReporter' definition

Propchange: harmony/enhanced/buildtest/branches/2.0/tests/eut/summary-reporter/src/org/apache/harmony/eut/reporter/EUTReporter.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: harmony/enhanced/buildtest/branches/2.0/tests/eut/summary-reporter/src/org/apache/harmony/eut/reporter/EUTStatusCollector.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/buildtest/branches/2.0/tests/eut/summary-reporter/src/org/apache/harmony/eut/reporter/EUTStatusCollector.java?rev=576965&view=auto
==============================================================================
--- harmony/enhanced/buildtest/branches/2.0/tests/eut/summary-reporter/src/org/apache/harmony/eut/reporter/EUTStatusCollector.java (added)
+++ harmony/enhanced/buildtest/branches/2.0/tests/eut/summary-reporter/src/org/apache/harmony/eut/reporter/EUTStatusCollector.java Tue Sep 18 09:09:29 2007
@@ -0,0 +1,430 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.harmony.eut.reporter;
+import org.xml.sax.helpers.DefaultHandler;
+import org.xml.sax.helpers.XMLReaderFactory;
+import org.xml.sax.XMLReader;
+import org.xml.sax.InputSource;
+import org.xml.sax.SAXException;
+import org.xml.sax.Attributes;
+import java.io.File;
+import java.io.FilenameFilter;
+import java.io.FileReader;
+import java.io.FileInputStream;
+import java.io.BufferedReader;
+import java.util.ArrayList;
+import java.util.Properties;
+
+/**
+ */
+final class EUTStatusCollector extends DefaultHandler {
+
+    /** Keeps the currently processed test reference. */
+    private static EUTTestInfo processedTest;
+
+    /** Keeps the currently processed suite reference. */
+    private static EUTSuiteInfo processedSuite;
+
+    /**
+     * This method is called from DefaultHandler.startElement when 'testsuite'
+     * tag is to be processed. This method sets 'processedSuite' field to
+     * non-null reference.
+     */
+    private static void processTestSuiteTag(Attributes attributes) {
+        String suite_name = attributes.getValue("package");
+        suite_name = suite_name + "." + attributes.getValue("name");
+
+        for (int i = 0; i < EUTReporter.suiteList.size(); i++) {
+            if (EUTReporter.suiteList.get(i).name.equals(suite_name)) {
+                processedSuite = EUTReporter.suiteList.get(i);
+                break;
+            }
+        }
+
+        // check this test suite is known (may be a configuration issue)
+        if (processedSuite == null) {
+            System.err.println("Warning: reported test suite is unknown: " +
+                    suite_name);
+            processedSuite = new EUTSuiteInfo();
+            processedSuite.name = suite_name;
+            processedSuite.wasRun = true;
+            processedSuite.tests_total = -1;
+            EUTReporter.suiteList.add(processedSuite);
+        }
+
+        // the valid XML report exists for this suite, so suite dis not crash
+        processedSuite.isCrashed = false;
+
+        // extract the toal tests number
+        int reported_total_tests = Integer.parseInt(attributes.getValue(
+                "tests"));
+
+        // this test suite is not registered on eut*.suite.properties file
+        if (processedSuite.tests_total == -1) {
+            System.err.println("Warning: reported tests number for " +
+                    suite_name + " suite is " + reported_total_tests);
+            processedSuite.tests_total = reported_total_tests;
+        }
+
+        // eut*.suite.properties may keep wrong tests number (config issue)
+        if (processedSuite.tests_total  != reported_total_tests) {
+            System.err.println("Warning: incorrect tests number for " +
+                    suite_name + " suite:");
+            System.err.println("    tests number in properties file is " +
+                    processedSuite.tests_total);
+            System.err.println("    tests number in xml report file is " +
+                    reported_total_tests);
+            processedSuite.tests_total = reported_total_tests;
+        }
+
+        // extract the number of errors and failures
+        processedSuite.tests_reported_end_with_error =
+            Integer.parseInt(attributes.getValue("errors"));
+        processedSuite.tests_reported_end_with_failure =
+            Integer.parseInt(attributes.getValue("failures"));
+
+        // calculate number of passed tests and create unexpected failure list
+        processedSuite.tests_reported_passed = processedSuite.tests_total -
+                processedSuite.tests_reported_end_with_error -
+                processedSuite.tests_reported_end_with_failure;
+        processedSuite.unexpectedErrorFailureTests =
+            new ArrayList<EUTTestInfo>();
+    }
+
+    /**
+     * Called by parser when new XML tag is found.
+     */
+    public void startElement(String uri, String localName, String qName,
+            Attributes attributes) throws SAXException {
+
+        if (qName.equals("testsuite")) {
+            processTestSuiteTag(attributes);
+            return;
+        }
+
+        if (qName.equals("testcase")) {
+            processedTest = new EUTTestInfo();
+            processedTest.testClass = attributes.getValue("classname");
+            processedTest.testName = attributes.getValue("name");
+            return;
+        }
+
+        if (qName.equals("error") || qName.equals("failure")) {
+            processedTest.testStatus = qName.equals("error") ? 
+                    EUTTestInfo.TEST_ERROR : EUTTestInfo.TEST_FAILURE;
+            processedTest.testIssueMessage = attributes.getValue("message");
+            processedTest.testIssueContent = new StringBuffer();
+            return;
+        }
+    }
+
+    /**
+     * Called by parser when XML tag processing is being completed.
+     */
+     public void endElement(String uri, String localName, String qName)
+            throws SAXException {
+
+        if (qName.equals("testsuite")) {
+            processedSuite = null;
+            return;
+        }
+
+        // only 'testcase' tag is interesting from here
+        if (!qName.equals("testcase")) {
+            return;
+        }
+        int eflIndex = EUTReporter.eflList.indexOf(processedTest.testClass
+                + "." + processedTest.testName);
+
+        // process the PASSED test situation
+        if (processedTest.testStatus == EUTTestInfo.TEST_PASSED) {
+
+            // the passed test may be registered in EFL (configuration issue)
+            if (eflIndex != -1) {
+            //    System.err.println("Warning: passed test is in EFL file: "
+            //            + processedTest.testClass + "."
+            //            + processedTest.testName);
+
+                // remove passed test from EFL to calculate passrate correctly
+                EUTReporter.eflList.remove(eflIndex);
+            }
+            return;
+        }
+
+        // expected failure/error situation
+        if (eflIndex != -1) {
+            processedSuite.tests_expected_failures_errors++;
+            return;
+        }
+
+        // unexpected failure/error case
+        if (processedTest.testStatus == EUTTestInfo.TEST_FAILURE) {
+            processedSuite.tests_unexpected_end_with_failure++;
+        } else {
+            processedSuite.tests_unexpected_end_with_error++;
+        }
+        processedSuite.unexpectedErrorFailureTests.add(processedTest);
+        processedTest = null;
+    }
+
+    /** Collects error/failure output available between related tags. */
+    public void characters(char[] ch, int start, int length)
+            throws SAXException {
+        if (processedTest != null && processedTest.testIssueContent != null) {
+            processedTest.testIssueContent.append(ch, start, length);
+        }
+    }
+
+    /** Exctacts a property which may be a platform specific */
+    private static String readSuiteProperty(Properties props, String key,
+            String os, String ws, String arch) {
+        String value = props.getProperty(key);
+
+        // there may be platform specific value
+        if (value == null) {
+            key = key + '.' + os;
+            value = props.getProperty(key);
+        }
+
+        if (value == null) {
+            key = key + '.' + ws;
+            value = props.getProperty(key);
+        }
+
+        if (value == null) {
+            key = key + '.' + arch;
+            value = props.getProperty(key);
+        }
+        return value;
+    }
+
+    /** Reads predefined suite information from a eut*.suite.property file */
+    static void readSuiteProperties(File propsFile, String os, String ws,
+            String arch) throws Exception {
+        Properties suite_props = new Properties();
+        suite_props.load(new FileInputStream(propsFile));
+        int suite_counter = 1;
+
+        for (int i = 1;; i++) {
+            String suite_prefix = "suite." + i;
+            String suite_name = readSuiteProperty(suite_props, suite_prefix +
+                    ".name", os, ws, arch);
+
+            // no more suite information is available 
+            if (suite_name == null) {
+                break;
+            }
+            String suite_tests = readSuiteProperty(suite_props, suite_prefix +
+                    ".tests", os, ws, arch);
+
+            if (suite_tests == null) {
+                throw new RuntimeException(
+                    "Internal Error: suite.properties is messed near record #"
+                    + i);
+            }
+
+            // store parsed information to suite information list
+            EUTSuiteInfo si = new EUTSuiteInfo();
+            si.name = suite_name;
+            si.tests_total = Integer.parseInt(suite_tests);
+            si.isAvailable = si.tests_total != 0;
+            EUTReporter.suiteList.add(si);
+        }
+    }
+   
+    /** Reads the EFL file content w/o comments to 'eflList' field. */
+    static void readExpectedFailureList(File eflFile)
+            throws Exception {
+        BufferedReader in = new BufferedReader(new FileReader(eflFile));
+        String line = in.readLine();
+
+        while (line != null) {
+            int sharpIndex = line.indexOf('#');
+
+            if (sharpIndex != -1) {
+                line = line.substring(0, sharpIndex);
+            }
+            line = line.trim();
+
+            if (line.length() != 0) {
+
+                // the test may be already listed (configuration issue)
+                if (EUTReporter.eflList.indexOf(line) != -1) {
+                    System.err.println("Warning: EFL lists test several times: "
+                           + line);
+                } else {
+                    EUTReporter.eflList.add(line);
+                }
+            }
+            line = in.readLine();
+        }
+        in.close();
+    }
+
+    /** Extracts run suite name from "Result file:" string in output.txt */
+    private static EUTSuiteInfo getRunSuiteNameFromLog(String line)
+            throws Exception {
+        line = line.trim();
+
+        // for now all EUT are in org.eclipse package - let's use this
+        int startIndex = line.indexOf("org.eclipse");
+
+        // EUT3.3 reports an additional information after test suite name
+        int endIndex = line.indexOf(". Result file:");
+
+        if (endIndex == -1) {
+            endIndex = line.length(); // this is EUT3.2 case
+        }
+        String run_suite_name = line.substring(startIndex, endIndex);
+        EUTSuiteInfo processedSuite = null;
+
+        for (int i = 0; i < EUTReporter.suiteList.size(); i++) {
+            EUTSuiteInfo si = EUTReporter.suiteList.get(i);
+
+            if (si.name.equals(run_suite_name)) {
+                processedSuite = si;
+                break;
+            }
+        }
+
+        if (processedSuite == null) {
+            System.err.println("Warning: run test suite is unknown: "
+                    + run_suite_name);
+            processedSuite = new EUTSuiteInfo();
+            processedSuite.name = run_suite_name;
+            processedSuite.tests_total = -1;
+            EUTReporter.suiteList.add(processedSuite);
+        }
+        processedSuite.wasRun = true;
+
+        // it is "crashed" until the valid XML report is found
+        processedSuite.isCrashed = true;
+        return processedSuite;
+    }
+
+    /** Checks if specified HTML contains the specified suite information. */
+    private static boolean isHTMLContainsSuiteInformation(String suite_name,
+            String results_dir, String html_file_name) throws Exception {
+        File htmlReport = new File(results_dir + File.separatorChar +
+                EUTReporter.path_to_html_prefix + html_file_name);
+
+        if (!htmlReport.exists()) {
+            return false;
+        }
+        boolean isFound = false;
+        BufferedReader in = new BufferedReader(new FileReader(htmlReport));
+        String line = in.readLine();
+
+        while (line != null) {
+            if (line.indexOf(suite_name) != -1) {
+                isFound = true;
+                break;
+            }
+            line = in.readLine();
+        }
+        in.close();
+        return isFound;
+    }
+
+    /**
+     * Extracts the test suite names which were actually run and suite report
+     * html file name from output.txt.
+     *
+     * There is no one-to-one correspondence between generated XML report and
+     * test suite which was run - because some XML reports is to provide
+     * information on one or more suites. So the safest way to get the list of
+     * run suites is to parse the output.txt.
+     *
+     * There is also no one-to-one correspondance between generated HTML report
+     * file name and test suite 'package' name. So the simplest way to get this
+     * HTML report file name is to extract it from output.txt.
+     *
+     * There are more tricks here:
+     * 1. Several suites may have one HTML report file, only last of them is
+     *    followed by "[style] Processing" patern, so one needs to collect
+     *    these suite to assign them this finnaly found HTML report.
+     *
+     * 2. If one of such "united" suites is crashed, then no HTML report is
+     *    generated for all of them. There is no "patern" for "crash" in
+     *    output.tx, so the list of collected suites is kept, next suite (from
+     *    dirrerent suite pack) is found, so this next suite HTML report is
+     *    incorrectly assigned to all of the suites in kept list. So one need to
+     *    double check while summary report generating if the stored HTML file
+     *    name does correspond to suite it is stored for.
+     */
+    static void getRunSuiteListFromLog(File logFile, String results_dir)
+            throws Exception {
+        BufferedReader in = new BufferedReader(new FileReader(logFile));
+        String line = in.readLine();
+        ArrayList<EUTSuiteInfo> processedSuites = new ArrayList<EUTSuiteInfo>();
+
+        while (line != null) {
+
+            // extract test suite name
+            if (line.indexOf("[echo] Running") != -1) {
+                processedSuites.add(getRunSuiteNameFromLog(line));
+            } 
+            
+            // extract suite report html file name
+            else if (line.indexOf("[style] Processing") != -1) {
+                if (processedSuites.size() == 0) {
+                    System.err.println(
+                            "Warning: unexpected \"[style] Processing\" patern"
+                            + " in output.txt: " + line);
+                } else {
+                    char separator = line.indexOf('/') != -1 ? '/' : '\\';
+                    line = line.trim();
+                    line = line.substring(
+                            line.lastIndexOf(separator) + 1, line.length());
+
+                    for (int i = 0; i < processedSuites.size(); i++) {
+                        EUTSuiteInfo si = processedSuites.get(i);
+
+                        if (isHTMLContainsSuiteInformation(si.name,
+                                    results_dir, line)) {
+                            si.html_report_file_name = line;
+                        }
+                    }
+                    processedSuites.clear();
+                }
+            }
+
+            // prepare to next line processing
+            line = in.readLine();
+        }
+        in.close();
+    }
+
+    /** Lists and parses XML reports to collect suite statistics. */
+    static void parseXMLReports(File resultsRoot) throws Exception {
+        File[] xmlNameList = resultsRoot.listFiles(new FilenameFilter() {
+            public boolean accept(File dir, String name) {
+                return name.endsWith(".xml");
+            }
+        });
+
+        for (int i = 0; i < xmlNameList.length; i++) {
+            FileReader xml_report = new FileReader(xmlNameList[i]);
+            XMLReader xr = XMLReaderFactory.createXMLReader();
+            EUTStatusCollector handler = new EUTStatusCollector();
+            xr.setContentHandler(handler);
+            xr.setErrorHandler(handler);
+            xr.parse(new InputSource(xml_report));
+            xml_report.close();
+        }
+    }
+} // end of class 'EUTStatusCollector' definition

Propchange: harmony/enhanced/buildtest/branches/2.0/tests/eut/summary-reporter/src/org/apache/harmony/eut/reporter/EUTStatusCollector.java
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message