diff options
author | Remi Collet <remi@remirepo.net> | 2020-10-05 10:41:08 +0200 |
---|---|---|
committer | Remi Collet <remi@remirepo.net> | 2020-10-05 10:41:08 +0200 |
commit | c837617ecf3fb50d4a05ed0c86f30ba47ab6b67b (patch) | |
tree | 76e3d69bf726c34b6ae1c9df5c6e8c63999e2812 | |
parent | e3802c7f4716c1b85f5a205e945cfea57407e0fc (diff) |
phpunit9
-rw-r--r-- | php-sabre-xml2.spec | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/php-sabre-xml2.spec b/php-sabre-xml2.spec index 72bce3e..81c1796 100644 --- a/php-sabre-xml2.spec +++ b/php-sabre-xml2.spec @@ -52,7 +52,13 @@ BuildRequires: php-spl # From composer.json, "require-dev": { # "phpstan/phpstan": "^0.12", # "phpunit/phpunit" : "^7.5 || ^8.5 || ^9.0" -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 %endif # Autoloader BuildRequires: php-fedora-autoloader-devel @@ -136,9 +142,10 @@ cd tests : 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 || ret=1 +for cmdarg in "php %{phpunit}" "php72 %{_bindir}/phpunit8" php73 php74 php80; do + if which $cmdarg; then + set $cmdarg + $1 ${2:-%{_bindir}/phpunit9} || ret=1 fi done exit $ret |