run bundled testsuite
authorElan Ruusamäe <glen@delfi.ee>
Thu, 14 May 2015 13:15:07 +0000 (16:15 +0300)
committerElan Ruusamäe <glen@delfi.ee>
Thu, 14 May 2015 13:15:07 +0000 (16:15 +0300)
php-pecl-solr.spec
tests.patch [new file with mode: 0644]

index e45dc23..8956b96 100644 (file)
@@ -13,6 +13,7 @@ License:      PHP v3.01
 Group:         Development/Languages
 Source0:       http://pecl.php.net/get/%{modname}-%{version}.tgz
 # Source0-md5: 258865d4517312afda6890827f18f93f
+Patch0:                tests.patch
 URL:           http://pecl.php.net/package/solr
 BuildRequires: %{php_name}-devel >= 4:5.2.3
 BuildRequires: curl-devel
@@ -77,6 +78,7 @@ possible de se connecter à des serveurs via SSL.
 %prep
 %setup -qc
 mv %{modname}-%{version}/* .
+%patch0 -p1
 
 %build
 packagexml2cl package.xml > ChangeLog
@@ -100,6 +102,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
diff --git a/tests.patch b/tests.patch
new file mode 100644 (file)
index 0000000..d2db22d
--- /dev/null
@@ -0,0 +1,10 @@
+--- php55-pecl-solr-2.1.0/tests/test.config.inc~       2015-01-17 17:40:05.000000000 +0200
++++ php55-pecl-solr-2.1.0/tests/test.config.inc        2015-05-14 16:13:44.177230625 +0300
+@@ -1,6 +1,6 @@
+ <?php
+-define('SOLR_SERVER_CONFIGURED', true);
++define('SOLR_SERVER_CONFIGURED', !!getenv("SOLR_SERVER_CONFIGURED"));
+ define('ROOT_DIRECTORY', dirname(__FILE__));
This page took 0.351852 seconds and 4 git commands to generate.