[packages/php-pecl-uri_template] run tests

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


commit 52ed46b42492bfa409cbd060f1275521f461d239
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Mon Nov 4 11:36:56 2013 +0200

    run tests

 php-pecl-uri_template.spec | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
---
diff --git a/php-pecl-uri_template.spec b/php-pecl-uri_template.spec
index 785fa48..3f16de7 100644
--- a/php-pecl-uri_template.spec
+++ b/php-pecl-uri_template.spec
@@ -13,6 +13,7 @@ Group:		Development/Languages/PHP
 Source0:	http://pecl.php.net/get/%{modname}-%{version}.tgz
 # Source0-md5:	652dbdb85da3c820f369526155355522
 URL:		http://pecl.php.net/package/uri_template
+%{?with_tests:BuildRequires:    %{php_name}-cli}
 BuildRequires:	%{php_name}-devel >= 4:5.3.1
 BuildRequires:	rpmbuild(macros) >= 1.666
 %{?requires_php_extension}
@@ -30,6 +31,20 @@ 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
+unset TZ LANG LC_ALL || :
+%{__make} test \
+	PHP_EXECUTABLE=%{__php}
+%endif
+
 %install
 rm -rf $RPM_BUILD_ROOT
 %{__make} install \
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/php-pecl-uri_template.git/commitdiff/52ed46b42492bfa409cbd060f1275521f461d239



More information about the pld-cvs-commit mailing list