xml-commons-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cross...@apache.org
Subject svn commit: r669407 - /xml/commons/trunk/java/tests/resolver/build.xml
Date Thu, 19 Jun 2008 07:05:18 GMT
Author: crossley
Date: Thu Jun 19 00:05:17 2008
New Revision: 669407

URL: http://svn.apache.org/viewvc?rev=669407&view=rev
Log:
Add a "run-tests" target to run all individual tests and report a failure.

Modified:
    xml/commons/trunk/java/tests/resolver/build.xml

Modified: xml/commons/trunk/java/tests/resolver/build.xml
URL: http://svn.apache.org/viewvc/xml/commons/trunk/java/tests/resolver/build.xml?rev=669407&r1=669406&r2=669407&view=diff
==============================================================================
--- xml/commons/trunk/java/tests/resolver/build.xml (original)
+++ xml/commons/trunk/java/tests/resolver/build.xml Thu Jun 19 00:05:17 2008
@@ -127,8 +127,24 @@
     <pathelement location="${build.classes.dir}"/>
   </path>
 
+  <target name="check-tests-failed">
+    <condition property="tests.failed">
+      <or>
+        <equals arg1="${result.statictest}" arg2="1"/>
+        <equals arg1="${result.dynamictest}" arg2="1"/>
+        <equals arg1="${result.extendedtest}" arg2="1"/>
+        <equals arg1="${result.jartest}" arg2="1"/>
+      </or>
+    </condition>
+  </target>
+
+  <target name="run-tests" depends="statictest,dynamictest,extendedtest,jartest,check-tests-failed"
+    description="Run all the individual tests.">
+    <fail if="tests.failed" message="Some tests failed"/>
+  </target>
+
   <target name="statictest" depends="compile">
-    <java classname="StaticTest" fork="true">
+    <java classname="StaticTest" fork="true" resultproperty="result.statictest">
       <classpath refid="tests-class-path"/>
       <arg value="-c"/>
       <arg file="catalogs/main.catalog"/>
@@ -137,7 +153,7 @@
   </target>
 
   <target name="dynamictest" depends="compile">
-    <java classname="DynamicTest" fork="true">
+    <java classname="DynamicTest" fork="true" resultproperty="result.dynamictest">
       <classpath refid="tests-class-path"/>
       <arg value="-c"/>
       <arg file="catalogs/main.catalog"/>
@@ -146,7 +162,7 @@
   </target>
 
   <target name="extendedtest" depends="compile">
-    <java classname="ExtendedTest" fork="true">
+    <java classname="ExtendedTest" fork="true" resultproperty="result.extendedtest">
       <classpath refid="tests-class-path"/>
       <arg value="-c"/>
       <arg file="catalogs/extended.xml"/>
@@ -155,7 +171,7 @@
   </target>
 
   <target name="jartest" depends="compile,catalogs.jar">
-    <java classname="JarTest" fork="true">
+    <java classname="JarTest" fork="true" resultproperty="result.jartest">
       <classpath refid="tests-class-path"/>
       <classpath>
         <pathelement location="${build.dir}/catalogs.jar"/>



Mime
View raw message