use REGRESS_HOST to specify the host to listen to; use in CI

some CI envs don't like `listen on localhost' but tolerate INADDR_ANY
or IN6ADDR_ANY_INIT.
This commit is contained in:
Omar Polo 2023-06-23 22:00:21 +00:00
parent a7a998ac9b
commit 5a34572282
5 changed files with 12 additions and 6 deletions

View File

@ -5,7 +5,7 @@ linux_amd64_task:
- apk add alpine-sdk linux-headers bison libretls-dev libevent-dev
- ./configure CFLAGS='-O2 -pipe -Wno-deprecated-declarations' -Werror
- make
- make regress
- make regress REGRESS_HOST="*"
linux_arm_task:
arm_container:
@ -14,7 +14,7 @@ linux_arm_task:
- apk add alpine-sdk linux-headers bison libretls-dev libevent-dev
- ./configure CFLAGS='-O2 -pipe -Wno-deprecated-declarations' -Werror
- make
- make regress
- make regress REGRESS_HOST="*"
freebsd_13_task:
freebsd_instance:

View File

@ -18,6 +18,9 @@
# all.
TESTS=
# host to bind to during regress
REGRESS_HOST = localhost
# -- build-related variables --
COBJS = ${COMPATS:.c=.o}

View File

@ -2,6 +2,9 @@
# all.
TESTS=
# host to bind to during regress
REGRESS_HOST = localhost
DISTFILES = Makefile \
env \
err \
@ -34,7 +37,7 @@ IRI_OBJS = ${IRI_SRCS:.c=.o} ${REG_COMPATS}
.PHONY: all data clean dist
all: data puny-test iri_test fcgi-test
./regress ${TESTS}
env REGRESS_HOST="${REGRESS_HOST}" ./regress ${TESTS}
data: testdata cert.pem testca.pem valid.crt invalid.cert.pem

View File

@ -62,7 +62,7 @@ server "localhost" {
cert "$PWD/cert.pem"
key "$PWD/key.pem"
root "$PWD/testdata"
listen on localhost port $port
listen on $REGRESS_HOST port $port
$2
}
EOF
@ -77,7 +77,7 @@ set_proxy() {
server "localhost.local" {
cert "$PWD/cert.pem"
key "$PWD/key.pem"
listen on localhost port $port
listen on $REGRESS_HOST port $port
proxy {
relay-to localhost port $port
$1

View File

@ -245,7 +245,7 @@ server "localhost" {
cert \$pwd "/cert.pem"
key \$pwd "/key.pem"
root \$pwd "/testdata"
listen on localhost port $port
listen on $REGRESS_HOST port $port
}
EOF