From 60c2de1cf201da6aa89215c9207722ec978199c3 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Wed, 9 Jan 2013 17:09:06 +0100 Subject: php-horde-Horde-Compress: add option for test --- php-horde-Horde-Compress.spec | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/php-horde-Horde-Compress.spec b/php-horde-Horde-Compress.spec index 60ae8a4..2807398 100644 --- a/php-horde-Horde-Compress.spec +++ b/php-horde-Horde-Compress.spec @@ -3,6 +3,9 @@ %global pear_name Horde_Compress %global pear_channel pear.horde.org +# can run test which requires locales to be installed +%global with_tests %{?_with_tests:1}%{!?_with_tests:0} + Name: php-horde-Horde-Compress Version: 2.0.2 Release: 1%{?dist} @@ -18,9 +21,11 @@ BuildArch: noarch BuildRequires: php-pear(PEAR) >= 1.7.0 BuildRequires: php-channel(%{pear_channel}) BuildRequires: gettext +%if %{with_tests} # To run unit tests BuildRequires: php-pear(%{pear_channel}/Horde_Test) >= 2.1.0 BuildRequires: php-pear(%{pear_channel}/Horde_Stream_Filter) >= 2.0.0 +%endif Requires(post): %{__pear} Requires(postun): %{__pear} @@ -86,11 +91,15 @@ done | tee ../%{pear_name}.lang %check +%if %{with_tests} cd %{pear_name}-%{version}/test/$(echo %{pear_name} | sed -e s:_:/:g) -phpunit\ +phpunit \ -d include_path=%{buildroot}%{pear_phpdir}:.:%{pear_phpdir} \ -d date.timezone=UTC \ . +%else +: Test disabled, missing '--with tests' option. +%endif %post @@ -119,6 +128,7 @@ fi - Update to 2.0.2 for remi repo - use local script instead of find_lang - new test layout (requires Horde_Test 2.1.0) +- add option for test (can't be run in mock) * Wed Nov 7 2012 Remi Collet - 2.0.1-1 - Update to 2.0.1 for remi repo -- cgit