Author: maartenc
Date: Tue Jan 23 12:56:30 2007
New Revision: 499129
URL: http://svn.apache.org/viewvc?view=rev&rev=499129
Log:
Let Ant build fail if junit tests fail
Modified:
incubator/ivy/trunk/build.xml
Modified: incubator/ivy/trunk/build.xml
URL:
http://svn.apache.org/viewvc/incubator/ivy/trunk/build.xml?view=diff&rev=499129&r1=499128&r2=499129
==============================================================================
--- incubator/ivy/trunk/build.xml (original)
+++ incubator/ivy/trunk/build.xml Tue Jan 23 12:56:30 2007
@@ -194,7 +194,7 @@
</ivy:addpath>
</target>
- <target name="test" depends="jar, init-tests">
+ <target name="test-internal" depends="jar, init-tests">
<javac srcdir="${test.dir}"
destdir="${test.build.dir}"
classpathref="run.classpath"
@@ -228,10 +228,15 @@
</junit>
</target>
+ <target name="test" depends="test-internal">
+ <fail if="test.failed"
+ message="At least one test has failed. See logs for
details"/>
+ </target>
+
<!-- =================================================================
REPORTS AND DOCUMENTATION
================================================================= -->
- <target name="test-report" depends="test">
+ <target name="test-report" depends="test-internal">
<junitreport todir="${test.xml.dir}">
<fileset dir="${test.xml.dir}">
<include name="TEST-*.xml" />