protobuf-compiler \
python3-venv
- install-ixfrdist-deps:
- description: "Install all libraries needed for testing ixfrdist"
- steps:
- - run: apt-get update
- - run:
- command: |
- apt-get install -qq -y \
- git \
- libboost-all-dev \
- libsodium23 \
- libsystemd0 \
- libyaml-cpp0.6 \
- python3-venv
-
install-auth-dev-deps:
description: Install all packages needed to build the auth
steps:
context: geoip
doroot: false
- test-auth-algorithms:
- resource_class: small
-
- docker:
- - image: debian:buster
- auth:
- username: powerdnsreadonly
- password: $DOCKERHUB_PASSWORD
- environment:
- UBSAN_OPTIONS: 'print_stacktrace=1:halt_on_error=1'
- ASAN_OPTIONS: detect_leaks=0
- steps:
- - auth-regress-setup
- - run:
- name: Test all algorithms
- command: /opt/pdns-auth/bin/pdnsutil test-algorithms
-
- test-auth-py:
- resource_class: small
-
- docker:
- - image: debian:buster
- auth:
- username: powerdnsreadonly
- password: $DOCKERHUB_PASSWORD
- environment:
- UBSAN_OPTIONS: 'print_stacktrace=1:halt_on_error=1'
- ASAN_OPTIONS: detect_leaks=0
- steps:
- - auth-regress-setup
- - run: apt-get -y -qq install python3-venv
- - run:
- name: Run auth-py tests
- workdir: ~/project/regression-tests.auth-py
- command: |
- PDNS="/opt/pdns-auth/sbin/pdns_server" \
- PDNSUTIL="/opt/pdns-auth/bin/pdnsutil" \
- SDIG="/opt/pdns-auth/bin/sdig" \
- ZONE2SQL="/opt/pdns-auth/bin/zone2sql" \
- ./runtests
-
build-recursor:
docker:
- image: debian:buster
--form description="master build" \
https://scan.coverity.com/builds?project=${COVERITY_PROJECT}
- build-dnsdist:
- docker:
- - image: debian:buster
- auth:
- username: powerdnsreadonly
- password: $DOCKERHUB_PASSWORD
- environment:
- UBSAN_OPTIONS: 'print_stacktrace=1:halt_on_error=1'
- ASAN_OPTIONS: detect_leaks=0
- steps:
- - run:
- name: Install dependencies
- command: |
- apt-get update && apt-get -qq --no-install-recommends install \
- autoconf \
- automake \
- g++ \
- git \
- libboost-all-dev \
- libcap-dev \
- libcdb-dev \
- libedit-dev \
- libfstrm-dev \
- libgnutls28-dev \
- libh2o-evloop-dev \
- liblmdb-dev \
- libluajit-5.1-dev \
- libnghttp2-dev \
- libre2-dev \
- libsnmp-dev \
- libsodium-dev \
- libssl-dev \
- libsystemd-dev \
- libtool \
- make \
- pkg-config \
- ragel \
- systemd \
- python3-venv
- - install-clang-8
- - restore-cache-ccache:
- product: dnsdist
- - get-workspace
- - run:
- name: autoconf
- command: BUILDER_VERSION=0.0.0-git1 autoreconf -vfi
- working_directory: ~/project/pdns/dnsdistdist
- - run:
- name: configure
- command: |
- CC='clang-8' \
- CXX='clang++-8' \
- CFLAGS="-O1 -Werror=vla -Werror=shadow -Wformat=2 -Werror=format-security -Werror=string-plus-int" \
- CXXFLAGS="-O1 -Werror=vla -Werror=shadow -Wformat=2 -Werror=format-security -Werror=string-plus-int -Wp,-D_GLIBCXX_ASSERTIONS" \
- ./configure \
- --enable-option-checking=fatal \
- --enable-unit-tests \
- --enable-dnstap \
- --enable-dnscrypt \
- --enable-dns-over-tls \
- --enable-dns-over-https \
- --enable-systemd \
- --prefix=/opt/dnsdist \
- --with-gnutls \
- --with-libsodium \
- --with-lua=luajit \
- --with-libcap \
- --with-nghttp2 \
- --with-re2 \
- --enable-asan \
- --enable-ubsan
- working_directory: ~/project/pdns/dnsdistdist
- - run:
- name: build
- command: make -j1 -k
- working_directory: ~/project/pdns/dnsdistdist
- - save-ccache-cache:
- product: dnsdist
- - run:
- name: Run unit tests
- command: make check || (cat test-suite.log; false)
- working_directory: ~/project/pdns/dnsdistdist
- - run:
- name: Install resulting binaries
- command: make install
- working_directory: ~/project/pdns/dnsdistdist
- - persist_to_workspace:
- root: /opt
- paths:
- - dnsdist
-
- test-ixfrdist-regression:
- resource_class: small
-
- docker:
- - image: debian:buster
- auth:
- username: powerdnsreadonly
- password: $DOCKERHUB_PASSWORD
- environment:
- UBSAN_OPTIONS: 'print_stacktrace=1:halt_on_error=1'
- ASAN_OPTIONS: detect_leaks=0
- steps:
- - install-ixfrdist-deps
- - get-workspace
- - run:
- name: Run ixfrdist tests
- workdir: ~/project/regression-tests.ixfrdist
- command: |
- IXFRDISTBIN="/opt/pdns-auth/bin/ixfrdist" \
- ./runtests
-
workflows:
version: 2
coverity:
- build-auth:
requires:
- checkout
- - test-auth-algorithms:
- requires:
- - build-auth
- test-auth-regress-odbc-sqlite3:
requires:
- build-auth
- test-auth-regress-ldap:
requires:
- build-auth
- - test-auth-py:
- requires:
- - build-auth
- check-formatting:
requires:
- checkout
- test-recursor-bulk:
requires:
- build-recursor
- - test-ixfrdist-regression:
- requires:
- - build-auth
build-docs:
jobs:
'curl',
'default-jre-headless',
'dnsutils',
+ 'faketime',
'gawk',
'ldnsutils',
'libboost-serialization1.71.0',
'libsystemd0',
'libyaml-cpp0.6',
'libzmq3-dev',
- 'pdns-recursor',
'ruby-bundler',
'ruby-dev',
'socat',
bind=[],
geoip=[],
lua2=[],
- tinydns=[]
+ tinydns=[],
+ authpy=[]
)
@task(help={'backend': 'Backend to install test deps for, e.g. gsqlite3; can be repeated'}, iterable=['backend'], optional=['backend'])
# rm jdnssec-tools-0.14.tar.gz
# fi
# echo 'export PATH=$HOME/jdnssec-tools-0.14/bin:$PATH' >> $BASH_ENV''') # FIXME: why did this fail with no error?
- c.run('touch regression-tests/tests/verify-dnssec-zone/allow-missing') # FIXME: can this go?
- # FIXME we need to start a background recursor here for some tests
+ c.run('touch regression-tests/tests/verify-dnssec-zone/allow-missing regression-tests.nobackend/rectify-axfr/allow-missing') # FIXME: can this go?
+ # FIXME we may want to start a background recursor here to make ALIAS tests more robust
setup_authbind(c)
@task
def ci_auth_run_unit_tests(c):
res = c.run('make check', warn=True)
if res.exited != 0:
- c.run('cat pdns/test-suite.log')
- c.run('cat modules/remotebackend/test-suite.log')
+ c.run('cat pdns/test-suite.log', warn=True)
+ c.run('cat modules/remotebackend/test-suite.log', warn=True)
raise UnexpectedExit(res)
@task
if backend == 'remote':
ci_auth_install_remotebackend_ruby_deps(c)
+ if backend == 'authpy':
+ with c.cd('regression-tests.auth-py'):
+ c.run(f'PDNS=/opt/pdns-auth/sbin/pdns_server PDNS2=/opt/pdns-auth/sbin/pdns_server SDIG=/opt/pdns-auth/bin/sdig NOTIFY=/opt/pdns-auth/bin/pdns_notify NSEC3DIG=/opt/pdns-auth/bin/nsec3dig SAXFR=/opt/pdns-auth/bin/saxfr ZONE2SQL=/opt/pdns-auth/bin/zone2sql ZONE2LDAP=/opt/pdns-auth/bin/zone2ldap ZONE2JSON=/opt/pdns-auth/bin/zone2json PDNSUTIL=/opt/pdns-auth/bin/pdnsutil PDNSCONTROL=/opt/pdns-auth/bin/pdns_control PDNSSERVER=/opt/pdns-auth/sbin/pdns_server SDIG=/opt/pdns-auth/bin/sdig GMYSQLHOST=127.0.0.1 GMYSQL2HOST=127.0.0.1 MYSQL_HOST="127.0.0.1" PGHOST="127.0.0.1" PGPORT="5432" ./runtests')
+ return
+
with c.cd('regression-tests'):
if backend == 'lua2':
c.run('touch trustedkeys') # avoid silly error during cleanup
for variant in backend_regress_tests[backend]:
# FIXME this long line is terrible
- c.run(f'PDNS=/opt/pdns-auth/sbin/pdns_server PDNS2=/opt/pdns-auth/sbin/pdns_server SDIG=/opt/pdns-auth/bin/sdig NOTIFY=/opt/pdns-auth/bin/pdns_notify NSEC3DIG=/opt/pdns-auth/bin/nsec3dig SAXFR=/opt/pdns-auth/bin/saxfr ZONE2SQL=/opt/pdns-auth/bin/zone2sql ZONE2LDAP=/opt/pdns-auth/bin/zone2ldap PDNSUTIL=/opt/pdns-auth/bin/pdnsutil PDNSCONTROL=/opt/pdns-auth/bin/pdns_control PDNSSERVER=/opt/pdns-auth/sbin/pdns_server SDIG=/opt/pdns-auth/bin/sdig GMYSQLHOST=127.0.0.1 GMYSQL2HOST=127.0.0.1 MYSQL_HOST="127.0.0.1" PGHOST="127.0.0.1" PGPORT="5432" ./start-test-stop 5300 {variant}')
+ c.run(f'PDNS=/opt/pdns-auth/sbin/pdns_server PDNS2=/opt/pdns-auth/sbin/pdns_server SDIG=/opt/pdns-auth/bin/sdig NOTIFY=/opt/pdns-auth/bin/pdns_notify NSEC3DIG=/opt/pdns-auth/bin/nsec3dig SAXFR=/opt/pdns-auth/bin/saxfr ZONE2SQL=/opt/pdns-auth/bin/zone2sql ZONE2LDAP=/opt/pdns-auth/bin/zone2ldap ZONE2JSON=/opt/pdns-auth/bin/zone2json PDNSUTIL=/opt/pdns-auth/bin/pdnsutil PDNSCONTROL=/opt/pdns-auth/bin/pdns_control PDNSSERVER=/opt/pdns-auth/sbin/pdns_server SDIG=/opt/pdns-auth/bin/sdig GMYSQLHOST=127.0.0.1 GMYSQL2HOST=127.0.0.1 MYSQL_HOST="127.0.0.1" PGHOST="127.0.0.1" PGPORT="5432" ./start-test-stop 5300 {variant}')
+
+ if backend == 'gsqlite3':
+ with c.cd('regression-tests.nobackend'):
+ c.run(f'PDNS=/opt/pdns-auth/sbin/pdns_server PDNS2=/opt/pdns-auth/sbin/pdns_server SDIG=/opt/pdns-auth/bin/sdig NOTIFY=/opt/pdns-auth/bin/pdns_notify NSEC3DIG=/opt/pdns-auth/bin/nsec3dig SAXFR=/opt/pdns-auth/bin/saxfr ZONE2SQL=/opt/pdns-auth/bin/zone2sql ZONE2LDAP=/opt/pdns-auth/bin/zone2ldap ZONE2JSON=/opt/pdns-auth/bin/zone2json PDNSUTIL=/opt/pdns-auth/bin/pdnsutil PDNSCONTROL=/opt/pdns-auth/bin/pdns_control PDNSSERVER=/opt/pdns-auth/sbin/pdns_server SDIG=/opt/pdns-auth/bin/sdig GMYSQLHOST=127.0.0.1 GMYSQL2HOST=127.0.0.1 MYSQL_HOST="127.0.0.1" PGHOST="127.0.0.1" PGPORT="5432" ./runtests')
+ c.run('/opt/pdns-auth/bin/pdnsutil test-algorithms')
+ return
@task
def test_ixfrdist(c):