From: Elan Ruusamäe Date: Tue, 17 Oct 2017 17:32:31 +0000 (+0300) Subject: always run module load test X-Git-Tag: auto/th/php-pecl-mongodb-1.2.11-1~8 X-Git-Url: http://git.pld-linux.org/?p=packages%2Fphp-pecl-mongodb.git;a=commitdiff_plain;h=c485d9e always run module load test --- diff --git a/php-pecl-mongodb.spec b/php-pecl-mongodb.spec index e09a677..c6c9cf1 100644 --- a/php-pecl-mongodb.spec +++ b/php-pecl-mongodb.spec @@ -68,8 +68,7 @@ phpize %{__make} -%if %{with tests} -# simple module load test +# simple module load test, always enabled %{__php} -n -q \ -d extension_dir=modules \ -d extension=%{php_extensiondir}/json.so \ @@ -78,10 +77,18 @@ phpize -m > modules.log grep %{modname} modules.log +%if %{with tests} +cat <<'EOF' > run-tests.sh +#!/bin/sh export NO_INTERACTION=1 REPORT_EXIT_STATUS=1 MALLOC_CHECK_=2 -%{__make} test \ +exec %{__make} test \ PHP_EXECUTABLE=%{__php} \ - PHP_TEST_SHARED_SYSTEM_EXTENSIONS="json" + PHP_TEST_SHARED_SYSTEM_EXTENSIONS="json spl" \ + RUN_TESTS_SETTINGS="-q $*" +EOF +chmod +x run-tests.sh + +./run-tests.sh %endif %install