mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-08-05 21:37:15 +02:00
community/lua-copas: force tests to only use ipv4
if localhost resolves to ipv6 address, tests will fail, so we force ipv4
This commit is contained in:
parent
a7d7de5631
commit
b167cf490e
@ -12,7 +12,8 @@ license="MIT"
|
||||
depends="lua-socket"
|
||||
checkdepends="lua5.1-coxpcall lua-sec"
|
||||
subpackages=""
|
||||
source="$pkgname-$pkgver.tar.gz::https://github.com/keplerproject/$_pkgname/archive/v$_pkgver.tar.gz"
|
||||
source="$pkgname-$pkgver.tar.gz::https://github.com/keplerproject/$_pkgname/archive/v$_pkgver.tar.gz
|
||||
ipv4-only.patch"
|
||||
builddir="$srcdir/$_pkgname-$_pkgver"
|
||||
|
||||
# luajit is not available on s390x
|
||||
@ -56,4 +57,5 @@ _subpackage() {
|
||||
echo 'rock_manifest = {}' > "$rockdir"/rock_manifest
|
||||
}
|
||||
|
||||
sha512sums="dd83a513fbddb2f0164c3573b417623f5cc556413c4937be7e362f4c1667bad83391143e1bf609480726730ce488c4080e810f2ce12a98a7abb5293993c10182 lua-copas-2.0.2.tar.gz"
|
||||
sha512sums="dd83a513fbddb2f0164c3573b417623f5cc556413c4937be7e362f4c1667bad83391143e1bf609480726730ce488c4080e810f2ce12a98a7abb5293993c10182 lua-copas-2.0.2.tar.gz
|
||||
4fb2b65f41869b9729cc4672eebbfb2745a2d01af1cd54341b8306f57510f98e118eac77c77a980f4c8e8b181b6fda150061dc39819269e9ee64bf07656dfd54 ipv4-only.patch"
|
||||
|
22
community/lua-copas/ipv4-only.patch
Normal file
22
community/lua-copas/ipv4-only.patch
Normal file
@ -0,0 +1,22 @@
|
||||
diff --git a/tests/largetransfer.lua b/tests/largetransfer.lua
|
||||
index 9ada332..5b9727c 100644
|
||||
--- a/tests/largetransfer.lua
|
||||
+++ b/tests/largetransfer.lua
|
||||
@@ -41,7 +41,7 @@ local function runtest()
|
||||
copas.sleep(0)
|
||||
local skt = socket.tcp()
|
||||
skt = copas.wrap(skt, cparams)
|
||||
- skt:connect("localhost", 49500)
|
||||
+ skt:connect("127.0.0.1", 49500)
|
||||
skt:send(body)
|
||||
print("Writing... 49500... Done!", socket.gettime()-start, err, #body)
|
||||
skt = nil
|
||||
@@ -54,7 +54,7 @@ local function runtest()
|
||||
copas.sleep(0)
|
||||
local skt = socket.tcp()
|
||||
skt = copas.wrap(skt, cparams)
|
||||
- skt:connect("localhost", 49501)
|
||||
+ skt:connect("127.0.0.1", 49501)
|
||||
skt:send(body)
|
||||
print("Writing... 49501... Done!", socket.gettime()-start, err, #body)
|
||||
skt = nil
|
Loading…
Reference in New Issue
Block a user