]> git.ipfire.org Git - thirdparty/pdns.git/blob - regression-tests/recursor-test
Merge pull request #970 from zeha/nproxy-chroot-chdir
[thirdparty/pdns.git] / regression-tests / recursor-test
1 #!/bin/sh -ex
2 port=$1
3 [ -z "$port" ] && port=5300
4 limit=$2
5 [ -z "$limit" ] && limit=100000
6
7 ../pdns/pdns_recursor --daemon=no --local-port=$port --socket-dir=./ --trace=fail --config-dir=. --query-local-address6=:: > recursor.log 2>&1 &
8 sleep 3
9 ../pdns/dnsbulktest -qe 127.0.0.1 $port $limit < top-1m.csv > bulktest.results
10 kill $(cat recursor.pid)
11
12 . ./bulktest.results
13
14 mkdir -p recursor-bulktest
15 rm -f failed_tests passed_tests
16 touch failed_tests passed_tests
17 if [ "$DBT_OKPERCENTAGEINT" -ge 95 ]
18 then
19 echo recursor-bulktest >> passed_tests
20 else
21 echo recursor-bulktest >> failed_tests
22 fi
23
24 echo "$DBT_OKPERCENTAGE% of domains resolved" > recursor-bulktest/diff
25 echo "<measurement><name>% domains resolved</name><value>$DBT_OKPERCENTAGE</value></measurement>" > recursor-bulktest/stdout
26
27 testsdir=. context=recursor-bulktest ./toxml