only run test suite on Fedora, not on EL

This commit is contained in:
Remi Collet 2022-06-13 16:17:53 +02:00
commit 6173d40cc0

View file

@ -10,6 +10,13 @@
# For compatibility with SCL
%undefine __brp_mangle_shebangs
%if 0%{?fedora}
%bcond_without tests
%else
# disables as phpunit not availble
%bcond_with tests
%endif
%global gh_commit 34bea19b6e03d8153165d8f30bba4c3be86184c1
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
%global gh_owner nikic
@ -17,12 +24,11 @@
%global pk_project php-parser
%global php_home %{_datadir}/php
%global ns_project PhpParser
%global with_tests 0%{!?_without_tests:1}
%global major 4
Name: php-%{gh_owner}-%{pk_project}%{major}
Version: 4.14.0
Release: 1%{?dist}
Release: 2%{?dist}
Summary: A PHP parser written in PHP - version %{major}
License: BSD
@ -34,7 +40,7 @@ Source1: makesrc.sh
Patch0: %{name}-rpm.patch
BuildArch: noarch
%if %{with_tests}
%if %{with tests}
# For tests
# as we use phpunit9
BuildRequires: php(language) >= 7.3
@ -50,8 +56,8 @@ BuildRequires: php-spl
%global phpunit %{_bindir}/phpunit9
BuildRequires: phpunit9
# Autoloader
BuildRequires: php-fedora-autoloader-devel
%endif
BuildRequires: php-fedora-autoloader-devel
# From composer.json, "require": {
# "php": ">=7.0",
@ -105,7 +111,7 @@ install -Dpm 0755 bin/php-parse %{buildroot}%{_bindir}/php-parse%{major}
%check
%if %{with_tests}
%if %{with tests}
: Test the command
sed -e 's:%{php_home}:%{buildroot}%{php_home}:' \
bin/php-parse > bin/php-parse-test
@ -151,6 +157,9 @@ exit $ret
%changelog
* Mon Jun 13 2022 Remi Collet <remi@remirepo.net> - 4.14.0-2
- only run test suite on Fedora, not on EL
* Wed Jun 1 2022 Remi Collet <remi@remirepo.net> - 4.14.0-1
- update to 4.14.0