]> git.ipfire.org Git - thirdparty/pdns.git/blame - build-scripts/test-auth
Update rules-actions.rst
[thirdparty/pdns.git] / build-scripts / test-auth
CommitLineData
d9c6538e
PL
1#!/bin/sh
2
3set -x
4f983d1b
PD
4context=''
5# poor mans option parsing
6if [ -n "$1" ]; then
7 if [ "$1" != "odbc" ]; then
8 echo "invalid argument"
9 exit 1
10 fi
11 context=odbc
12 if [ -n "$2" ]; then
13 echo "too many arguments"
14 exit 1
15 fi
16fi
17
d9c6538e
PL
18export PDNS=/usr/sbin/pdns_server
19export PDNS2=$PDNS
20export SDIG=/usr/bin/sdig
21export NSEC3DIG=/usr/bin/nsec3dig
a4437033 22export NOTIFY=/usr/bin/pdns_notify
d9c6538e
PL
23export SAXFR=/usr/bin/saxfr
24export ZONE2SQL=/usr/bin/zone2sql
a9666412 25export ZONE2JSON=/usr/bin/zone2json
fd5076c8 26export PDNSUTIL=/usr/bin/pdnsutil
d9c6538e
PL
27export PDNSCONTROL=/usr/bin/pdns_control
28
e616a4d5
PL
29export GEM_HOME=${PWD}/gems
30mkdir -p $GEM_HOME
31export PATH="${GEM_HOME}/bin:$PATH"
32
fdf24fd2 33if [ -z "$context" ]; then
4f983d1b
PD
34 cd modules/remotebackend
35 ruby -S bundle install
36 cd ../../
37fi
e616a4d5 38
d9c6538e
PL
39MODULES=""
40
41for dir in /usr/lib/x86_64-linux-gnu/pdns /usr/lib64/pdns; do
42 if [ -d $dir ]; then
43 MODULES=$dir
44 break
45 fi
46done
47[ -z $MODULES ] && echo "No module directory found" >&2 && exit 1
48
49# Symlink the modules on the system
50cd regression-tests/modules
51for backend in *.so; do
52 ln -sf $MODULES/$backend $backend
53done
54
55cd ..
56
e616a4d5
PL
57EXITCODE=0
58
4f983d1b
PD
59if [ -z "$context" ]; then
60 export geoipregion=oc geoipregionip=1.2.3.4
61 ./timestamp ./start-test-stop 5300 bind-both || EXITCODE=1
62 ./timestamp ./start-test-stop 5300 bind-dnssec-both || EXITCODE=1
63
64 # No PKCS#11 in packages
65 #SETUP_SOFTHSM=y ./timestamp ./start-test-stop 5300 bind-dnssec-pkcs11 || EXITCODE=1
66 ./timestamp ./start-test-stop 5300 bind-dnssec-nsec3-both || EXITCODE=1
67 ./timestamp ./start-test-stop 5300 bind-dnssec-nsec3-optout-both || EXITCODE=1
68 ./timestamp ./start-test-stop 5300 bind-dnssec-nsec3-narrow || EXITCODE=1
69 ./timestamp ./start-test-stop 5300 bind-hybrid-nsec3 || EXITCODE=1
70
71 # Adding extra IPs to docker containers in not supported :(
72 #./timestamp ./start-test-stop 5300 geoipbackend || EXITCODE=1
73 #./timestamp ./start-test-stop 5300 geoipbackend-nsec3-narrow || EXITCODE=1
74
75 ./timestamp ./start-test-stop 5300 gmysql-nodnssec-both || EXITCODE=1
76 ./timestamp ./start-test-stop 5300 gmysql-both || EXITCODE=1
77 ./timestamp ./start-test-stop 5300 gmysql-nsec3-both || EXITCODE=1
78 ./timestamp ./start-test-stop 5300 gmysql-nsec3-optout-both || EXITCODE=1
79 ./timestamp ./start-test-stop 5300 gmysql-nsec3-narrow || EXITCODE=1
80
81 ./timestamp ./start-test-stop 5300 gpgsql-nodnssec-both || EXITCODE=1
82 ./timestamp ./start-test-stop 5300 gpgsql-both || EXITCODE=1
83 ./timestamp ./start-test-stop 5300 gpgsql-nsec3-both || EXITCODE=1
84 ./timestamp ./start-test-stop 5300 gpgsql-nsec3-optout-both || EXITCODE=1
85 ./timestamp ./start-test-stop 5300 gpgsql-nsec3-narrow || EXITCODE=1
86
87 ./timestamp ./start-test-stop 5300 gsqlite3-nodnssec-both || EXITCODE=1
88 ./timestamp ./start-test-stop 5300 gsqlite3-both || EXITCODE=1
89 ./timestamp ./start-test-stop 5300 gsqlite3-nsec3-both || EXITCODE=1
90 ./timestamp ./start-test-stop 5300 gsqlite3-nsec3-optout-both || EXITCODE=1
91 ./timestamp ./start-test-stop 5300 gsqlite3-nsec3-narrow || EXITCODE=1
92
93 ./timestamp ./start-test-stop 5300 mydns || EXITCODE=1
94
95 ./timestamp ./start-test-stop 5300 opendbx-sqlite3 || EXITCODE=1
96
97 ./timestamp timeout 120s ./start-test-stop 5300 remotebackend-pipe || EXITCODE=1
98 ./timestamp timeout 120s ./start-test-stop 5300 remotebackend-pipe-dnssec || EXITCODE=1
99 ./timestamp timeout 120s ./start-test-stop 5300 remotebackend-unix || EXITCODE=1
100 ./timestamp timeout 120s ./start-test-stop 5300 remotebackend-unix-dnssec || EXITCODE=1
101 ./timestamp timeout 120s ./start-test-stop 5300 remotebackend-http || EXITCODE=1
102 ./timestamp timeout 120s ./start-test-stop 5300 remotebackend-http-dnssec || EXITCODE=1
103
6a6426ed
AT
104 ./timestamp timeout 120s ./start-test-stop 5300 lua2
105 ./timestamp timeout 120s ./start-test-stop 5300 lua2-dnssec
4f983d1b
PD
106
107 # No 0MQ in the PowerDNS packages
108 #./timestamp timeout 120s ./start-test-stop 5300 remotebackend-zeromq || EXITCODE=1
109 #./timestamp timeout 120s ./start-test-stop 5300 remotebackend-zeromq-dnssec || EXITCODE=1
110
111 ./timestamp ./start-test-stop 5300 tinydns || EXITCODE=1
112
8cce0396
KM
113 cd ../modules/luabackend/test2/
114 ../../../regression-tests/timestamp ./runtest || EXITCODE=1
115
116 cd ../../../regression-tests.nobackend/
4f983d1b 117
4f983d1b
PD
118 ./runtests || EXITCODE=1
119elif [ "$context" = "odbc" ]; then
120 cat > ~/.odbc.ini << __EOF__
121[pdns-sqlite3-1]
122Driver = SQLite3
123Database = $(pwd)/pdns.sqlite3
124
125[pdns-sqlite3-2]
126Driver = SQLite3
127Database = $(pwd)/pdns.sqlite32
128
129[pdns-mssql]
130Driver=FreeTDS
131Trace=No
132Server=pdns-odbc-regress-sql-1.database.windows.net
133Port=1433
134Database=pdns
135TDS_Version=7.1
136ClientCharset=UTF-8
137__EOF__
138
139 set +x
140 . ~/.mssql-credentials
141 set -x
142 export GODBC_SQLITE3_DSN=pdns-sqlite3-1
143 ./timestamp timeout 120s ./start-test-stop 5300 godbc_sqlite3-nodnssec || EXITCODE=1
144 export GODBC_MSSQL_DSN=pdns-mssql
145 export GODBC_MSSQL_USERNAME
146 export GODBC_MSSQL_PASSWORD
147 ./timestamp timeout 3600s ./start-test-stop 5300 godbc_mssql-nodnssec || EXITCODE=1
148 ./timestamp timeout 3600s ./start-test-stop 5300 godbc_mssql || EXITCODE=1
149 ./timestamp timeout 3600s ./start-test-stop 5300 godbc_mssql-nsec3 || EXITCODE=1
150 ./timestamp timeout 3600s ./start-test-stop 5300 godbc_mssql-nsec3-optout || EXITCODE=1
151 ./timestamp timeout 3600s ./start-test-stop 5300 godbc_mssql-nsec3-narrow || EXITCODE=1
152fi
de9a69a9 153
e616a4d5 154exit $EXITCODE