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