summaryrefslogtreecommitdiffstats
path: root/php-fedora-autoloader.spec
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2021-12-06 09:57:03 +0100
committerRemi Collet <remi@php.net>2021-12-06 09:57:03 +0100
commit37b3765df2c436b3e97656b83f40dc7d601c16f9 (patch)
tree543fc99892f4f9a0e1638092f0363b1f3711d9e1 /php-fedora-autoloader.spec
parent3f134221f9a3c47016a3a4f047fd00d6de11954b (diff)
disable test suite on ELHEADmaster
Diffstat (limited to 'php-fedora-autoloader.spec')
-rw-r--r--php-fedora-autoloader.spec18
1 files changed, 12 insertions, 6 deletions
diff --git a/php-fedora-autoloader.spec b/php-fedora-autoloader.spec
index 20998a5..1eedf8e 100644
--- a/php-fedora-autoloader.spec
+++ b/php-fedora-autoloader.spec
@@ -25,15 +25,18 @@
%global phpab_min_ver 1.22
%global phpab_max_ver 2.0
-# Build using "--without tests" to disable tests
-%global with_tests 0%{!?_without_tests:1}
+%if 0%{?fedora}
+%bcond_without tests
+%else
+%bcond_with tests
+%endif
%{!?phpdir: %global phpdir %{_datadir}/php}
%global phpab_template_dir %{phpdir}/TheSeer/Autoload/templates/ci
Name: php-%{composer_vendor}-%{composer_project}
Version: %{github_version}
-Release: 5%{?dist}
+Release: 7%{?dist}
Summary: Fedora Autoloader
License: MIT
@@ -42,7 +45,7 @@ Source0: %{url}/archive/%{github_commit}/%{name}-%{github_version}-%{githu
BuildArch: noarch
# Tests
-%if %{with_tests}
+%if %{with tests}
BuildRequires: php-cli
## composer.json
BuildRequires: php(language) >= %{php_min_ver}
@@ -128,7 +131,7 @@ cp -p res/phpab/fedora*.php.tpl %{buildroot}%{phpab_template_dir}/
%check
-%if %{with_tests}
+%if %{with tests}
: Create tests bootstrap
cat <<'BOOTSTRAP' | tee bootstrap.php
<?php
@@ -141,7 +144,7 @@ BOOTSTRAP
: Upstream tests
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
if [ "php" == "$1" ] || which $PHP_EXEC; then
$1 -d include_path=.:%{buildroot}%{phpdir}:%{phpdir}:%{_datadir}/pear \
@@ -169,6 +172,9 @@ exit $RETURN_CODE
%changelog
+* Mon Dec 6 2021 Remi Collet <remi@remirepo.net> - 1.0.1-7
+- disable test suite on EL
+
* Mon Mar 8 2021 Remi Collet <remi@remirepo.net> - 1.0.1-5
- use range dependencies
- switch to phpunit8