unbound/testdata/pylib.tdir/pylib.test
wouter 8ba25b126a tests in tdir format.
git-svn-id: https://unbound.nlnetlabs.nl/svn/trunk@4264 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-07-06 13:27:30 +00:00

41 lines
985 B
Plaintext

# #-- pylib.test --#
# 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="../.."
if grep "define WITH_PYUNBOUND 1" $PRE/config.h; then
echo "have python module"
else
echo "no python module"
exit 0
fi
if test "`uname 2>&1`" = "Darwin"; then
echo export DYLD_LIBRARY_PATH="$DYLD_LIBRARY_PATH:../../.libs"
export DYLD_LIBRARY_PATH="$DYLD_LIBRARY_PATH:../../.libs"
fi
#echo export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:../../.libs:."
#export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:../../.libs:."
cp $PRE/libunbound/python/unbound.py .
cp $PRE/.libs/_unbound* .
cp $PRE/.libs/libunbound* .
# do the test
echo "> pylib.lookup.py www.example.com."
./pylib.lookup.py www.example.com. | tee outfile
echo "> cat logfiles"
cat fwd.log
echo "> check answer"
if grep "10.20.30.40" outfile; then
echo "OK"
else
echo "Not OK"
exit 1
fi
exit 0