disable test suite on EL

epel9 imports/e9/php-fedora-autoloader-1.0.1-7.el9
Remi Collet 3 years ago
parent 1d949266b6
commit be968f0cad

@ -24,15 +24,18 @@
%global phpab_min_ver 1.22 %global phpab_min_ver 1.22
%global phpab_max_ver 2.0 %global phpab_max_ver 2.0
# Build using "--without tests" to disable tests %if 0%{?fedora}
%global with_tests 0%{!?_without_tests:1} %bcond_without tests
%else
%bcond_with tests
%endif
%{!?phpdir: %global phpdir %{_datadir}/php} %{!?phpdir: %global phpdir %{_datadir}/php}
%global phpab_template_dir %{phpdir}/TheSeer/Autoload/templates/ci %global phpab_template_dir %{phpdir}/TheSeer/Autoload/templates/ci
Name: php-%{composer_vendor}-%{composer_project} Name: php-%{composer_vendor}-%{composer_project}
Version: %{github_version} Version: %{github_version}
Release: 6%{?dist} Release: 7%{?dist}
Summary: Fedora Autoloader Summary: Fedora Autoloader
License: MIT License: MIT
@ -41,7 +44,7 @@ Source0: %{url}/archive/%{github_commit}/%{name}-%{github_version}-%{githu
BuildArch: noarch BuildArch: noarch
# Tests # Tests
%if %{with_tests} %if %{with tests}
BuildRequires: php-cli BuildRequires: php-cli
## composer.json ## composer.json
BuildRequires: php(language) >= %{php_min_ver} BuildRequires: php(language) >= %{php_min_ver}
@ -127,7 +130,7 @@ cp -p res/phpab/fedora*.php.tpl %{buildroot}%{phpab_template_dir}/
%check %check
%if %{with_tests} %if %{with tests}
: Create tests bootstrap : Create tests bootstrap
cat <<'BOOTSTRAP' | tee bootstrap.php cat <<'BOOTSTRAP' | tee bootstrap.php
<?php <?php
@ -140,7 +143,7 @@ BOOTSTRAP
: Upstream tests : Upstream tests
RETURN_CODE=0 RETURN_CODE=0
for PHP_EXEC in "php %{phpunit}" php73 php74 php80; do for PHP_EXEC in "php %{phpunit}" php74 php80 php81; do
set $PHP_EXEC set $PHP_EXEC
if [ "php" == "$1" ] || which $PHP_EXEC; then if [ "php" == "$1" ] || which $PHP_EXEC; then
$1 -d include_path=.:%{buildroot}%{phpdir}:%{phpdir}:%{_datadir}/pear \ $1 -d include_path=.:%{buildroot}%{phpdir}:%{phpdir}:%{_datadir}/pear \
@ -168,6 +171,9 @@ exit $RETURN_CODE
%changelog %changelog
* Mon Dec 6 2021 Remi Collet <remi@remirepo.net> - 1.0.1-7
- disable test suite on EL
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.1-6 * Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.1-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild

Loading…
Cancel
Save