From 8a81224af7aa66d43086aa65dea96a3f604e3a54 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Sep 14 2018 05:13:42 +0000 Subject: update to 2.0.2 run upstream test suite --- diff --git a/.gitignore b/.gitignore index 1a4baf7..685577b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /php-phpunit-php-file-iterator2-2.0.0-e20525b.tar.gz /php-phpunit-php-file-iterator2-2.0.1-cecbc68.tar.gz +/php-phpunit-php-file-iterator2-2.0.2-050bedf.tar.gz diff --git a/php-phpunit-php-file-iterator2.spec b/php-phpunit-php-file-iterator2.spec index ebb9d62..9da2400 100644 --- a/php-phpunit-php-file-iterator2.spec +++ b/php-phpunit-php-file-iterator2.spec @@ -7,7 +7,8 @@ # # Please, preserve the changelog entries # -%global gh_commit cecbc684605bb0cc288828eb5d65d93d5c676d3c +%global bootstrap 0 +%global gh_commit 050bedf145a257b1ff02746c31894800e5122946 %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner sebastianbergmann %global gh_project php-file-iterator @@ -19,11 +20,16 @@ # Namespace %global ns_vendor SebastianBergmann %global ns_project FileIterator +%if %{bootstrap} +%global with_tests 0%{?_with_tests:1} +%else +%global with_tests 0%{!?_without_tests:1} +%endif Name: php-%{pk_vendor}-%{pk_project}%{major} -Version: 2.0.1 -Release: 2%{?dist} +Version: 2.0.2 +Release: 1%{?dist} Summary: FilterIterator implementation that filters files based on a list of suffixes License: BSD @@ -31,14 +37,20 @@ URL: https://github.com/%{gh_owner}/%{gh_project} Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{name}-%{version}-%{gh_short}.tar.gz BuildArch: noarch +%if %{with_tests} +# From composer.json, "require-dev" +# "phpunit/phpunit": "^7.1" +BuildRequires: phpunit7 >= 7.1 BuildRequires: php(language) >= 7.1 -BuildRequires: php-cli +BuildRequires: php-pcre +BuildRequires: php-spl +%endif BuildRequires: php-fedora-autoloader-devel -# From composer.json +# From composer.json, "require" # "php": "^7.1" Requires: php(language) >= 7.1 -# From phpcompatinfo report for 2.0.0 +# From phpcompatinfo report for 2.0.2 Requires: php-pcre Requires: php-spl # Autoloader @@ -68,15 +80,25 @@ cp -pr src %{buildroot}%{php_home}/%{ns_vendor}/%{ns_project}%{major} %check -: Minimal test for our autoloader -php -r ' -require "%{buildroot}%{php_home}/%{ns_vendor}/%{ns_project}%{major}/autoload.php"; -exit(class_exists("SebastianBergmann\FileIterator\\Iterator") ? 0 : 1); -' +%if %{with_tests} +mkdir vendor +touch vendor/autoload.php + +: Run upstream test suite +ret=0 +for cmd in php php71 php72; do + if which $cmd; then + $cmd -d auto_prepend_file=%{buildroot}%{php_home}/%{ns_vendor}/%{ns_project}%{major}/autoload.php \ + %{_bindir}/phpunit7 --verbose || ret=1 + fi +done +exit $ret +%else +: bootstrap build with test suite disabled +%endif %files -%{!?_licensedir:%global license %%doc} %license LICENSE %doc ChangeLog.md README.md composer.json %dir %{php_home}/%{ns_vendor} @@ -84,6 +106,10 @@ exit(class_exists("SebastianBergmann\FileIterator\\Iterator") ? 0 : 1); %changelog +* Fri Sep 14 2018 Remi Collet - 2.0.2-1 +- update to 2.0.2 +- run upstream test suite + * Fri Jul 13 2018 Fedora Release Engineering - 2.0.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild diff --git a/sources b/sources index 4426db3..850875f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (php-phpunit-php-file-iterator2-2.0.1-cecbc68.tar.gz) = 73be8d9b7d91f3a425bd153902c0a9c07e6b81e9da84b24800efec8716c92f5e7fbd4978dc42e1722055a645aed7389e1d9070f26f4cbb65587a8dd31fcf07a6 +SHA512 (php-phpunit-php-file-iterator2-2.0.2-050bedf.tar.gz) = df4cb4d2c06ce03095b042b669b1c26c4a3075c04105e3f9b8ef6a5f7887f07c661261fba2c66064e62da56d669ab48e514f555f5261d272b150c75f3f468f59