]> git.pld-linux.org Git - projects/template-specs.git/commitdiff
add tests
authorElan Ruusamäe <glen@delfi.ee>
Mon, 4 Nov 2013 09:38:25 +0000 (11:38 +0200)
committerElan Ruusamäe <glen@delfi.ee>
Mon, 4 Nov 2013 09:38:25 +0000 (11:38 +0200)
php-pecl.spec

index d4f68d22f914483a21191a6618b2137392abd85a..413e8300130dc5f98b259522b7bec47f44b6e368 100644 (file)
@@ -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
This page took 0.166556 seconds and 4 git commands to generate.