From cb19b20aa78b6a7f1623b0c88228bcc9809cbea2 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Tue, 11 Aug 2020 08:52:05 +0200 Subject: switch to phpunit9 --- php-phar-io-manifest2.spec | 33 ++++++++++++++++++++++----------- 1 file changed, 22 insertions(+), 11 deletions(-) diff --git a/php-phar-io-manifest2.spec b/php-phar-io-manifest2.spec index 37074b2..db46361 100644 --- a/php-phar-io-manifest2.spec +++ b/php-phar-io-manifest2.spec @@ -6,7 +6,13 @@ # # Please, preserve the changelog entries # -%global bootstrap 0 +%bcond_with bootstrap +%if %{with bootstrap} +%bcond_with tests +%else +%bcond_without tests +%endif + %global gh_commit 85265efd3af7ba3ca4b2a2c34dbfc5788dd29133 %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner phar-io @@ -17,15 +23,10 @@ %global ns_project Manifest %global major 2 %global php_home %{_datadir}/php -%if %{bootstrap} -%bcond_with tests -%else -%bcond_without tests -%endif Name: php-%{pk_vendor}-%{pk_project}%{major} Version: 2.0.1 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Component for reading phar.io manifest information License: BSD @@ -51,7 +52,12 @@ BuildRequires: php-spl BuildRequires: php-xmlwriter BuildRequires: php-fedora-autoloader-devel >= 1.0.0 %if %{with tests} -BuildRequires: phpunit8 +%if 0%{?fedora} >= 32 +%global phpunit %{_bindir}/phpunit9 +%else +%global phpunit %{_bindir}/phpunit8 +%endif +BuildRequires: %{phpunit} %endif # from composer.json @@ -116,10 +122,12 @@ touch vendor/autoload.php : Run upstream test suite ret=0 -for cmd in php php72 php73 php74 php80; do +for cmd in "php %{phpunit}" "php72 %{_bindir}/phpunit8" php73 php74 php80; do if which $cmd; then - $cmd -d auto_prepend_file=%{buildroot}%{php_home}/%{ns_vendor}/%{ns_project}%{major}/autoload.php \ - %{_bindir}/phpunit8 --verbose || ret=1 + set $cmd + $1 -d auto_prepend_file=%{buildroot}%{php_home}/%{ns_vendor}/%{ns_project}%{major}/autoload.php \ + ${2:-%{_bindir}/phpunit9} \ + --verbose || ret=1 fi done exit $ret @@ -136,6 +144,9 @@ exit $ret %changelog +* Mon Aug 11 2020 Remi Collet - 2.0.1-2 +- switch to phpunit9 + * Mon Jun 29 2020 Remi Collet - 2.0.1-1 - update to 2.0.1 (no change) - sources from git snapshot -- cgit