diff options
Diffstat (limited to '')
-rw-r--r-- | tests/deckard/.gitlab-ci.yml | 116 |
1 files changed, 116 insertions, 0 deletions
diff --git a/tests/deckard/.gitlab-ci.yml b/tests/deckard/.gitlab-ci.yml new file mode 100644 index 0000000..b1ec808 --- /dev/null +++ b/tests/deckard/.gitlab-ci.yml @@ -0,0 +1,116 @@ +image: $CI_REGISTRY/knot/knot-resolver/ci/debian-stable:knot-2.7 +variables: + LC_ALL: C.UTF-8 + +stages: + - test + +.test: &test + stage: test + tags: + - docker + - linux + - amd64 + +test:augeas: + <<: *test + script: + - augparse pydnstest/deckard.aug + +test:flake8: + <<: *test + script: + - python3 -m flake8 --max-line-length=100 . && echo "OK, no flake8 errors detected" + +test:mypy: + <<: *test + script: + - ci/mypy-run.sh && echo "OK, no mypy error detected" + +test:pylint: + <<: *test + script: + - ci/pylint-run.sh + +test:rplint: + <<: *test + script: + - cp ci/common.sh /tmp + - cp ci/compare-rplint.sh /tmp + - /tmp/compare-rplint.sh + +test:unittests: + <<: *test + script: + - make check + +# changes in Deckard itself must not change result of tests +test:comparative:kresd: + <<: *test + script: + # test kresd binary + - git clone --depth=1 https://gitlab.labs.nic.cz/knot/knot-resolver.git /tmp/kresd-local-build + - GIT_DIR=/tmp/kresd-local-build/.git git log -1 + - ( cd /tmp/kresd-local-build ; git submodule update --init --recursive ) + - PREFIX=/tmp/.local make -C /tmp/kresd-local-build -k all + - PREFIX=/tmp/.local make -C /tmp/kresd-local-build install + # compare results from latest Deckard with results from merge base + - cp ci/common.sh /tmp + - cp ci/compare-tests.sh /tmp + - cp ci/junit-compare.py /tmp + - LD_LIBRARY_PATH=/tmp/.local/lib PATH=/tmp/.local/sbin:$PATH /tmp/compare-tests.sh $(pwd)/kresd_run.sh + artifacts: + when: always + expire_in: '1 hour' + paths: + - modified_tests + - base.xml + - head.xml + +# Run all tests on the latest kresd version to ensure that we not push tests +# which do not work on latest kresd. It would lead to breakage in kresd CI. +test:latest:kresd: + <<: *test + script: + - git clone --depth=1 https://gitlab.labs.nic.cz/knot/knot-resolver.git kresd-local-build + - GIT_DIR=$(pwd)/kresd-local-build/.git git log -1 + - ( cd kresd-local-build ; git submodule update --init --recursive ) + - PREFIX=$(pwd)/.local make -C kresd-local-build -k all + - PREFIX=$(pwd)/.local make -C kresd-local-build install + - TMPDIR=$(pwd) LD_LIBRARY_PATH=$(pwd)/.local/lib PATH=$(pwd)/.local/sbin:$PATH ./kresd_run.sh -n $(nproc) + artifacts: + when: on_failure + expire_in: 1 week + paths: + - tmpdeckard* + +# sanity check that Unbound under Deckard still works +# I've selected the only tests which are working +# on kresd and Unbound 1.5.8 as well as 1.6.0 +test:sanity:unbound: + <<: *test + script: + - TMPDIR=$(pwd) ./unbound_run.sh -k sets/resolver/iter_hint_lame.rpl + - TMPDIR=$(pwd) ./unbound_run.sh -k sets/resolver/iter_lame_root.rpl + # these do not work with Unbound 1.5.8 which is in CI container + #- TESTS=sets/resolver/nsec_wildcard_answer_response.rpl ./unbound_run.sh + #- TESTS=sets/resolver/world_cz_lidovky_www.rpl ./unbound_run.sh + artifacts: + when: on_failure + expire_in: 1 week + paths: + - tmpdeckard* + +# sanity check that PowerDNS recursor under Deckard still works +# I've selected couple tests which are working +# on kresd and PowerDNS recursor 4.0.0~alpha2 as well as 4.0.4 +test:sanity:pdnsrecursor: + <<: *test + script: + - TMPDIR=$(pwd) ./pdns_run.sh -k sets/resolver/iter_recurse.rpl + - TMPDIR=$(pwd) ./pdns_run.sh -k sets/resolver/iter_tcbit.rpl + artifacts: + when: on_failure + expire_in: 1 week + paths: + - tmpdeckard* |