summaryrefslogtreecommitdiffstats
path: root/php-pecl-amqp.spec
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2023-09-07 13:48:44 +0200
committerRemi Collet <remi@php.net>2023-09-07 13:48:44 +0200
commit0972f1442e3e75e8ecdb33b9b9cb76c81b50cd4c (patch)
treec7410e30627a7988750bf9e00f6cd5db02a12ddc /php-pecl-amqp.spec
parent862e2d9a30a09214733e117245defc5d02f3d098 (diff)
update to 2.1.0
enable test suite add option --with server to run full test suite
Diffstat (limited to 'php-pecl-amqp.spec')
-rw-r--r--php-pecl-amqp.spec27
1 files changed, 21 insertions, 6 deletions
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 <remi@remirepo.net> - 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 <remi@remirepo.net> - 2.0.0-2
- rebuild for PHP 8.3.0RC1