diff options
author | Brian Evans <grknight@gentoo.org> | 2021-08-27 15:01:45 -0400 |
---|---|---|
committer | Brian Evans <grknight@gentoo.org> | 2021-08-27 15:01:45 -0400 |
commit | 2c177955a903c70fdc8cde266eb705b2a627ce2e (patch) | |
tree | 501ca5ad91c51597734b59cb2fc0455534e1b4c8 /dev-php/pecl-memcached | |
parent | Revert "kernel-2.eclass: Replace bit-shift arithmetic by ver_test" (diff) | |
download | gentoo-2c177955a903c70fdc8cde266eb705b2a627ce2e.tar.gz gentoo-2c177955a903c70fdc8cde266eb705b2a627ce2e.tar.bz2 gentoo-2c177955a903c70fdc8cde266eb705b2a627ce2e.zip |
dev-php/pecl-memcached: Enable more tests and note known broken
Signed-off-by: Brian Evans <grknight@gentoo.org>
Diffstat (limited to 'dev-php/pecl-memcached')
-rw-r--r-- | dev-php/pecl-memcached/files/3.1.5-fix-tests.patch | 41 | ||||
-rw-r--r-- | dev-php/pecl-memcached/pecl-memcached-3.1.5_p20210807.ebuild | 21 |
2 files changed, 58 insertions, 4 deletions
diff --git a/dev-php/pecl-memcached/files/3.1.5-fix-tests.patch b/dev-php/pecl-memcached/files/3.1.5-fix-tests.patch new file mode 100644 index 000000000000..08a881c182d8 --- /dev/null +++ b/dev-php/pecl-memcached/files/3.1.5-fix-tests.patch @@ -0,0 +1,41 @@ +--- a/tests/experimental/session_gc.phpt 2021-08-23 01:05:26.000000000 -0400 ++++ b/tests/experimental/session_gc.phpt 2021-08-27 14:30:01.504619748 -0400 +@@ -20,22 +20,23 @@ + + session_start(); + $_SESSION['foo'] = 1; +-var_dump($_SESSION); ++$session1 = $_SESSION; + session_write_close(); + + $_SESSION = NULL; +-var_dump($_SESSION); ++$session2 = $_SESSION; + + session_start(); +-var_dump($_SESSION); ++$session3 = $_SESSION; + session_write_close(); + + sleep(3); + + session_start(); +-var_dump($_SESSION); ++$session4 = $_SESSION; + session_write_close(); + ++var_dump($session1, $session2, $session3, $session4); + + --EXPECT-- + array(1) { +--- a/tests/experimental/extreme_floats.phpt 2021-08-23 01:05:26.000000000 -0400 ++++ b/tests/experimental/extreme_floats.phpt 2021-08-27 14:40:03.223499433 -0400 +@@ -2,6 +2,8 @@ + Extreme floats: max, min, Inf, -Inf, and NaN + --SKIPIF-- + <?php include dirname(dirname(__FILE__)) . "/skipif.inc";?> ++--INI-- ++serialize_precision = 14 + --FILE-- + <?php + include dirname(dirname(__FILE__)) . '/config.inc'; diff --git a/dev-php/pecl-memcached/pecl-memcached-3.1.5_p20210807.ebuild b/dev-php/pecl-memcached/pecl-memcached-3.1.5_p20210807.ebuild index 6b24aa037d29..246535a68f31 100644 --- a/dev-php/pecl-memcached/pecl-memcached-3.1.5_p20210807.ebuild +++ b/dev-php/pecl-memcached/pecl-memcached-3.1.5_p20210807.ebuild @@ -37,12 +37,24 @@ RDEPEND=" )" DEPEND="${RDEPEND} test? ( net-misc/memcached )" +PATCHES=( "${FILESDIR}/3.1.5-fix-tests.patch" ) + src_unpack() { default mv "${WORKDIR}/php-memcached-${REPO_COMMIT}" "${S}" || die - # These tests always fail and only exist for "experimental" features - # Not present in 3.1.5 release - rm -r "${S}/tests/experimental/" || die + ln -s "${S}/tests/skipif.inc" "${S}/tests/experimental/skipif.inc" || die + ln -s "${S}/tests/skipif.inc" "${S}/tests/experimental/serializer/skipif.inc" || die + local x + local broken_tests=( + # Known broken tests. https://github.com/php-memcached-dev/php-memcached/issues/386 + get_bykey_cas getdelayed_bykey_cas getdelayed_cbthrows + stats stats_badserver getmulti_badserver + # Excessive warnings make them "BORK" + serializer/serializer_php_bad_serialize serializer/serializer_php_bad_unserialize + ) + for x in "${broken_tests[@]}" ; do + rm "${S}/tests/experimental/${x}.phpt" || die + done } src_configure() { @@ -56,7 +68,8 @@ src_configure() { } src_test() { - local memcached_opts=( -d -P "${T}/memcached.pid" -p 11211 -l 127.0.0.1 ) + touch "${T}/memcached.pid" || die + local memcached_opts=( -d -P "${T}/memcached.pid" -p 11211 -l 127.0.0.1 -U 11211 ) [[ ${EUID} == 0 ]] && memcached_opts+=( -u portage ) memcached "${memcached_opts[@]}" || die "Can't start memcached test server" |