]> git.pld-linux.org Git - packages/php-pecl-solr.git/blobdiff - php-pecl-solr.spec
add network_tests bcond
[packages/php-pecl-solr.git] / php-pecl-solr.spec
index e45dc23785afb2acb3495f561000b30f21e800f2..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,6 +14,7 @@ License:      PHP v3.01
 Group:         Development/Languages
 Source0:       http://pecl.php.net/get/%{modname}-%{version}.tgz
 # Source0-md5: 258865d4517312afda6890827f18f93f
+Patch0:                tests-online.patch
 URL:           http://pecl.php.net/package/solr
 BuildRequires: %{php_name}-devel >= 4:5.2.3
 BuildRequires: curl-devel
@@ -77,6 +79,7 @@ possible de se connecter à des serveurs via SSL.
 %prep
 %setup -qc
 mv %{modname}-%{version}/* .
+%{!?with_network_tests:%patch0 -p1}
 
 %build
 packagexml2cl package.xml > ChangeLog
@@ -100,6 +103,11 @@ phpize
        -d extension=%{modname}.so \
        -m > modules.log
 grep %{modname} modules.log
+
+export NO_INTERACTION=1 REPORT_EXIT_STATUS=1 MALLOC_CHECK_=2
+%{__make} test \
+       PHP_EXECUTABLE=%{__php} \
+       PHP_TEST_SHARED_SYSTEM_EXTENSIONS="json" \
 %endif
 
 %install
This page took 0.032342 seconds and 4 git commands to generate.