harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From var...@apache.org
Subject svn commit: r582771 - in /harmony/enhanced/drlvm/trunk/build/make/targets: reg.test.run.xml test.common.xml
Date Mon, 08 Oct 2007 10:47:06 GMT
Author: varlax
Date: Mon Oct  8 03:47:03 2007
New Revision: 582771

URL: http://svn.apache.org/viewvc?rev=582771&view=rev
Log:
Enhanced regression testing framework with complete support of plain Java tests

Modified:
    harmony/enhanced/drlvm/trunk/build/make/targets/reg.test.run.xml
    harmony/enhanced/drlvm/trunk/build/make/targets/test.common.xml

Modified: harmony/enhanced/drlvm/trunk/build/make/targets/reg.test.run.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/build/make/targets/reg.test.run.xml?rev=582771&r1=582770&r2=582771&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/build/make/targets/reg.test.run.xml (original)
+++ harmony/enhanced/drlvm/trunk/build/make/targets/reg.test.run.xml Mon Oct  8 03:47:03 2007
@@ -215,7 +215,6 @@
                   fork="yes"
                   timeout="${reg.test.timeout}">
                 <java-element/>
-                <jvmarg value="-XX:-vm.assert_dialog" />
                 <jvmarg line="@{vmarg}" />
                 <arg line="@{args}" />
                 <classpath>
@@ -223,16 +222,29 @@
                     <pathelement path="@{classpath}"/>
                 </classpath>
             </java>
-            <fail>
-test failure: 
-Test '@{test}' FAILED! (${@{test}.res.code} exit code)
+            
+            <!-- prepare JUnit-style report -->
+            <condition property="@{test}.is.passed" value="true" else="false">
+                <equals arg1="${@{test}.res.code}" arg2="@{expected-code}"/>
+            </condition>
+            <escape-cdata file="${reg.test.dir}/reports/@{test}.txt" property="@{test}.msg"/>
+            <to-junit-xml xml="${reg.test.dir}/reports/TEST-@{test}.xml"
+                suite="@{test}" 
+                status="${@{test}.is.passed}"
+                out="${@{test}.msg}"
+                msg="Exit code: ${@{test}.res.code}"
+                detail="Exit code: ${@{test}.res.code} Err: ${@{test}.msg}"/>
+
+            <if>
+                <isfalse value="${@{test}.is.passed}"/>
+                <then>
+                    <echo>
+@{test} FAILED! (${@{test}.res.code} exit code)
 See ${reg.test.dir}/reports/@{test}.txt file for details.
-                <condition>
-                    <not>
-                        <equals arg1="${@{test}.res.code}" arg2="@{expected-code}"/>
-                    </not>
-                </condition>
-            </fail>
+                    </echo>
+                    <fail message="${reg.test.failed.mark}"/>
+                </then>
+            </if>
         </sequential>
     </macrodef>
 

Modified: harmony/enhanced/drlvm/trunk/build/make/targets/test.common.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/build/make/targets/test.common.xml?rev=582771&r1=582770&r2=582771&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/build/make/targets/test.common.xml (original)
+++ harmony/enhanced/drlvm/trunk/build/make/targets/test.common.xml Mon Oct  8 03:47:03 2007
@@ -130,6 +130,7 @@
         </sequential>
     </macrodef>
     
+    <!-- Loads content of a file and escapes XML-specific symbols for attribute value
-->
     <macrodef name="escape-cdata">
         <attribute name="file"/>
         <attribute name="property"/>
@@ -146,6 +147,8 @@
                     </tokenfilter>
                 </filterchain>
             </loadfile>
+            <!-- loadfile does not define the property if file is empty -->
+            <property name="@{property}" value=""/>
         </sequential>
     </macrodef>
 



Mime
View raw message