diff options
| -rw-r--r-- | php-sanmai-phpunit-legacy-adapter.spec | 17 | 
1 files 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  | 
