svn commit: r892966 - /ofbiz/trunk/build.xml

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r892966 - /ofbiz/trunk/build.xml

lektran
Author: lektran
Date: Mon Dec 21 20:23:45 2009
New Revision: 892966

URL: http://svn.apache.org/viewvc?rev=892966&view=rev
Log:
Changed behavior of the ant targets run-single-test and run-single-test-suite to be consistant with run-tests and fail the build if any of the tests fail

Modified:
    ofbiz/trunk/build.xml

Modified: ofbiz/trunk/build.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/build.xml?rev=892966&r1=892965&r2=892966&view=diff
==============================================================================
--- ofbiz/trunk/build.xml (original)
+++ ofbiz/trunk/build.xml Mon Dec 21 20:23:45 2009
@@ -472,7 +472,7 @@
     </target>
     <target name="run-single-test"
         description="Run a single test">
-        <java jar="ofbiz.jar" fork="true">
+        <java jar="ofbiz.jar" fork="true" resultproperty="test.result">
             <jvmarg value="${memory.initial.param}"/>
             <jvmarg value="${memory.max.param}"/>
             <jvmarg value="${memory.maxpermsize.param}"/>
@@ -485,10 +485,17 @@
         <move todir="runtime/logs/test-results/${test.component}-${test.case}">
             <fileset dir="runtime/logs/test-results" includes="*.xml"/>
         </move>
+        <fail message="Test run was unsuccessful">
+            <condition>
+                <not>
+                    <equals arg1="${test.result}" arg2="0"/>
+                </not>
+            </condition>
+        </fail>
     </target>
     <target name="run-single-test-suite"
             description="Run a single test suite">
-        <java jar="ofbiz.jar" fork="true">
+        <java jar="ofbiz.jar" fork="true" resultproperty="test.result">
             <jvmarg value="${memory.initial.param}"/>
             <jvmarg value="${memory.max.param}"/>
             <jvmarg value="${memory.maxpermsize.param}"/>
@@ -496,6 +503,13 @@
             <arg value="-component=${test.component}"/>
             <arg value="-suitename=${test.suiteName}"/>
         </java>
+        <fail message="Test run was unsuccessful">
+            <condition>
+                <not>
+                    <equals arg1="${test.result}" arg2="0"/>
+                </not>
+            </condition>
+        </fail>
     </target>
     <target name="run-test-list" depends="_setup-separated-test-run"
             description="Run all configured tests, stopping/starting ofbiz between each test">