Commits  committed 6935c82

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

  • Participants
  • Parent commits 4f8865e
  • Branches default

Comments (0)

Files changed (1)

File java/build.xml

   <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="**/*"/>
+    <fail message="Tests failed. Run 'ant junitreport' for more info."
+        if="test.failed"/>
   <target name="junitreport">