harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From smish...@apache.org
Subject svn commit: r501806 - /harmony/enhanced/drlvm/trunk/build/make/targets/cunit.test.xml
Date Wed, 31 Jan 2007 11:34:27 GMT
Author: smishura
Date: Wed Jan 31 03:34:26 2007
New Revision: 501806

URL: http://svn.apache.org/viewvc?view=rev&rev=501806
Log:
Apply patch for HARMONY-3009:
[drlvm][testing] generation of results of cunit test run in html view

Tested on Windows and Linux. After applying the patch I'd observed strange 'test_native_basic'
failures (2 times) on Windows. But after full VM rebuild I can not reproduce it any more.

Modified:
    harmony/enhanced/drlvm/trunk/build/make/targets/cunit.test.xml

Modified: harmony/enhanced/drlvm/trunk/build/make/targets/cunit.test.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/build/make/targets/cunit.test.xml?view=diff&rev=501806&r1=501805&r2=501806
==============================================================================
--- harmony/enhanced/drlvm/trunk/build/make/targets/cunit.test.xml (original)
+++ harmony/enhanced/drlvm/trunk/build/make/targets/cunit.test.xml Wed Jan 31 03:34:26 2007
@@ -186,13 +186,48 @@
                         <property name="test.failed" value="true" />
                         <echo message="## TEST FAILED" />
                         <echo file="${build.semi.dir}/cunit.test.failed" message="${filename}
FAILED${line.separator}" append="true"/>
+
+<echo file="${unit.test.c.workdir}/report/${filename}.xml"><![CDATA[<?xml version="1.0"
encoding="UTF-8" ?>
+<testsuite errors="0" failures="1" name="@@@@@" tests="1" time="0.01">
+<testcase classname="@@@@@" name="test" time="0.1"><error message="FAILED"/></testcase>
+<system-out><![CDATA[@out]!]></system-out>
+</testsuite>]]> 
+</echo>
+
                     </then>
                     <else>
                         <echo message="## TEST PASSED" />
+<echo file="${unit.test.c.workdir}/report/${filename}.xml"><![CDATA[<?xml version="1.0"
encoding="UTF-8" ?>
+<testsuite errors="0" failures="0" name="@@@@@" tests="1" time="0.01">
+<testcase classname="@@@@@" name="test" time="0.1"></testcase>
+<system-out><![CDATA[@out]!]></system-out>
+</testsuite>]]> 
+</echo>
+                    </else>
+                </if>
+                <replace file="${unit.test.c.workdir}/report/${filename}.xml" token="@@@@@"
value="${filename}" /> 
+                <!-- grab System.out to xml-file -->
+                <if>
+                    <isset property="outputproperty" />
+                    <then>
+                        <replace file="${unit.test.c.workdir}/report/${filename}.xml"
token="@out]!" value="${outputproperty}]" />
+                    </then>
+                    <else>
+                        <replace file="${unit.test.c.workdir}/report/${filename}.xml"
token="@out]!" value="]" />
                     </else>
                 </if>
             </sequential>
         </for>
+
+        <property name="cunit.tests.report.dir" location="${unit.test.c.workdir}/report/html"/>
+        <delete dir="${cunit.tests.report.dir}" />
+        <mkdir dir="${cunit.tests.report.dir}" />
+        <junitreport todir="${cunit.tests.report.dir}">
+            <fileset dir="${unit.test.c.workdir}/report">
+                <include name="*.xml"/>
+            </fileset>
+            <report format="frames" todir="${cunit.tests.report.dir}"/>
+        </junitreport>
 
         <echo message="## Please find tests and results at ${build.dir}/_cunit.tests/"
/>
         <fail unless="run.all.tests" if="test.failed" message="## SOME TESTS FAILED"/>



Mime
View raw message