summaryrefslogtreecommitdiffstats
path: root/php-sanmai-phpunit-legacy-adapter.spec
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2020-12-22 11:32:32 +0100
committerRemi Collet <remi@remirepo.net>2020-12-22 11:32:32 +0100
commitd7275ecadeec7dfbd46824a4e31c860228e2aaee (patch)
tree1fc49e503a8e722de0926dd1626284ccac38eec6 /php-sanmai-phpunit-legacy-adapter.spec
parent03b9f804928ef09cd47a9e05a05a4e9998ccd4f5 (diff)
clean
Diffstat (limited to 'php-sanmai-phpunit-legacy-adapter.spec')
-rw-r--r--php-sanmai-phpunit-legacy-adapter.spec17
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