Commits

Anonymous committed 6935c82

JAVA build: Changing the build file to make it more obvious when tests fail and print a message.

Comments (0)

Files changed (1)

 
   <target name="junit" depends="test-jar">
     <mkdir dir="${report.dir}"/>
-    <junit printsummary="yes">
+    <junit printsummary="yes"
+        failureProperty="test.failed" errorProperty="test.failed">
       <classpath refid="test.classpath"/>
       <formatter type="xml"/>
       <batchtest fork="no" todir="${report.dir}">
         <fileset dir="${geocoder.test.dir}" includes="**/*Test.java"/>
       </batchtest>
     </junit>
+    <fail message="Tests failed. Run 'ant junitreport' for more info."
+        if="test.failed"/>
   </target>
 
   <target name="junitreport">