summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2020-10-05 10:27:08 +0200
committerRemi Collet <remi@remirepo.net>2020-10-05 10:27:08 +0200
commit8153629247f34472e75e9e61c6058fbb80139fc5 (patch)
tree147f66645efda03ff1c15dbfc8d7b12f54e87365
parent816114a4f472f020113817f24da457db3d50f374 (diff)
phpunit9
-rw-r--r--php-sabre-vobject4.spec15
1 files changed, 11 insertions, 4 deletions
diff --git a/php-sabre-vobject4.spec b/php-sabre-vobject4.spec
index 932b6ae..25329b1 100644
--- a/php-sabre-vobject4.spec
+++ b/php-sabre-vobject4.spec
@@ -56,7 +56,13 @@ BuildRequires: php-xml
# "friendsofphp/php-cs-fixer": "~2.16.1",
# "phpunit/phpunit" : "^7.5 || ^8.5 || ^9.0",
# "phpstan/phpstan": "^0.12"
-BuildRequires: phpunit8 >= 8.5
+%if 0%{?fedora} >= 31 || 0%{?rhel} >= 9
+BuildRequires: phpunit9
+%global phpunit %{_bindir}/phpunit9
+%else
+BuildRequires: phpunit8
+%global phpunit %{_bindir}/phpunit8
+%endif
# Autoloader
BuildRequires: php-composer(fedora/autoloader)
%endif
@@ -140,9 +146,10 @@ fi
: Run upstream test suite against installed library
ret=0
-for cmd in php php72 php73 php74 php80; do
- if which $cmd; then
- $cmd %{_bindir}/phpunit8 $opt || ret=1
+for cmdarg in "php %{phpunit}" "php72 %{_bindir}/phpunit8" php73 php74 php80; do
+ if which $cmdarg; then
+ set $cmdarg
+ $1 ${2:-%{_bindir}/phpunit9} $opt || ret=1
fi
done
exit $ret