diff options
author | Remi Collet <fedora@famillecollet.com> | 2017-03-30 10:47:26 +0200 |
---|---|---|
committer | Remi Collet <fedora@famillecollet.com> | 2017-03-30 10:47:26 +0200 |
commit | 86242c405dffa5fb1eaef5c59f93560cfcbd75e5 (patch) | |
tree | edd02e144356c545068c657ae04fea27fbd4f819 | |
parent | 39b0e8d0481b4269746f8c3f9d1357431a860c53 (diff) |
use phpunit6 when available
-rw-r--r-- | php-fedora-autoloader.spec | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/php-fedora-autoloader.spec b/php-fedora-autoloader.spec index f636f14..65c16ab 100644 --- a/php-fedora-autoloader.spec +++ b/php-fedora-autoloader.spec @@ -34,7 +34,7 @@ Name: php-%{composer_vendor}-%{composer_project} Version: %{github_version} -Release: 0.1%{?github_release}%{?dist} +Release: 0.2%{?github_release}%{?dist} Summary: Fedora Autoloader Group: Development/Libraries @@ -48,7 +48,12 @@ BuildArch: noarch BuildRequires: php-cli ## composer.json BuildRequires: php(language) >= %{php_min_ver} -BuildRequires: php-composer(phpunit/phpunit) +%if 0%{?fedora} >= 26 +%global phpunit %{_bindir}/phpunit6 +%else +%global phpunit %{_bindir}/phpunit +%endif +BuildRequires: %{phpunit} BuildRequires: php-composer(theseer/autoload) >= %{phpab_min_ver} BuildRequires: php-pear ## phpcompatinfo (computed from version 1.0.0) @@ -119,11 +124,11 @@ cp -p res/phpab/fedora*.php.tpl %{buildroot}%{phpab_template_dir}/ %check %if %{with_tests} RETURN_CODE=0 -for PHP_EXEC in php %{?rhel:php54 php55} php56 php70 php71; do - if [ "php" == "$PHP_EXEC" ] || which $PHP_EXEC; then - $PHP_EXEC \ - -d include_path=.:%{buildroot}%{phpdir}:%{phpdir}:%{_datadir}/pear \ - %{_bindir}/phpunit \ +for PHP_EXEC in "php %{phpunit}" %{?rhel:php54 php55} php56 php70 "php71 %{_bindir}/phpunit6"; do + set $PHP_EXEC + if [ "php" == "$1" ] || which $PHP_EXEC; then + $1 -d include_path=.:%{buildroot}%{phpdir}:%{phpdir}:%{_datadir}/pear \ + ${2:-%{_bindir}/phpunit} \ --bootstrap %{buildroot}%{phpdir}/Fedora/Autoloader/autoload.php \ --verbose fi @@ -147,6 +152,9 @@ exit $RETURN_CODE %changelog +* Thu Mar 30 2017 Remi Collet <remi@remirepo.net> - 1.0.0-0.2.rc1 +- use phpunit6 when available + * Tue Mar 28 2017 Shawn Iwinski <shawn@iwin.ski> - 1.0.0-0.1.rc1 - Update to 1.0.0 - Test with SCLs if available |