2 # source the master var file when it's there
3 [ -f ../.tpkg.var.master ] && source ../.tpkg.var.master
4 # use .tpkg.var.test for in test variable passing
5 [ -f .tpkg.var.test ] && source .tpkg.var.test
8 if grep "define WITH_PYUNBOUND 1" $PRE/config.h; then
15 if test "`uname 2>&1`" = "Darwin"; then
16 echo export DYLD_LIBRARY_PATH="$DYLD_LIBRARY_PATH:../../.libs"
17 export DYLD_LIBRARY_PATH="$DYLD_LIBRARY_PATH:../../.libs"
19 #echo export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:../../.libs:."
20 #export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:../../.libs:."
22 if grep "PY_MAJOR_VERSION=3" $PRE/Makefile; then
23 PYTHON="python3"; else PYTHON="python2"; fi
24 if test ! -x `which $PYTHON` 2>&1; then PYTHON="python"; fi
27 echo "> pylib.lookup.py www.example.com."
28 $PYTHON pylib.lookup.py www.example.com. | tee outfile
33 if grep "Resolve: \[.\?10.20.30.40.\?\]" outfile; then
36 echo "Not OK (resolve)"
39 if grep "Async resolve: \[.\?10.20.30.40.\?\]" outfile; then
42 echo "Not OK (async resolve)"
45 if grep "Ratelimit-fg-on: pass" outfile; then
48 echo "Not OK (ratelimit-fg-on)"
51 if grep "Ratelimit-fg-off: \[.\?10.20.30.40.\?\]" outfile; then
54 echo "Not OK (ratelimit-fg-off)"
57 if grep "Ratelimit-bg-on: pass" outfile; then
60 echo "Not OK (ratelimit-bg-on)"
63 if grep "Ratelimit-bg-off: \[.\?10.20.30.40.\?\]" outfile; then
66 echo "Not OK (ratelimit-bg-off)"