diff options
author | Remi Collet <remi@remirepo.net> | 2021-12-06 09:49:19 +0100 |
---|---|---|
committer | Remi Collet <remi@php.net> | 2021-12-06 09:49:19 +0100 |
commit | 481baf7bd20124f6bb814407eee39cd2d689a6a7 (patch) | |
tree | d44b4115d4f9d7fe2759e66e6abb3a5198c1d41f /php-theseer-autoload.spec | |
parent | d0b19d36861e0de6c1ef64f93c3502e2391b5150 (diff) |
disable test suite on EL
Diffstat (limited to 'php-theseer-autoload.spec')
-rw-r--r-- | php-theseer-autoload.spec | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/php-theseer-autoload.spec b/php-theseer-autoload.spec index d703296..d304e1d 100644 --- a/php-theseer-autoload.spec +++ b/php-theseer-autoload.spec @@ -18,9 +18,15 @@ %global pear_name Autoload %global pear_channel pear.netpirates.net +%if 0%{?fedora} +%bcond_without tests +%else +%bcond_with tests +%endif + Name: php-theseer-autoload Version: 1.26.3 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A tool and library to generate autoload code License: BSD @@ -32,6 +38,13 @@ Patch0: %{gh_project}-rpm.patch BuildArch: noarch BuildRequires: php(language) >= 7.2 +BuildRequires: php-cli +BuildRequires: php-date +BuildRequires: php-json +BuildRequires: php-openssl +BuildRequires: php-phar +BuildRequires: php-spl +BuildRequires: php-tokenizer %if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 BuildRequires: (php-composer(theseer/directoryscanner) >= 1.3.2 with php-composer(theseer/directoryscanner) < 2) BuildRequires: (php-composer(zetacomponents/console-tools) >= 1.7.2 with php-composer(zetacomponents/console-tools) < 2) @@ -39,8 +52,10 @@ BuildRequires: (php-composer(zetacomponents/console-tools) >= 1.7.2 with php-com BuildRequires: php-theseer-directoryscanner >= 1.3.2 BuildRequires: php-zetacomponents-console-tools >= 1.7.2 %endif +%if %{with tests} %global phpunit %{_bindir}/phpunit9 BuildRequires: %{phpunit} +%endif # From composer.json, "require": { # "theseer/directoryscanner": "^1.3.3", @@ -110,6 +125,7 @@ sed -e 's:%{php_home}:%{buildroot}%{php_home}:' phpab.php >t.php php t.php --version | grep %{version} php t.php --output foo.php src +%if %{with tests} : Fix test suite to use installed library cat <<EOF | tee tests/init.php <?php @@ -117,13 +133,14 @@ require '%{buildroot}%{_datadir}/php/TheSeer/Autoload/autoload.php'; EOF ret=0 -for cmd in "php %{phpunit}" php73 php74 php80 php81; do +for cmd in "php %{phpunit}" php74 php80 php81; do if which $cmd; then set $cmd $1 ${2:-%{_bindir}/phpunit9} --verbose || ret=1 fi done exit $ret +%endif %pre @@ -142,6 +159,9 @@ fi %changelog +* Mon Dec 6 2021 Remi Collet <remi@remirepo.net> - 1.26.3-2 +- disable test suite on EL + * Mon Jul 26 2021 Remi Collet <remi@remirepo.net> - 1.26.3-1 - update to 1.26.3 (no change) - raise dependency on theseer/directoryscanner 1.3.3 |