]>
Commit | Line | Data |
---|---|---|
ae7072eb PL |
1 | #!/bin/sh |
2 | ||
3 | export PDNSRECURSOR=${PDNSRECURSOR:-/usr/sbin/pdns_recursor} | |
079baebc | 4 | export PDNSRECCONTROL=${PDNSRECCONTROL:-/usr/bin/rec_control} |
ae7072eb PL |
5 | export DNSBULKTEST=${DNSBULKTEST:-/usr/bin/dnsbulktest} |
6 | ||
7 | if [ "$0" != "./build-scripts/test-recursor-bulk" ]; then | |
8 | echo "Please run me from the root checkout dir" | |
9 | exit 1 | |
10 | fi | |
11 | ||
ae7072eb PL |
12 | set -x |
13 | ||
14 | cd regression-tests | |
15 | ||
c86a0866 | 16 | rm -f top-1m.csv |
8a27076c | 17 | wget -c -N http://s3-us-west-1.amazonaws.com/umbrella-static/top-1m.csv.zip |
ae7072eb | 18 | |
f947fe60 | 19 | unzip top-1m.csv.zip |
ae7072eb | 20 | |
d50cbd6a | 21 | numdomains="1000 5000 10000 50000 100000 500000" |
ae7072eb PL |
22 | if [ ! -z "$1" ]; then |
23 | numdomains="$1" | |
24 | fi | |
25 | ||
a5cbde36 | 26 | if false; then |
f230992c | 27 | set +x |
ae7072eb | 28 | for prefix in 'www' 'wildcard'; do |
a5cbde36 | 29 | rm -f ${prefix}.csv |
ae7072eb | 30 | for num in $(seq 0 1000000); do |
c3bad7e8 | 31 | echo "${num},${prefix}.powerdnssec.org" >> ${prefix}.csv |
ae7072eb PL |
32 | done |
33 | done | |
f230992c | 34 | set -x |
a5cbde36 | 35 | fi |
ae7072eb | 36 | |
f947fe60 PL |
37 | EXIT=0 |
38 | ||
ae7072eb PL |
39 | version=$($PDNSRECURSOR --version 2>&1 | awk '/PowerDNS Recursor/ { print $6 }') |
40 | for IPv6 in 0 1; do | |
f947fe60 | 41 | for CSV in $(ls *.csv); do |
ae7072eb | 42 | for domains in $numdomains; do |
c86a0866 | 43 | export context="${version}_v6:${IPv6}_csv:${CSV%%.*}_domains:${domains}" |
ae7072eb PL |
44 | export IPv6 |
45 | export CSV | |
079baebc | 46 | RECURSOR=$PDNSRECURSOR RECCONTROL=$PDNSRECCONTROL THRESHOLD=0 TRACE=no time ./recursor-test 5401 $domains || EXIT=1 |
f947fe60 | 47 | mv -f recursor.log recursor-${context}.log |
ae7072eb PL |
48 | sleep 10 |
49 | done | |
50 | done | |
51 | done | |
52 | ./bulktest-to-json.py | tee bulktest-results.json | |
53 | ||
54 | # cleanup | |
55 | rm -rf csv/ | |
f947fe60 PL |
56 | rm -f *.log |
57 | rm -f bulktest-results.json | |
58 | ||
59 | exit $EXIT |