From: Elan Ruusamäe Date: Thu, 14 May 2015 13:43:17 +0000 (+0300) Subject: add network_tests bcond X-Git-Tag: auto/th/php-pecl-solr-2.1.0-1 X-Git-Url: http://git.pld-linux.org/?p=packages%2Fphp-pecl-solr.git;a=commitdiff_plain;h=026132b40dee1a95efa90e3d4cfabfc070e59f9f add network_tests bcond tests do not inherit env (uses proc_open with clean $env), so can't play with that --- diff --git a/php-pecl-solr.spec b/php-pecl-solr.spec index 8956b96..bc98fba 100644 --- a/php-pecl-solr.spec +++ b/php-pecl-solr.spec @@ -1,6 +1,7 @@ # # Conditional build: %bcond_without tests # build without tests +%bcond_with network_tests # run tests requiring setup Solr Server on localhost:8983 %define php_name php%{?php_suffix} %define modname solr @@ -13,7 +14,7 @@ License: PHP v3.01 Group: Development/Languages Source0: http://pecl.php.net/get/%{modname}-%{version}.tgz # Source0-md5: 258865d4517312afda6890827f18f93f -Patch0: tests.patch +Patch0: tests-online.patch URL: http://pecl.php.net/package/solr BuildRequires: %{php_name}-devel >= 4:5.2.3 BuildRequires: curl-devel @@ -78,7 +79,7 @@ possible de se connecter à des serveurs via SSL. %prep %setup -qc mv %{modname}-%{version}/* . -%patch0 -p1 +%{!?with_network_tests:%patch0 -p1} %build packagexml2cl package.xml > ChangeLog diff --git a/tests.patch b/tests-online.patch similarity index 80% rename from tests.patch rename to tests-online.patch index d2db22d..157480f 100644 --- a/tests.patch +++ b/tests-online.patch @@ -4,7 +4,7 @@