git » dnss » commit 15a8c58

tests: Include GOCOVERDIR in systemd tests

author Alberto Bertogli
2023-02-26 19:31:02 UTC
committer Alberto Bertogli
2023-02-26 19:31:02 UTC
parent 9e7e91205767d6d6c800ee427934481cc73eac14

tests: Include GOCOVERDIR in systemd tests

systemd-socket-activate will filter out the $GOCOVERDIR environment
variable by default, so coverage for those tests was not getting
collected.

This patch fixes that by telling systemd-socket-activate to propagate
it.

tests/external.sh +2 -2

diff --git a/tests/external.sh b/tests/external.sh
index 79aea7b..232821b 100755
--- a/tests/external.sh
+++ b/tests/external.sh
@@ -246,7 +246,7 @@ kill $PID
 # systemd socket activation tests must check one protocol at a time, due to
 # systemd-socket-activate not being able to listen on both.
 echo "## Socket activation via systemd: TCP"
-SYSTEMD_ACTIVATE="systemd-socket-activate -l 1053"
+SYSTEMD_ACTIVATE="systemd-socket-activate -E GOCOVERDIR -l 1053"
 dnss -enable_dns_to_https -dns_listen_addr "systemd"
 
 wait_until_ready tcp 1053
@@ -256,7 +256,7 @@ grep -E -q '^example.com.*A'  .dig.log
 kill $PID
 
 echo "## Socket activation via systemd: UDP"
-SYSTEMD_ACTIVATE="systemd-socket-activate -d -l 1053"
+SYSTEMD_ACTIVATE="systemd-socket-activate -E GOCOVERDIR -d -l 1053"
 dnss -enable_dns_to_https -dns_listen_addr "systemd"
 
 sleep 0.2