unbound/testdata/08-host-lib.tdir/08-host-lib.pre
2022-09-20 14:45:20 +02:00

29 lines
681 B
Plaintext

# #-- 08-host-lib.pre--#
# source the master var file when it's there
[ -f ../.tpkg.var.master ] && source ../.tpkg.var.master
# use .tpkg.var.test for in test variable passing
[ -f .tpkg.var.test ] && source .tpkg.var.test
PRE="../.."
. ../common.sh
if grep FORK $PRE/config.h | grep "define" >/dev/null 2>&1; then
# nothing
:
else
skip_test "forking is not available; test skipped."
fi
get_random_port 2
FWD_PORT=$(($RND_PORT + 1))
echo "FWD_PORT=$FWD_PORT" >> .tpkg.var.test
# start forwarder
get_ldns_testns
$LDNS_TESTNS -p $FWD_PORT 08-host-lib.testns >fwd.log 2>&1 &
FWD_PID=$!
echo "FWD_PID=$FWD_PID" >> .tpkg.var.test
cat .tpkg.var.test
wait_ldns_testns_up fwd.log