summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2015-04-15 08:44:44 +0200
committerRemi Collet <fedora@famillecollet.com>2015-04-15 08:44:44 +0200
commita058e6020c98833170b92810d011146676983317 (patch)
tree2e62e06ec3d579ef60974442ee337ac9fd24d22b
parentca768af1da4fdbb875212e22e61f012137af1010 (diff)
php-horde-Horde-Kolab-Storage: make test suite optional
-rw-r--r--php-horde-Horde-Kolab-Storage.spec12
1 files changed, 12 insertions, 0 deletions
diff --git a/php-horde-Horde-Kolab-Storage.spec b/php-horde-Horde-Kolab-Storage.spec
index 4337b8b..b24356d 100644
--- a/php-horde-Horde-Kolab-Storage.spec
+++ b/php-horde-Horde-Kolab-Storage.spec
@@ -7,8 +7,14 @@
# Please, preserve the changelog entries
#
%{!?__pear: %global __pear %{_bindir}/pear}
+%global bootstrap 0
%global pear_name Horde_Kolab_Storage
%global pear_channel pear.horde.org
+%if %{bootstrap}
+%global with_tests %{?_with_tests:1}%{!?_with_tests:0}
+%else
+%global with_tests %{?_without_tests:0}%{!?_without_tests:1}
+%endif
Name: php-horde-Horde-Kolab-Storage
Version: 2.1.3
@@ -26,12 +32,14 @@ BuildRequires: gettext
BuildRequires: php(language) >= 5.3.0
BuildRequires: php-pear(PEAR) >= 1.7.0
BuildRequires: php-channel(%{pear_channel})
+%if %{with_tests}
# To run unit tests
BuildRequires: php-pear(%{pear_channel}/Horde_Test) >= 2.1.0
BuildRequires: php-pear(%{pear_channel}/Horde_Cache) >= 2.0.0
BuildRequires: php-pear(%{pear_channel}/Horde_History) >= 2.0.0
BuildRequires: php-pear(%{pear_channel}/Horde_Imap_Client) >= 2.0.0
BuildRequires: php-pear(%{pear_channel}/Horde_Kolab_Format) >= 2.0.0
+%endif
Requires(post): %{__pear}
Requires(postun): %{__pear}
@@ -121,6 +129,7 @@ done | tee ../%{pear_name}.lang
%check
+%if %{with_tests}
cd %{pear_name}-%{version}/test/$(echo %{pear_name} | sed -e s:_:/:g)
# Retrieve version of Horde_Kolab_Format
@@ -133,6 +142,9 @@ sed -e "s/Horde_Kolab_Format_Xml-@version@/Horde_Kolab_Format_Xml-${VER}/" \
ComponentTest/Data/Object/Message/NewTest.php
phpunit .
+%else
+: Test disabled, bootstrap build
+%endif
%clean