Commit 44de62d9 authored by Tomas Krizek's avatar Tomas Krizek

gitlabci: fix respdiff.basic

parent 230e07ca
......@@ -12,6 +12,7 @@ variables:
LIBKRES_ABI: 9
LIBKRES_NAME: libkres
MESON_TEST: meson test -C build_ci* -t 2 --print-errorlogs
PREFIX: $CI_PROJECT_DIR/.local
image: $CI_REGISTRY/knot/knot-resolver/ci/debian-buster:knot-$KNOT_VERSION
......@@ -30,7 +31,7 @@ stages:
when: always
paths:
- .local
- 'build_ci*'
- build_ci*
tags:
- docker
- linux
......@@ -39,7 +40,7 @@ stages:
build:
<<: *build
script:
- meson build_ci --default-library=static --prefix=$CI_PROJECT_DIR/.local -Dwerror=true -Dpostinstall_tests=enabled
- meson build_ci --default-library=static --prefix=$PREFIX -Dwerror=true -Dpostinstall_tests=enabled
- ninja -C build_ci
- ninja -C build_ci install >/dev/null
- ${MESON_TEST} --suite unit --suite config
......@@ -47,7 +48,7 @@ build:
build-asan:
<<: *build
script:
- meson build_ci_asan --default-library=static --prefix=$CI_PROJECT_DIR/.local -Db_sanitize=address,undefined -Dpostinstall_tests=enabled
- meson build_ci_asan --default-library=static --prefix=$PREFIX -Db_sanitize=address,undefined -Dpostinstall_tests=enabled
- ninja -C build_ci_asan
- ninja -C build_ci_asan install >/dev/null
- ${MESON_TEST} --suite unit --suite config
......@@ -80,7 +81,7 @@ kres-gen:
tags:
- docker
script:
- meson build_ci --prefix=$CI_PROJECT_DIR/.local
- meson build_ci --prefix=$PREFIX
- ninja -C build_ci lib/libkres.so.${LIBKRES_ABI}
- ninja -C build_ci kres-gen
- git diff --quiet || (git diff; exit 1)
......@@ -262,21 +263,16 @@ pytests:lint:
- amd64
respdiff:basic:
stage: test
except:
- master
<<: *test
script:
- source <(./scripts/coverage_env.sh "$(pwd)" "$(pwd)/coverage.stats/respdiff" "iter/udp" --export)
- ulimit -n "$(ulimit -Hn)" # applies only for kresd ATM
- ./ci/respdiff/start-resolvers.sh
- ./ci/respdiff/run-respdiff-tests.sh udp
- cat results/respdiff.txt
- echo 'test if mismatch rate < 1.0 %'
- grep -q '^target disagrees.*0\.[0-9][0-9] %' results/respdiff.txt
after_script:
- killall --wait kresd
- MAKEFLAGS="--jobs $(nproc)" test "${COVERAGE:-0}" -eq 1 && make coverage-c coverage-lua COVERAGE_STAGE=gcov-respdiff-iter-udp | grep -vE '(source file is newer than notes file)|(the message is displayed only once per source file)' || echo "code coverage skipped"
dependencies:
- build # NOTE switch to asan if build passes
artifacts:
when: always
expire_in: '1 week'
......
......@@ -2,10 +2,9 @@
exec > /dev/null
exec 2>&1
PREFIX=$(pwd)/.local
killall -w kresd
rm -f '*.mdb'
LD_LIBRARY_PATH=$PREFIX/lib $PREFIX/sbin/kresd -f 1 -q -c $(pwd)/ci/respdiff/kresd.config &>>kresd.log &
$PREFIX/sbin/kresd -f 1 -q -c $(pwd)/ci/respdiff/kresd.config &>>kresd.log &
# wait until socket is receiving connections
sleep 1
......@@ -7,5 +7,5 @@ service bind9 start && service bind9 status;
# dig @localhost -p 53533
#run kresd
LD_LIBRARY_PATH=$PREFIX/lib $PREFIX/sbin/kresd -f 1 -q -c $(pwd)/ci/respdiff/kresd.config &>kresd.log &
$PREFIX/sbin/kresd -f 1 -q -c $(pwd)/ci/respdiff/kresd.config &>kresd.log &
# dig @localhost -p 5353
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment