commit 026132b40dee1a95efa90e3d4cfabfc070e59f9f
Author: Elan Ruusamäe <[email protected]>
Date:   Thu May 14 16:43:17 2015 +0300

    add network_tests bcond
    
    tests do not inherit env (uses proc_open with clean $env), so can't play
    with that

 php-pecl-solr.spec                | 5 +++--
 tests.patch => tests-online.patch | 2 +-
 2 files changed, 4 insertions(+), 3 deletions(-)
---
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 @@
  <?php
  
 -define('SOLR_SERVER_CONFIGURED', true);
-+define('SOLR_SERVER_CONFIGURED', !!getenv("SOLR_SERVER_CONFIGURED"));
++define('SOLR_SERVER_CONFIGURED', false);
  
  define('ROOT_DIRECTORY', dirname(__FILE__));
  
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/php-pecl-solr.git/commitdiff/026132b40dee1a95efa90e3d4cfabfc070e59f9f

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to