]> git.pld-linux.org Git - packages/php-pecl-imagick.git/commitdiff
run tests
authorElan Ruusamäe <glen@delfi.ee>
Wed, 2 Nov 2016 21:27:22 +0000 (23:27 +0200)
committerElan Ruusamäe <glen@delfi.ee>
Wed, 2 Nov 2016 21:27:22 +0000 (23:27 +0200)
php-pecl-imagick.spec

index e16bddb2348b8bdddbbeb5ad4589267ef6ce53ca..c198c65c62a9d29eb46b5142fe88c58110594872 100644 (file)
@@ -1,3 +1,7 @@
+#
+# Conditional build:
+%bcond_without tests           # build without tests
+
 %define                php_name        php%{?php_suffix}
 %define                modname         imagick
 %define                status          stable
@@ -15,6 +19,10 @@ URL:         http://pecl.php.net/package/imagick/
 BuildRequires: %{php_name}-devel >= 4:5.3
 BuildRequires: ImageMagick-devel >= 1:6.2.4.0
 BuildRequires: rpmbuild(macros) >= 1.650
+%if %{with tests}
+BuildRequires: %{php_name}-cli
+BuildRequires: %{php_name}-spl
+%endif
 %{?requires_php_extension}
 Requires(triggerpostun):       sed >= 4.0
 Requires:      %{php_name}-spl
@@ -59,6 +67,20 @@ phpize
 %{__make} \
        CFLAGS_CLEAN="%{rpmcflags}"
 
+%if %{with tests}
+%{__php} -n -q \
+       -d extension_dir=modules \
+       -d extension=%{php_extensiondir}/spl.so \
+       -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="spl" \
+%endif
+
 %install
 rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT{%{php_sysconfdir}/conf.d,%{php_extensiondir},%{_examplesdir}/%{name}-%{version}}
This page took 0.123011 seconds and 4 git commands to generate.