]> git.pld-linux.org Git - packages/php-pecl-archive.git/commitdiff
add module load test
authorElan Ruusamäe <glen@delfi.ee>
Thu, 12 Jun 2014 15:13:18 +0000 (18:13 +0300)
committerElan Ruusamäe <glen@delfi.ee>
Thu, 12 Jun 2014 15:13:18 +0000 (18:13 +0300)
php-pecl-archive.spec

index eb8253e57a3357e96dc30838af2c5f9fd2027d4f..b86a4c26de106e0a8dec9b6678de27651fa888f4 100644 (file)
@@ -1,3 +1,7 @@
+#
+# Conditional build:
+%bcond_without tests           # build without tests
+
 %define                php_name        php%{?php_suffix}
 %define                modname         archive
 %define                status          beta
@@ -15,6 +19,7 @@ URL:          http://pecl.php.net/package/archive/
 BuildRequires: %{php_name}-devel >= 3:5.0.4
 BuildRequires: libarchive-devel
 BuildRequires: rpmbuild(macros) >= 1.650
+%{?with_tests:BuildRequires:   %{php_name}-cli}
 %{?requires_php_extension}
 Provides:      php(%{modname}) = %{version}
 Obsoletes:     php-pecl-archive < 0.2-17
@@ -42,6 +47,15 @@ phpize
 %configure
 %{__make}
 
+%if %{with tests}
+# simple module load test
+%{__php} -n \
+       -dextension_dir=modules \
+       -dextension=%{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}}
This page took 0.079252 seconds and 4 git commands to generate.