From 0972f1442e3e75e8ecdb33b9b9cb76c81b50cd4c Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 7 Sep 2023 13:48:44 +0200 Subject: update to 2.1.0 enable test suite add option --with server to run full test suite --- php-pecl-amqp.spec | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) (limited to 'php-pecl-amqp.spec') diff --git a/php-pecl-amqp.spec b/php-pecl-amqp.spec index 6bbc596..63fad4b 100644 --- a/php-pecl-amqp.spec +++ b/php-pecl-amqp.spec @@ -12,12 +12,13 @@ %{?scl:%scl_package php-pecl-amqp} -%bcond_with tests +%bcond_without tests +%bcond_with server %global with_zts 0%{!?_without_zts:%{?__ztsphp:1}} %global pecl_name amqp %global ini_name 40-%{pecl_name}.ini -%global upstream_version 2.0.0 +%global upstream_version 2.1.0 #global upstream_prever RC1 %global upstream_lower %(echo %{upstream_prever} | tr '[:upper:]' '[:lower:]') %global sources %{pecl_name}-%{upstream_version}%{?upstream_prever} @@ -28,7 +29,7 @@ Summary: Communicate with any AMQP compliant server Name: %{?scl_prefix}php-pecl-amqp Version: %{upstream_version}%{?upstream_prever:~%{upstream_lower}} -Release: 2%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} +Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} License: PHP-3.01 URL: https://pecl.php.net/package/amqp Source0: https://pecl.php.net/get/%{pecl_name}-%{upstream_version}%{?upstream_prever}.tgz @@ -39,7 +40,7 @@ BuildRequires: %{?scl_prefix}php-devel >= 7.4 BuildRequires: %{?scl_prefix}php-pear BuildRequires: librabbitmq-devel >= 0.8.0 Requires: librabbitmq%{?_isa} >= %{buildver} -%if %{with tests} +%if %{with server} BuildRequires: rabbitmq-server BuildRequires: hostname %endif @@ -215,29 +216,38 @@ done %endif %if %{with tests} +pushd %{sources} + +# online +rm tests/amqpconnection_construct_with_connect_timeout.phpt + +%if %{with server} mkdir log run base : Launch the RabbitMQ service export LANG=C.UTF-8 export RABBITMQ_PID_FILE=$PWD/run/pid export RABBITMQ_LOG_BASE=$PWD/log export RABBITMQ_MNESIA_BASE=$PWD/base +export PHP_AMQP_HOST=localhost /usr/lib/rabbitmq/bin/rabbitmq-server &>log/output & /usr/lib/rabbitmq/bin/rabbitmqctl wait $RABBITMQ_PID_FILE +%endif ret=0 -pushd %{sources} - : Run the upstream test Suite for NTS extension TEST_PHP_ARGS="-n -d extension=$PWD/../NTS/modules/%{pecl_name}.so" \ +SKIP_ONLINE_TESTS=1 \ REPORT_EXIT_STATUS=1 \ %{__php} -n run-tests.php -q -x -P --show-diff || ret=1 popd +%if %{with server} : Cleanup if [ -s $RABBITMQ_PID_FILE ]; then kill $(cat $RABBITMQ_PID_FILE) fi rm -rf log run base +%endif exit $ret %endif @@ -278,6 +288,11 @@ fi %changelog +* Thu Sep 7 2023 Remi Collet - 2.1.0-1 +- update to 2.1.0 +- enable test suite +- add option --with server to run full test suite + * Wed Aug 30 2023 Remi Collet - 2.0.0-2 - rebuild for PHP 8.3.0RC1 -- cgit