]> git.pld-linux.org Git - packages/php-pecl-solr.git/commitdiff
add network_tests bcond auto/th/php-pecl-solr-2.1.0-1
authorElan Ruusamäe <glen@delfi.ee>
Thu, 14 May 2015 13:43:17 +0000 (16:43 +0300)
committerElan Ruusamäe <glen@delfi.ee>
Thu, 14 May 2015 13:43:42 +0000 (16:43 +0300)
tests do not inherit env (uses proc_open with clean $env), so can't play
with that

php-pecl-solr.spec
tests-online.patch [moved from tests.patch with 80% similarity]

index 8956b96d9f3580c18719295507599d6f8d204645..bc98fba660ea3c71c1e41fe5c58a49afdd01bc93 100644 (file)
@@ -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
similarity index 80%
rename from tests.patch
rename to tests-online.patch
index d2db22d87e1f096a1f582cc629db05c80b93023f..157480fa22b133be9cfb6fa9d3647ab1c57e9c59 100644 (file)
@@ -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__));
  
This page took 0.068322 seconds and 4 git commands to generate.