From 28f9c1e4525710ce8a982a78b571b263c66aa8cd Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Wed, 28 Mar 2018 10:04:20 +0200 Subject: cleanup for Fedora --- php-mock-phpunit2.spec | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/php-mock-phpunit2.spec b/php-mock-phpunit2.spec index 2ac8823..798c5b8 100644 --- a/php-mock-phpunit2.spec +++ b/php-mock-phpunit2.spec @@ -25,13 +25,17 @@ Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit BuildArch: noarch BuildRequires: php(language) >= 7 %if %{with_tests} +# remirepo:1 %if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 BuildRequires: (php-composer(php-mock/php-mock-integration) >= 2 with php-composer(php-mock/php-mock-integration) < 3) +# remirepo:3 %else BuildRequires: php-mock-integration2 %endif BuildRequires: phpunit6 +%if 0%{?fedora} >= 28 || 0%{?rhel} >= 8 BuildRequires: phpunit7 +%endif # For autoloader BuildRequires: php-composer(fedora/autoloader) %endif @@ -43,9 +47,11 @@ BuildRequires: php-composer(fedora/autoloader) # "conflict": { # "phpunit/phpunit-mock-objects": "3.2.0" Requires: php(language) >= 7 +# remirepo:1 %if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 Requires: (phpunit6 or phpunit7) Requires: (php-composer(php-mock/php-mock-integration) >= 2 with php-composer(php-mock/php-mock-integration) < 3) +# remirepo:4 %else Requires: phpunit6 Requires: php-mock-integration2 @@ -107,12 +113,15 @@ for cmd in php php70 php71 php72; do $cmd %{_bindir}/phpunit6 --verbose || ret=1 fi done + +%if 0%{?fedora} >= 28 || 0%{?rhel} >= 8 : Run upstream test suite with phpunit7 for cmd in php php71 php72; do if which $cmd; then $cmd %{_bindir}/phpunit7 --verbose || ret=1 fi done +%endif exit $ret %else : bootstrap build with test suite disabled -- cgit