From 6173d40cc0cfd23daf9ff96f5a324e13e26a4d3b Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 13 Jun 2022 16:17:53 +0200 Subject: [PATCH] only run test suite on Fedora, not on EL --- php-nikic-php-parser4.spec | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/php-nikic-php-parser4.spec b/php-nikic-php-parser4.spec index 790043d..1fb223d 100644 --- a/php-nikic-php-parser4.spec +++ b/php-nikic-php-parser4.spec @@ -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 - 4.14.0-2 +- only run test suite on Fedora, not on EL + * Wed Jun 1 2022 Remi Collet - 4.14.0-1 - update to 4.14.0