From 8dfd8797a4a6e5598f5a51bfa875ea63f5e6a40e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Elan=20Ruusam=C3=A4e?= Date: Wed, 23 Nov 2016 03:47:05 +0200 Subject: [PATCH] simple module load test --- php-pecl-memcache.spec | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/php-pecl-memcache.spec b/php-pecl-memcache.spec index 3df2f04..06f542c 100644 --- a/php-pecl-memcache.spec +++ b/php-pecl-memcache.spec @@ -1,3 +1,7 @@ +# +# Conditional build: +%bcond_without tests # build without tests + %define php_name php%{?php_suffix} %define modname memcache %define php_min_version 5.0.0 @@ -23,6 +27,10 @@ BuildRequires: %{php_name}-xml BuildRequires: php-packagexml2cl BuildRequires: rpm-php-pearprov >= 4.4.2-11 BuildRequires: rpmbuild(macros) >= 1.650 +%if %{with tests} +BuildRequires: %{php_name}-cli +BuildRequires: %{php_name}-session +%endif %{?requires_php_extension} Requires: %{php_name}-session Requires: %{php_name}-zlib @@ -87,6 +95,16 @@ phpize --with-zlib-dir=/usr %{__make} +%if %{with tests} +# simple module load test +%{__php} -n -q \ + -d extension_dir=modules \ + -d extension=%{php_extensiondir}/session.so \ + -d extension=%{modname}.so \ + -m > modules.log +grep %{modname} modules.log +%endif + %install rm -rf $RPM_BUILD_ROOT install -d $RPM_BUILD_ROOT{%{php_sysconfdir}/conf.d,%{php_extensiondir},%{_examplesdir}/%{name}-%{version}} -- 2.44.0