remi pushed to php-horde-Horde-Kolab-Storage (f20). "disable test suite with old PHPUnit"

notifications at fedoraproject.org notifications at fedoraproject.org
Wed Apr 15 06:40:59 UTC 2015


>From 751e6a1c3b1d3cb5fab7ee10f72279f4367f96d7 Mon Sep 17 00:00:00 2001
From: Remi Collet <remi at fedoraproject.org>
Date: Wed, 15 Apr 2015 08:39:59 +0200
Subject: disable test suite with old PHPUnit


diff --git a/php-horde-Horde-Kolab-Storage.spec b/php-horde-Horde-Kolab-Storage.spec
index 41544f5..d44a05d 100644
--- a/php-horde-Horde-Kolab-Storage.spec
+++ b/php-horde-Horde-Kolab-Storage.spec
@@ -8,8 +8,19 @@
 #
 %{!?pear_metadir: %global pear_metadir %{pear_phpdir}}
 %{!?__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
+%if 0%{?fedora} < 21 && 0%{?rhel} < 7
+# Test suite requires PHPUnit 4.5
+%global with_tests   %{?_with_tests:1}%{!?_with_tests:0}
+%else
+%global with_tests   %{?_without_tests:0}%{!?_without_tests:1}
+%endif
+%endif
 
 Name:           php-horde-Horde-Kolab-Storage
 Version:        2.1.3
@@ -26,12 +37,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}
@@ -120,6 +133,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
@@ -132,6 +146,9 @@ sed -e "s/Horde_Kolab_Format_Xml- at version@/Horde_Kolab_Format_Xml-${VER}/" \
        ComponentTest/Data/Object/Message/NewTest.php
 
 phpunit .
+%else
+: Test disabled, bootstrap build
+%endif
 
 
 %post
-- 
cgit v0.10.2


	http://pkgs.fedoraproject.org/cgit/php-horde-Horde-Kolab-Storage.git/commit/?h=f20&id=751e6a1c3b1d3cb5fab7ee10f72279f4367f96d7


More information about the scm-commits mailing list