1
0
Ludwig Nussel 2014-08-14 12:57:39 +00:00 committed by Git OBS Bridge
commit cd666473b1
3 changed files with 39 additions and 0 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Tue Aug 12 11:10:06 UTC 2014 - lnussel@suse.de
- add bcond java_bootstrap to build without unit tests
(commons-logging-1.1.3-src-junit.diff)
-------------------------------------------------------------------
Fri Jun 27 13:22:19 UTC 2014 - tchvatal@suse.com

View File

@ -20,6 +20,7 @@
%define base_name logging
%define short_name commons-%{base_name}
%bcond_with java_bootstrap
Name: apache-%{short_name}
Version: 1.1.3
@ -32,9 +33,12 @@ Source0: http://www.apache.org/dist/commons/%{base_name}/source/%{short_n
Source1: http://www.apache.org/dist/commons/%{base_name}/source/%{short_name}-%{version}-src.tar.gz.asc
Source2: apache-commons-logging.keyring
Source3: http://mirrors.ibiblio.org/pub/mirrors/maven2/%{short_name}/%{short_name}-api/1.1/%{short_name}-api-1.1.pom
Patch0: commons-logging-1.1.3-src-junit.diff
BuildRequires: ant
%if !%{with java_bootstrap}
BuildRequires: ant-junit
%endif
BuildRequires: apache-commons-parent
BuildRequires: java-devel >= 1.6.0
BuildRequires: javapackages-tools
@ -84,6 +88,7 @@ API documentation for %{name}.
%prep
%gpg_verify %{SOURCE1}
%setup -q -n %{short_name}-%{version}-src
%patch0 -p1
# Sent upstream https://issues.apache.org/jira/browse/LOGGING-143
%pom_remove_dep :avalon-framework

View File

@ -0,0 +1,28 @@
Index: commons-logging-1.1.3-src/build.xml
===================================================================
--- commons-logging-1.1.3-src.orig/build.xml
+++ commons-logging-1.1.3-src/build.xml
@@ -719,7 +719,8 @@
- ant -Dtestmatch=**/FooTestCase testall
-->
- <target name="test" depends="log4j12-test-warning, compile.tests"
+ <target name="test" depends="log4j12-test-warning, compile.tests, junit-present"
+ if="junit.present"
description="Run all unit tests">
<echo message="Test output can be found in directory ${build.home}/test-reports."/>
<delete dir="${build.home}/test-reports"/>
@@ -773,4 +774,13 @@
</fail>
</target>
+ <target name="test-junit-present">
+ <available classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTask" property="junit.present"/>
+ </target>
+ <target name="junit-present" depends="test-junit-present" unless="junit.present">
+ <echo>================================= WARNING ================================</echo>
+ <echo> Junit isn&apos;t present in your $ANT_HOME/lib directory. Tests not executed. </echo>
+ <echo>==========================================================================</echo>
+ </target>
+
</project>