unbound/testdata/speed_local.tdir/speed_local.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

44 lines
900 B
Plaintext

# #-- speed_local.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="../.."
. ../common.sh
get_make
(cd $PRE; $MAKE perf)
echo "> perf version.server"
$PRE/perf -d 1 -a "version.server CH TXT -" 127.0.0.1@$UNBOUND_PORT 2>&1 |
tee outfile
echo -n "version-server " > line.txt
if grep "average qps" outfile >> line.txt 2>&1; then
echo "OK"
else
echo "> cat logfiles"
cat unbound.log
echo "Not OK"
exit 1
fi
echo "> perf localhost"
$PRE/perf -d 1 -a "localhost IN A -" 127.0.0.1@$UNBOUND_PORT 2>&1 |
tee outfile
echo -n "localhost-addr " >> line.txt
if grep "average qps" outfile >> line.txt 2>&1; then
echo "OK"
else
echo "> cat logfiles"
cat unbound.log
echo "Not OK"
exit 1
fi
cat line.txt >> ../.perfstats.txt
exit 0