[packages/php-pecl-imagick] run tests
glen
glen at pld-linux.org
Wed Nov 2 22:42:50 CET 2016
commit a70f8547e09939e4c5ceeef5543b185550f0d39c
Author: Elan Ruusamäe <glen at delfi.ee>
Date: Wed Nov 2 23:27:22 2016 +0200
run tests
php-pecl-imagick.spec | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
---
diff --git a/php-pecl-imagick.spec b/php-pecl-imagick.spec
index e16bddb..c198c65 100644
--- a/php-pecl-imagick.spec
+++ b/php-pecl-imagick.spec
@@ -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}}
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/php-pecl-imagick.git/commitdiff/f5c1a0f1b28eea8e9bac2106fd1df0da2a104209
More information about the pld-cvs-commit
mailing list