[libvirt] [PATCH 1/2] Make the build fail if any of the JUnit tests have errors or failures
Claudio Bley
cbley at av-test.de
Thu Jan 17 15:15:25 UTC 2013
Signed-off-by: Claudio Bley <cbley at av-test.de>
---
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
More information about the libvir-list
mailing list