diff options
author | Andy Postnikov <apostnikov@gmail.com> | 2018-12-21 04:16:42 +0200 |
---|---|---|
committer | Andy Postnikov <apostnikov@gmail.com> | 2018-12-22 22:45:38 +0200 |
commit | 8e9e1114b2ace6708a45236602f010ee9a84822e (patch) | |
tree | 2dc96024ee337410265b454ea2e9420adb1b45fd /testing/php7-msgpack | |
parent | f5227d7bdd62d75af22e715c28064d88de6cf448 (diff) | |
download | aports-8e9e1114b2ace6708a45236602f010ee9a84822e.tar.bz2 aports-8e9e1114b2ace6708a45236602f010ee9a84822e.tar.xz |
testing/php7-msgpack: add check() and modernize
Diffstat (limited to 'testing/php7-msgpack')
-rw-r--r-- | testing/php7-msgpack/7c1eb7f70b82bcf611bebc9a9cfd88d5832443a1.patch | 72 | ||||
-rw-r--r-- | testing/php7-msgpack/APKBUILD | 26 |
2 files changed, 90 insertions, 8 deletions
diff --git a/testing/php7-msgpack/7c1eb7f70b82bcf611bebc9a9cfd88d5832443a1.patch b/testing/php7-msgpack/7c1eb7f70b82bcf611bebc9a9cfd88d5832443a1.patch new file mode 100644 index 0000000000..49068139f9 --- /dev/null +++ b/testing/php7-msgpack/7c1eb7f70b82bcf611bebc9a9cfd88d5832443a1.patch @@ -0,0 +1,72 @@ +From 7c1eb7f70b82bcf611bebc9a9cfd88d5832443a1 Mon Sep 17 00:00:00 2001 +From: Aaron Stone <aaron@serendipity.cx> +Date: Thu, 29 Mar 2018 15:13:21 -0700 +Subject: [PATCH] The random data tests are known to parse as data in PHP 7.1+ + +--- + tests/040.phpt | 4 ++++ + tests/040b.phpt | 4 ++++ + tests/040c.phpt | 4 ++++ + tests/040d.phpt | 4 ++++ + 4 files changed, 16 insertions(+) + +diff --git a/tests/040.phpt b/tests/040.phpt +index 5b397d3..ca1f923 100644 +--- a/tests/040.phpt ++++ b/tests/040.phpt +@@ -1,6 +1,10 @@ + --TEST-- + broken random data test + --SKIPIF-- ++<?php ++if (version_compare(PHP_VERSION, '7.1.0', 'ge')) { ++ echo "skip known to produce odd data in PHP 7.1+"; ++} + --FILE-- + <?php + if(!extension_loaded('msgpack')) { +diff --git a/tests/040b.phpt b/tests/040b.phpt +index ea048af..ff50e6e 100644 +--- a/tests/040b.phpt ++++ b/tests/040b.phpt +@@ -1,6 +1,10 @@ + --TEST-- + broken random data test : MessagePack class + --SKIPIF-- ++<?php ++if (version_compare(PHP_VERSION, '7.1.0', 'ge')) { ++ echo "skip known to produce odd data in PHP 7.1+"; ++} + --FILE-- + <?php + if(!extension_loaded('msgpack')) { +diff --git a/tests/040c.phpt b/tests/040c.phpt +index bd882fa..bf15b96 100644 +--- a/tests/040c.phpt ++++ b/tests/040c.phpt +@@ -1,6 +1,10 @@ + --TEST-- + broken random data test : MessagePackUnpacker::feed + --SKIPIF-- ++<?php ++if (version_compare(PHP_VERSION, '7.1.0', 'ge')) { ++ echo "skip known to produce odd data in PHP 7.1+"; ++} + --FILE-- + <?php + if(!extension_loaded('msgpack')) { +diff --git a/tests/040d.phpt b/tests/040d.phpt +index de4c01d..22ddb57 100644 +--- a/tests/040d.phpt ++++ b/tests/040d.phpt +@@ -1,6 +1,10 @@ + --TEST-- + broken random data test : MessagePackUnpacker::execute + --SKIPIF-- ++<?php ++if (version_compare(PHP_VERSION, '7.1.0', 'ge')) { ++ echo "skip known to produce odd data in PHP 7.1+"; ++} + --FILE-- + <?php + if(!extension_loaded('msgpack')) { diff --git a/testing/php7-msgpack/APKBUILD b/testing/php7-msgpack/APKBUILD index 67e971e8a4..5f53f1f98d 100644 --- a/testing/php7-msgpack/APKBUILD +++ b/testing/php7-msgpack/APKBUILD @@ -3,15 +3,17 @@ pkgname=php7-msgpack _pkgreal=msgpack pkgver=2.0.3 -pkgrel=0 -pkgdesc="This extension provide API for communicating with MessagePack serialization." -url="https://pecl.php.net/package/$_pkgreal" +pkgrel=1 +pkgdesc="PHP extension provides API for communicating with MessagePack serialization - PECL" +url="https://pecl.php.net/package/msgpack" arch="all" license="PHP" -options="!check" # Tests fail - does not load msgpack.so -depends="php7-session" -makedepends="php7-dev autoconf" -source="https://pecl.php.net/get/$_pkgreal-$pkgver.tgz" +depends="php7-session php7-sockets" +makedepends="php7-dev autoconf re2c" +source="https://pecl.php.net/get/$_pkgreal-$pkgver.tgz + 7c1eb7f70b82bcf611bebc9a9cfd88d5832443a1.patch + " +# Patch skips broken tests https://github.com/msgpack/msgpack-php/issues/123 builddir="$srcdir"/$_pkgreal-$pkgver build() { @@ -21,6 +23,13 @@ build() { make } +check() { + cd "$builddir" + # Tests require session and sockets extensions which are not bundled + sed -i 's#PHP_TEST_SHARED_EXTENSIONS = `#PHP_TEST_SHARED_EXTENSIONS = -d extension=/usr/lib/php7/modules/session.so -d extension=/usr/lib/php7/modules/sockets.so `#' Makefile + make NO_INTERACTION=1 REPORT_EXIT_STATUS=1 test +} + package() { cd "$builddir" make INSTALL_ROOT="$pkgdir"/ install @@ -28,4 +37,5 @@ package() { echo "extension=$_pkgreal.so" > "$pkgdir"/etc/php7/conf.d/50_$_pkgreal.ini } -sha512sums="4eaf5d2cd50796349414d8272e210f1c8c2e82d72383f440e13d31742a75b0e2fa1f48bd916c057b4c65778bd90eace7dcc0cdb86931620963e666f3aa6905db msgpack-2.0.3.tgz" +sha512sums="4eaf5d2cd50796349414d8272e210f1c8c2e82d72383f440e13d31742a75b0e2fa1f48bd916c057b4c65778bd90eace7dcc0cdb86931620963e666f3aa6905db msgpack-2.0.3.tgz +ae8c505b64631e310020f3addf561a0c5855ebed07eaa0e4c1155dbd77a6e25a2e824d87684298d91f021cf8d028b88a6883f26c21cbea40d8acf46332dd2ce9 7c1eb7f70b82bcf611bebc9a9cfd88d5832443a1.patch" |