ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mben...@apache.org
Subject svn commit: r450500 - /ant/core/trunk/build.xml
Date Wed, 27 Sep 2006 16:28:49 GMT
Author: mbenson
Date: Wed Sep 27 09:28:46 2006
New Revision: 450500

URL: http://svn.apache.org/viewvc?view=rev&rev=450500
Log:
restructure some stuff; run-tests shared failure message with test,
thereby pointing to nonexistent test reports. Also running a single junit test
from run-tests was broken, which is how my breaking SizeSelector change
made it in.

Modified:
    ant/core/trunk/build.xml

Modified: ant/core/trunk/build.xml
URL: http://svn.apache.org/viewvc/ant/core/trunk/build.xml?view=diff&rev=450500&r1=450499&r2=450500
==============================================================================
--- ant/core/trunk/build.xml (original)
+++ ant/core/trunk/build.xml Wed Sep 27 09:28:46 2006
@@ -1549,22 +1549,26 @@
        ===================================================================
   -->
 
-  <target name="tests-failed">
-    <fail>Unit tests failed; see ${build.junit.reports} / ${antunit.reports}
-      <condition>
-        <or>
-          <isset property="junit.failed" />
-          <isset property="antunit.failed" />
-        </or>
-      </condition>
-    </fail>
+  <target name="check-failed">
+    <condition property="tests.failed">
+      <or>
+        <isset property="junit.failed" />
+        <isset property="antunit.failed" />
+      </or>
+    </condition>
   </target>
 
-  <target name="test" depends="junit-report,antunit-report,tests-failed"
-          description="--> run unit tests and reports" />
+  <target name="test" description="--> run unit tests and reports"
+          depends="dump-info,junit-report,antunit-report,check-failed">
+    <fail if="tests.failed">Unit tests failed;
+see ${build.junit.reports} / ${antunit.reports}
+    </fail>
+  </target>
 
-  <target name="run-tests" depends="junit-tests,antunit-tests,tests-failed"
-          description="--> run unit tests without reports" />
+  <target name="run-tests" depends="dump-info,junit-tests,antunit-tests,check-failed"
+          description="--> run unit tests without reports">
+    <fail if="tests.failed" message="Unit tests failed" />
+  </target>
 
   <target name="test-init" depends="probe-offline,check_for_optional_packages">
     <macrodef name="test-junit">
@@ -1674,8 +1678,7 @@
     </condition>
   </target>
 
-  <target name="junit-report" depends="junit-tests,junit-single-test"
-      if="run.junit.report">
+  <target name="junit-report" depends="junit-tests" if="run.junit.report">
     <mkdir dir="${build.junit.reports}" />
     <junitreport todir="${build.junit.reports}">
       <fileset dir="${build.junit.xml}">
@@ -1685,7 +1688,9 @@
     </junitreport>
   </target>
 
-  <target name="junit-tests" depends="dump-info,compile-tests,test-init"
+  <target name="junit-tests" depends="junit-batch,junit-single-test" />
+
+  <target name="junit-batch" depends="compile-tests,test-init"
       if="junit.batch">
 
     <property name="junit.includes" value="**/*Test*" />
@@ -1836,11 +1841,10 @@
   </target>
 
   <target name="junit-single-test" depends="compile-tests,junit-single-test-only"
-    description="--> runs the single unit test defined in the testcase property"/>
+    description="--> runs the single unit test at $${junit.testcase}" />
 
-  <target name="junit-single-test-only" if="junit.single"
-    description="--> runs the single unit test defined in the testcase property"
-     depends="test-init">
+  <target name="junit-single-test-only" depends="test-init" if="junit.single"
+    description="--> runs the single unit test at $${junit.testcase} (no compile)">
     <test-junit>
       <formatter type="plain" usefile="false"/>
       <test name="${junit.testcase}" todir="${build.junit.xml}"/>



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message