diff options
author | Petr Vaněk <arkamar@gentoo.org> | 2024-04-19 10:39:10 +0200 |
---|---|---|
committer | Petr Vaněk <arkamar@gentoo.org> | 2024-04-19 11:35:46 +0200 |
commit | becc53b8cb7709117c324281a147c2e260cd42d6 (patch) | |
tree | 0ab12f24da624ebab874f65e9be2be68888bafb2 /dev-libs/hiredis | |
parent | kde-apps/krdc: adapt to slotted freerdp (diff) | |
download | gentoo-becc53b8cb7709117c324281a147c2e260cd42d6.tar.gz gentoo-becc53b8cb7709117c324281a147c2e260cd42d6.tar.bz2 gentoo-becc53b8cb7709117c324281a147c2e260cd42d6.zip |
dev-libs/hiredis: fix tests for 1.1.0
It was necessary to correct test parameters, because the -p parameter
expects redis port number, not PID.
All previously disabled tests pass, however, new "Async connect timeout"
test was introduced in 1.1.0 version which requires non-localhost IP
address. This test is disabled by a new patch which replaced the
original one.
Closes: https://bugs.gentoo.org/920297
Signed-off-by: Petr Vaněk <arkamar@gentoo.org>
Diffstat (limited to 'dev-libs/hiredis')
-rw-r--r-- | dev-libs/hiredis/files/hiredis-1.1.0-disable-network-tests.patch | 19 | ||||
-rw-r--r-- | dev-libs/hiredis/hiredis-1.1.0-r1.ebuild | 6 |
2 files changed, 22 insertions, 3 deletions
diff --git a/dev-libs/hiredis/files/hiredis-1.1.0-disable-network-tests.patch b/dev-libs/hiredis/files/hiredis-1.1.0-disable-network-tests.patch new file mode 100644 index 000000000000..0bfc281757f8 --- /dev/null +++ b/dev-libs/hiredis/files/hiredis-1.1.0-disable-network-tests.patch @@ -0,0 +1,19 @@ +Gentoo specific patch which disables test requiring non-localhost IP +address. + +diff --git a/test.c b/test.c +index c1065ff..ca21c30 100644 +--- a/test.c ++++ b/test.c +@@ -2151,7 +2151,7 @@ static void test_async_polling(struct config config) { + assert(astest.ac == NULL); + test_cond(astest.disconnect_status == REDIS_OK); + +- if (config.type == CONN_TCP || config.type == CONN_SSL) { ++ if (0) { /* disabled because of blackhole ip */ + /* timeout can only be simulated with network */ + test("Async connect timeout: "); + config.tcp.host = "192.168.254.254"; /* blackhole ip */ +-- +2.43.2 + diff --git a/dev-libs/hiredis/hiredis-1.1.0-r1.ebuild b/dev-libs/hiredis/hiredis-1.1.0-r1.ebuild index 193ec8133864..ac1c84f95766 100644 --- a/dev-libs/hiredis/hiredis-1.1.0-r1.ebuild +++ b/dev-libs/hiredis/hiredis-1.1.0-r1.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2023 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -27,7 +27,7 @@ BDEPEND=" " PATCHES=( - "${FILESDIR}"/${PN}-1.0.0-disable-network-tests.patch + "${FILESDIR}"/${PN}-1.1.0-disable-network-tests.patch ) src_prepare() { @@ -73,7 +73,7 @@ src_test() { _build hiredis-test "${EPREFIX}"/usr/sbin/redis-server - <<< "${REDIS_TEST_CONFIG}" || die - ./hiredis-test -h 127.0.0.1 -p ${REDIS_PID} -s ${REDIS_SOCK} + ./hiredis-test -h 127.0.0.1 -p ${REDIS_PORT} -s ${REDIS_SOCK} local ret=$? kill "$(<"${REDIS_PID}")" || die |