diff options
author | Omar Polo <op@omarpolo.com> | 2023-06-23 22:00:21 +0000 |
---|---|---|
committer | Omar Polo <op@omarpolo.com> | 2023-06-23 22:00:21 +0000 |
commit | 5a345722826201a4da926abc096aed76de3cdaa4 (patch) | |
tree | 7dbfee467ea4fa18d778b5b2e1dd02f78b2db5a3 /regress | |
parent | a7a998ac9b5c17d6e689569d8284ac288c64bf09 (diff) |
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.
Diffstat (limited to 'regress')
-rw-r--r-- | regress/Makefile | 5 | ||||
-rw-r--r-- | regress/lib.sh | 4 | ||||
-rw-r--r-- | regress/tests.sh | 2 |
3 files changed, 7 insertions, 4 deletions
diff --git a/regress/Makefile b/regress/Makefile index a0feea0..ed79b78 100644 --- a/regress/Makefile +++ b/regress/Makefile @@ -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 diff --git a/regress/lib.sh b/regress/lib.sh index 06cb7a7..05f3252 100644 --- a/regress/lib.sh +++ b/regress/lib.sh @@ -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 diff --git a/regress/tests.sh b/regress/tests.sh index a38e4ba..7250979 100644 --- a/regress/tests.sh +++ b/regress/tests.sh @@ -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 |