stage: test
script:
- PREFIX=$(pwd)/.local make -k check
- - make coverage-c COVERAGE_STAGE=gcov-check
+ - PREFIX=$(pwd)/.local make coverage-c COVERAGE_STAGE=gcov-check
dependencies:
- build:linux:amd64
artifacts:
stage: test
script:
- PREFIX=$(pwd)/.local make -k installcheck
- - make coverage-c coverage-lua COVERAGE_STAGE=gcov-installcheck
+ - PREFIX=$(pwd)/.local make coverage-c coverage-lua COVERAGE_STAGE=gcov-installcheck
dependencies:
- build:linux:amd64
artifacts:
stage: test
script:
- PREFIX=$(pwd)/.local MAKEFLAGS="--jobs $(nproc) --keep-going" make check-integration
- - make coverage-c coverage-lua COVERAGE_STAGE=gcov-deckard
+ - PREFIX=$(pwd)/.local make coverage-c coverage-lua COVERAGE_STAGE=gcov-deckard
dependencies:
- build:linux:amd64
artifacts:
- cat results/respdiff.txt
- echo 'test if mismatch rate >= 1 %'
- grep -q '^target diagrees.*0\.[0-9][0-9] %' results/respdiff.txt
+ - killall --wait kresd
+ - PREFIX=$(pwd)/.local make coverage-c coverage-lua COVERAGE_STAGE=gcov-respdiff-iter-udp
dependencies:
- build:linux:amd64
artifacts:
expire_in: '1 week'
paths:
- results/*.txt
+ - ./*.info
tags:
- docker
- linux
- cat results/respdiff.txt
- echo 'test if mismatch rate >= 1 %'
- grep -q '^target diagrees.*0\.[0-9][0-9] %' results/respdiff.txt
+ - killall --wait kresd
+ - PREFIX=$(pwd)/.local make coverage-c coverage-lua COVERAGE_STAGE=gcov-respdiff-iter-tcp
dependencies:
- build:linux:amd64
artifacts:
expire_in: '1 week'
paths:
- results/*.txt
+ - ./*.info
tags:
- docker
- linux
- cat results/respdiff.txt
- echo 'test if mismatch rate >= 1 %'
- grep -q '^target diagrees.*0\.[0-9][0-9] %' results/respdiff.txt
+ - killall --wait kresd
+ - PREFIX=$(pwd)/.local make coverage-c coverage-lua COVERAGE_STAGE=gcov-respdiff-iter-tls
dependencies:
- build:linux:amd64
artifacts:
expire_in: '1 week'
paths:
- results/*.txt
+ - ./*.info
tags:
- docker
- linux
- amd64
-coverage:linux:amd64:
+pages:
stage: deploy
script:
- - make coverage
+ - PREFIX=$(pwd)/.local make coverage
+ - mv coverage/ public/
coverage: '/lines\.+:\s(\d+.\d+\%)/'
dependencies:
+ - build:linux:amd64
- test:linux:amd64
- installcheck:linux:amd64
- deckard:linux:amd64
+ - respdiff:iter:udp:linux:amd64
+ - respdiff:iter:tcp:linux:amd64
+ - respdiff:iter:tls:linux:amd64
+ artifacts:
+ expire_in: 30 days
+ paths:
+ - public
tags:
- docker
- linux
luacheck --codes --formatter TAP .
coverage-c:
@echo "# C coverage in $(COVERAGE_STAGE).c.info"
- @$(LCOV) --no-external --capture --directory . --output-file $(COVERAGE_STAGE).c.info > /dev/null
+ @$(LCOV) --no-external --capture -d lib -d daemon -d modules -o $(COVERAGE_STAGE).c.info > /dev/null
coverage-lua: $(wildcard */*/luacov.stats.out)
@echo "# Lua coverage in $(COVERAGE_STAGE).lua.info"
@if [ ! -z "$^" ]; then ./scripts/luacov_to_info.lua $^ > $(COVERAGE_STAGE).lua.info; fi
coverage:
@$(LCOV) $(addprefix --add-tracefile ,$(wildcard $(COVERAGE_STAGE)*.info)) --output-file coverage.info
+ @$(GENHTML) -q --ignore-errors source -o coverage -p $(realpath $(CURDIR)) -t "Knot DNS Resolver $(VERSION)-$(PLATFORM) coverage report" --legend coverage.info
-.PHONY: all install check clean doc info
+.PHONY: all install check clean doc info coverage
# Options
ifdef COVERAGE