From: Peter van Dijk Date: Fri, 13 Feb 2015 08:49:13 +0000 (+0100) Subject: add recursor-test-freebsd script X-Git-Tag: dnsdist-1.0.0-alpha1~295^2~2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6acfc026d6c8b79d931791fbed4b5adf8783a7ee;p=pdns add recursor-test-freebsd script --- diff --git a/regression-tests/recursor-test-freebsd b/regression-tests/recursor-test-freebsd new file mode 100644 index 000000000..5cdda7168 --- /dev/null +++ b/regression-tests/recursor-test-freebsd @@ -0,0 +1,51 @@ +#!/bin/sh -ex +chmod +x dnsbulktest toxml +port=$1 +[ -z "$port" ] && port=5300 +limit=$2 +[ -z "$limit" ] && limit=100000 + +: ${RECURSOR:=pdns-recursor-*/pdns_recursor} +: ${CSV:="top-1m.csv"} +: ${IPv6:="1"} +: ${TRACE:="fail"} + +if [ $IPv6 = 1 ] +then + QLA6="::" +else + QLA6="" +fi + +rm -f recursor.pid pdns_recursor.pid +${RECURSOR} --daemon=no --local-port=$port --socket-dir=./ --trace=$TRACE --config-dir=. --local-address=0.0.0.0 --allow-from=0.0.0.0/0 --query-local-address6="${QLA6}" > recursor.log 2>&1 & +sleep 3 +./dnsbulktest -qe 37.252.127.190 $port $limit < ${CSV} > bulktest.results +kill $(cat pdns_recursor.pid) +sleep 5 + +. ./bulktest.results + +mkdir -p recursor-bulktest +rm -f failed_tests passed_tests +touch failed_tests passed_tests +: ${THRESHOLD:="95"} +if [ "$DBT_OKPERCENTAGEINT" -ge $THRESHOLD ] +then + echo recursor-bulktest >> passed_tests + RETVAL=0 +else + echo recursor-bulktest >> failed_tests + RETVAL=1 +fi + +echo "$DBT_OKPERCENTAGE% of domains resolved" > recursor-bulktest/diff +egrep 'PowerDNS.COM|^ recursor-bulktest/stdout +echo "% domains resolved$DBT_OKPERCENTAGE" >> recursor-bulktest/stdout + +: ${context:="recursor-bulktest"} + +export context +testsdir=. ./toxml + +exit $RETVAL