[PATCH 1/2] Make the build fail if any of the JUnit tests have errors or failures

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Claudio Bley <cbley@xxxxxxxxxx>
---
 build.xml |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/build.xml b/build.xml
index 970b91a..61b15bb 100644
--- a/build.xml
+++ b/build.xml
@@ -64,7 +64,7 @@
 	</target>
 
 	<target name="test" depends="buildtests" description="tests the code">
-		<junit printsummary="yes" fork="yes" forkMode="perBatch">
+		<junit printsummary="yes" fork="yes" forkMode="perBatch" failureproperty="tests.failed">
 			<formatter type="plain" />
 			<classpath refid="test.classpath" />
 			<batchtest todir="target">
@@ -73,6 +73,7 @@
 				</fileset>
 			</batchtest>
 		</junit>
+		<fail message="Tests failed: check test reports." if="tests.failed" />
 	</target>
 
 	<target name="docs" depends="build" description="builds the javadoc">
-- 
1.7.9.5

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]