diff options
author | Jakub Jirutka <jakub@jirutka.cz> | 2017-04-30 00:20:07 +0200 |
---|---|---|
committer | Jakub Jirutka <jakub@jirutka.cz> | 2017-05-02 01:04:52 +0200 |
commit | 63010da997e7a37df323a7d0343453fde63600ed (patch) | |
tree | f8a1b253e4541fa87391f3f06731cf789eb12ed9 /community/php7/APKBUILD | |
parent | 128b0f0e848405a7dc0b9aea560cc809d0b13084 (diff) | |
download | aports-63010da997e7a37df323a7d0343453fde63600ed.tar.bz2 aports-63010da997e7a37df323a7d0343453fde63600ed.tar.xz |
community/php7: run subset of tests on check
Diffstat (limited to 'community/php7/APKBUILD')
-rw-r--r-- | community/php7/APKBUILD | 46 |
1 files changed, 45 insertions, 1 deletions
diff --git a/community/php7/APKBUILD b/community/php7/APKBUILD index 59a0f58415..f020f70ae1 100644 --- a/community/php7/APKBUILD +++ b/community/php7/APKBUILD @@ -44,11 +44,13 @@ source="http://php.net/distributions/$_pkgreal-$pkgver.tar.bz2 $pkgname-fpm.initd $pkgname-fpm.logrotate $pkgname-module.conf + disabled-tests.list install-pear.patch includedir.patch fix-asm-constraints-in-aarch64-multiply-macro.patch php7-fpm-version-suffix.patch allow-build-recode-and-imap-together.patch + fix-tests-devserver.patch " builddir="$srcdir/$_pkgreal-$pkgver" @@ -100,6 +102,11 @@ prepare() { # Fix some bogus permissions. find . -name \*.[ch] -exec chmod 644 {} \; + # XXX: Delete failing tests. + sed -n '/^[^#]/p' "$srcdir"/disabled-tests.list | while read item; do + rm -r $item # do it in this way to apply globbing... + done + autoconf } @@ -216,6 +223,29 @@ build() { || return 1 } +check() { + cd "$builddir" + + # PHP is so stupid that it's not able to resolve dependencies + # between extensions and load them in correct order, so we must + # help it... + # * opcache is Zend extension, it's handled specially in Makefile + # * imap can't be loaded together with recode, so we must omit it + local php_modules=$(_extensions_by_deps_order \ + | grep -vx opcache \ + | grep -vx imap \ + | xargs -n 1 printf "'$builddir/modules/%s.la' ") + sed -i "/^PHP_TEST_SHARED_EXTENSIONS/,/extension=/ \ + s|in \$(PHP_MODULES)\"*|in $php_modules|" Makefile + + NO_INTERACTION=1 REPORT_EXIT_STATUS=1 \ + SKIP_SLOW_TESTS=1 SKIP_ONLINE_TESTS=1 TEST_TIMEOUT=10 \ + TZ= LANG= LC_ALL= \ + make test + + echo 'NOTE: We have skipped quite a lot tests, see disabled-tests.list.' +} + package() { cd "$builddir" @@ -422,12 +452,26 @@ _resolve_extension_deps() { done } +# Prints _exts sorted by number of dependencies. +_extensions_by_deps_order() { + local deps list name + + for name in $_exts; do + deps=$(eval "echo \$depends_$name") + : ${deps:=$(_resolve_extension_deps $name)} + list="$list $(echo "$deps" | wc -w);$name" + done + printf '%s\n' $list | sort -t ';' -k 1 | sed -E 's/\d+;//' +} + sha512sums="a1dd5ffd756176e6ba600dd850510033d0d6f07aff314de69fec0c42437e6a006449e3f4f98679146a2f2645caa65ea351e31a8e1da7c14cc5260856ad40eaff php-7.1.4.tar.bz2 1c708de82d1086f272f484faf6cf6d087af7c31750cc2550b0b94ed723961b363f28a947b015b2dfc0765caea185a75f5d2c2f2b099c948b65c290924f606e4f php7-fpm.initd cacce7bf789467ff40647b7319e3760c6c587218720538516e8d400baa75651f72165c4e28056cd0c1dc89efecb4d00d0d7823bed80b29136262c825ce816691 php7-fpm.logrotate fbf9a1572d37370ec0d126502e1d066e045a992484d8fc4f1e2ede330134c1a15f4029f29fa4daebd48eed78b045dc051ced69fbf1f11efc7ad81d884a639a99 php7-module.conf +b4b4f27cae93b35d84509ada75f199ef411dda052fa4419fb76d08278be620e9fa0cbc88f536b7510e6cba470788864953d71e7106cddc117da4c0ff3a8ffda2 disabled-tests.list f1177cbf6b1f44402f421c3d317aab1a2a40d0b1209c11519c1158df337c8945f3a313d689c939768584f3e4edbe52e8bd6103fb6777462326a9d94e8ab1f505 install-pear.patch 199aecdbd3b4035aabf5379c215f82412d3c98b79a1ee186944e7fe1f0ed6f40789ea30e2355149491de6be34fc66c5e486e2a79a7e41ab2ae18706ef3ffe79b includedir.patch d93d3fc015580cf5f75c6cbca4cd980e054b61e1068495da81a7e61f1af2c9ae14f09964c04928ad338142de78e4844aed885b1ad1865282072999fb045c8ad7 fix-asm-constraints-in-aarch64-multiply-macro.patch a4c35446745ab0ac806de801f0651fc5d2c98cf60063c3c2d3963a84f1c71ef78e09b7650c08e7231be0fdb93c0c255de38894d7f0e4f4c5a190d17f1a6bc476 php7-fpm-version-suffix.patch -f8ecae241a90cbc3e98aa4deb3d5d35ef555f51380e29f4e182a8060dffeb84be74f030a14c6b452668471030d78964f52795ca74275db05543ccad20ef1f2cc allow-build-recode-and-imap-together.patch" +f8ecae241a90cbc3e98aa4deb3d5d35ef555f51380e29f4e182a8060dffeb84be74f030a14c6b452668471030d78964f52795ca74275db05543ccad20ef1f2cc allow-build-recode-and-imap-together.patch +01c3c65f153ea92192f2b2694d93a086ffa67c282fe046f877842942692c25666e4154a09aba6c2161f7f2a3b6595f4d79573e9ee74aec774a95f2f9725846f9 fix-tests-devserver.patch" |