[projects/template-specs] add tests

glen glen at pld-linux.org
Mon Nov 4 10:38:37 CET 2013


commit 512c7faf1e849bebc1479f4c32258b3568afb46d
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Mon Nov 4 11:38:25 2013 +0200

    add tests

 php-pecl.spec | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
---
diff --git a/php-pecl.spec b/php-pecl.spec
index d4f68d2..413e830 100644
--- a/php-pecl.spec
+++ b/php-pecl.spec
@@ -14,6 +14,7 @@ Group:		Development/Languages/PHP
 Source0:	http://pecl.php.net/get/%{modname}-%{version}.tgz
 # Source0-md5:	-
 URL:		http://pecl.php.net/package/modname/
+%{?with_tests:BuildRequires:    %{php_name}-cli}
 BuildRequires:	%{php_name}-devel
 BuildRequires:	rpmbuild(macros) >= 1.666
 %{?requires_php_extension}
@@ -32,6 +33,19 @@ phpize
 %configure
 %{__make}
 
+%if %{with tests}
+# simple module load test
+%{__php} -n -q \
+	-d extension_dir=modules \
+	-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}
+%endif
+
 %install
 rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/projects/template-specs.git/commitdiff/512c7faf1e849bebc1479f4c32258b3568afb46d



More information about the pld-cvs-commit mailing list