From d7275ecadeec7dfbd46824a4e31c860228e2aaee Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Tue, 22 Dec 2020 11:32:32 +0100 Subject: clean --- php-sanmai-phpunit-legacy-adapter.spec | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/php-sanmai-phpunit-legacy-adapter.spec b/php-sanmai-phpunit-legacy-adapter.spec index 58c23b0..385cbe0 100644 --- a/php-sanmai-phpunit-legacy-adapter.spec +++ b/php-sanmai-phpunit-legacy-adapter.spec @@ -27,12 +27,13 @@ URL: https://github.com/%{gh_owner}/%{gh_project} Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{gh_project}-%{version}-%{gh_short}.tar.gz BuildArch: noarch -BuildRequires: php(language) > 7.1 %if %{with tests} BuildRequires: phpunit7 BuildRequires: phpunit8 +%if 0%{?fedora} >= 32 || 0%{?rhel} >= 9 BuildRequires: phpunit9 %endif +%endif BuildRequires: php-fedora-autoloader-devel Requires: php(language) >= 7.1 @@ -95,12 +96,14 @@ do $cmd %{_bindir}/phpunit8 --verbose || ret=1 fi done -for cmd in php php73 php74 php80 -do - if which $cmd; then - $cmd %{_bindir}/phpunit9 --verbose || ret=1 - fi -done +if [ -x %{_bindir}/phpunit9 ]; then + for cmd in php php73 php74 php80 + do + if which $cmd; then + $cmd %{_bindir}/phpunit9 --verbose || ret=1 + fi + done +fi exit $ret %else : Test suite disabled -- cgit