From fedee1f311abc7f99158b6f161d2aa99f1f66de2 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Fri, 10 Sep 2021 15:14:31 +0200 Subject: run upstream test suite during the build (lot of tests are skipped as no configured server) --- php-pecl-rdkafka5.spec | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'php-pecl-rdkafka5.spec') diff --git a/php-pecl-rdkafka5.spec b/php-pecl-rdkafka5.spec index f161bfb..930a5f9 100644 --- a/php-pecl-rdkafka5.spec +++ b/php-pecl-rdkafka5.spec @@ -21,11 +21,12 @@ Summary: Kafka client based on librdkafka Name: %{?sub_prefix}php-pecl-%{pecl_name}5 Version: 5.0.0 -Release: 3%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')} +Release: 4%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')} License: MIT URL: https://pecl.php.net/package/%{pecl_name} Source0: https://pecl.php.net/get/%{pecl_name}-%{version}.tgz +Source1: https://raw.githubusercontent.com/arnaud-lb/php-rdkafka/%{version}/tests/integration-tests-check.php Patch0: %{pecl_name}-php81.patch BuildRequires: make @@ -95,6 +96,7 @@ sed -e 's/role="test"/role="src"/' \ cd NTS %patch0 -p1 +cp %{SOURCE1} tests # Sanity check, really often broken extver=$(sed -n '/#define PHP_RDKAFKA_VERSION/{s/.* "//;s/".*$//;p}' php_rdkafka.h) @@ -194,6 +196,13 @@ cd ../ZTS --modules | grep '^%{pecl_name}$' %endif +: Upstream test suite for NTS extension +cd ../NTS +TEST_PHP_EXECUTABLE=%{__php} \ +TEST_PHP_ARGS="-n -d extension=$PWD/modules/%{pecl_name}.so" \ +REPORT_EXIT_STATUS=1 \ +%{__php} -n run-tests.php -q --show-diff + %files %{?_licensedir:%license NTS/LICENSE} @@ -210,6 +219,10 @@ cd ../ZTS %changelog +* Fri Sep 10 2021 Remi Collet - 5.0.0-4 +- run upstream test suite during the build + (lot of tests are skipped as no configured server) + * Fri Sep 10 2021 Remi Collet - 5.0.0-3 - add fix for PHP 8.1 from upstream and from https://github.com/arnaud-lb/php-rdkafka/pull/467 -- cgit