diff options
Diffstat (limited to 'php-Faker.spec')
-rw-r--r-- | php-Faker.spec | 62 |
1 files changed, 35 insertions, 27 deletions
diff --git a/php-Faker.spec b/php-Faker.spec index e7726f6..3c8f650 100644 --- a/php-Faker.spec +++ b/php-Faker.spec @@ -12,8 +12,8 @@ %global github_owner fzaninotto %global github_name Faker -%global github_version 1.6.0 -%global github_commit 44f9a286a04b80c76a4e5fb7aad8bb539b920123 +%global github_version 1.7.1 +%global github_commit d3ed4cc37051c1ca52d22d76b437d14809fc7e0d %global composer_vendor fzaninotto %global composer_project faker @@ -28,7 +28,7 @@ Name: php-%{github_name} Version: %{github_version} -Release: 1%{?dist} +Release: 2%{?dist} Summary: A PHP library that generates fake data Group: Development/Libraries @@ -36,10 +36,10 @@ License: MIT URL: https://github.com/%{github_owner}/%{github_name} Source0: %{url}/archive/%{github_commit}/%{name}-%{github_version}-%{github_commit}.tar.gz -# For PHP 7.1 -Patch0: %{name}-upstream.patch - -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +# remirepo:3 +# For test build on all available arch +#global debug_package %{nil} +#global __debug_install_post /bin/true BuildArch: noarch # Tests %if %{with_tests} @@ -101,9 +101,13 @@ Optional: %prep %setup -qn %{github_name}-%{github_commit} -%patch0 -p1 -b .upstream -find src -name \*upstream -exec rm {} \; +%if 0%{?el6} +# For old PHPUnit +for test in $(find test -name \*Test.php); do + sed -e '/assertNotFalse/s/);/, false);/;s/assertNotFalse/assertNotSame/' -i $test +done +%endif : Create autoloader cat <<'AUTOLOAD' | tee src/Faker/autoload.php @@ -126,12 +130,12 @@ AUTOLOAD %install -rm -rf %{buildroot} mkdir -p %{buildroot}%{phpdir} cp -rp src/%{github_name} %{buildroot}%{phpdir}/ %check +%if %{with_tests} mkdir vendor cat << 'EOF' | tee vendor/autoload.php <?php @@ -139,35 +143,28 @@ require_once '%{buildroot}%{phpdir}/Faker/autoload.php'; \Fedora\Autoloader\Autoload::addPsr4('Faker\\Test\\', dirname(__DIR__).'/test/Faker'); EOF -%if %{with_tests} -: Skip tests that require downloading content -sed -e 's/function testDownloadWithDefaults/function SKIP_testDownloadWithDefaults/' \ - -i test/Faker/Provider/ImageTest.php -: Skip bad test see https://github.com/fzaninotto/Faker/issues/1146 -sed -e 's/func testIpv4NotLocalNetwork/func SKIP_testIpv4NotLocalNetwork/' \ - -i test/Faker/Provider/InternetTest.php -: Skip tests with erratic results in Koschei -#sed -e '/561059108101825/d' \ -# -e '/601100099013942/d' \ -# -i test/Faker/Calculator/LuhnTest.php +%ifarch ppc64 s390x +# see https://github.com/fzaninotto/Faker/issues/1346 +rm -f test/Faker/Provider/UuidTest.php +%endif ret=0 -for cmd in php56 php70 php71 php; do +for cmd in php php56 php70 php71 php72; do if which $cmd; then $cmd %{_bindir}/phpunit --verbose || ret=1 fi done -exit $ret +if [ $(php -r 'echo PHP_INT_SIZE;') -lt 8 ]; then + : ignore test suite results https://github.com/fzaninotto/Faker/issues/1347 +else + exit $ret +fi %else : Tests skipped %endif -%clean -rm -rf %{buildroot} - %files -%defattr(-,root,root,-) %{!?_licensedir:%global license %%doc} %license LICENSE %doc *.md @@ -176,6 +173,17 @@ rm -rf %{buildroot} %changelog +* Fri Nov 10 2017 Remi Collet <remi@remirepo.net> - 1.7.1-2 +- fix skip result condition + +* Fri Nov 10 2017 Remi Collet <remi@remirepo.net> - 1.7.1-1 +- Update to 1.7.1 +- fix erratic FTBFS from Koschei +- skip 1 test on BigEndian + https://github.com/fzaninotto/Faker/issues/1346 +- ignore test results on 32-bit + https://github.com/fzaninotto/Faker/issues/1347 + * Thu Feb 16 2017 Remi Collet <remi@remirepo.net> - 1.6.0-1 - update to 1.6.0 - switch to fedora/autoloader |