[cobertura] Fail build on test failure
Mikolaj Izdebski
mizdebsk at fedoraproject.org
Mon Jun 2 14:46:44 UTC 2014
commit 1ac76ba03c3e7fd75148070c923d6a97c5b15e7c
Author: Mikolaj Izdebski <mizdebsk at redhat.com>
Date: Mon Jun 2 16:46:30 2014 +0200
Fail build on test failure
cobertura-fail-build-on-test-failure.patch | 11 +++++++++++
cobertura.spec | 7 ++++++-
2 files changed, 17 insertions(+), 1 deletions(-)
---
diff --git a/cobertura-fail-build-on-test-failure.patch b/cobertura-fail-build-on-test-failure.patch
new file mode 100644
index 0000000..f230936
--- /dev/null
+++ b/cobertura-fail-build-on-test-failure.patch
@@ -0,0 +1,11 @@
+--- cobertura-1.9.4.1/build.xml~ 2010-03-03 20:32:28.000000000 +0100
++++ cobertura-1.9.4.1/build.xml 2014-06-02 16:43:53.456500100 +0200
+@@ -266,6 +266,8 @@
+ <report format="frames" todir="${build.reports.dir}/junit-html" />
+ </junitreport>
+
++ <fail message="There are test failures." if="test.failed" />
++
+ </target>
+
+ <target name="coverage-report">
diff --git a/cobertura.spec b/cobertura.spec
index 8852bc8..5d49541 100644
--- a/cobertura.spec
+++ b/cobertura.spec
@@ -1,6 +1,6 @@
Name: cobertura
Version: 1.9.4.1
-Release: 13%{?dist}
+Release: 14%{?dist}
Summary: Java tool that calculates the percentage of code accessed by tests
# ASL 2.0: src/net/sourceforge/cobertura/webapp/web.xml
@@ -21,6 +21,7 @@ Source4: http://www.apache.org/licenses/LICENSE-2.0.txt
Source5: create-tarball.sh
Patch0: %{name}-unmappable-characters.patch
+Patch1: %{name}-fail-build-on-test-failure.patch
BuildRequires: ant
BuildRequires: ant-junit
@@ -62,6 +63,7 @@ This package contains the API documentation for %{name}.
%prep
%setup -q
%patch0 -p1
+%patch1 -p1
cp %{SOURCE3} LICENSE-ASL-1.1
cp %{SOURCE4} LICENSE-ASL-2.0
@@ -126,6 +128,9 @@ cp -rp build/api/* %{buildroot}%{_javadocdir}/%{name}
%{_javadocdir}/%{name}
%changelog
+* Mon Jun 2 2014 Mikolaj Izdebski <mizdebsk at redhat.com> - 1.9.4.1-14
+- Fail build on test failure
+
* Wed May 21 2014 Orion Poplawski <orion at cora.nwra.com> - 1.9.4.1-13
- Use junit instead of junit4
More information about the scm-commits
mailing list