mirror of
https://gitlab.com/apparmor/apparmor.git
synced 2025-03-04 08:24:42 +01:00
Generate and keep html in utils coverage-regression
We sometimes have random coverage changes that are not reproducible and therefore hard to debug. Generate html coverage as part of make coverage-regression, and keep the resulting utils/test/htmlcov/ as artifact to make debugging easier. coverage-html needs JS files from various libjs-* packages, install them in before_script
This commit is contained in:
parent
12957eba4d
commit
8d9e2489a2
2 changed files with 5 additions and 1 deletions
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
image: ubuntu:latest
|
||||
before_script:
|
||||
- export DEBIAN_FRONTEND=noninteractive && apt-get update -qq && apt-get install --no-install-recommends -y build-essential apache2-dev autoconf automake bison dejagnu flex libpam-dev libtool perl liblocale-gettext-perl pkg-config python-all-dev python3-all-dev pyflakes3 ruby-dev swig lsb-release python3-coverage python3-notify2 python3-psutil zlib1g-dev
|
||||
- export DEBIAN_FRONTEND=noninteractive && apt-get update -qq && apt-get install --no-install-recommends -y build-essential apache2-dev autoconf automake bison dejagnu flex libjs-jquery libjs-jquery-throttle-debounce libjs-jquery-isonscreen libjs-jquery-tablesorter libpam-dev libtool perl liblocale-gettext-perl pkg-config python-all-dev python3-all-dev pyflakes3 ruby-dev swig lsb-release python3-coverage python3-notify2 python3-psutil zlib1g-dev
|
||||
- lsb_release -a
|
||||
- uname -a
|
||||
|
||||
|
@ -46,6 +46,9 @@ test-all:
|
|||
- make -C changehat/mod_apparmor check
|
||||
- make -C profiles check-parser
|
||||
- make -C profiles check-abstractions.d
|
||||
artifacts:
|
||||
paths:
|
||||
- utils/test/htmlcov/
|
||||
|
||||
# Disabled due to aa-logprof dependency on /sbin/apparmor_parser existing
|
||||
# - make -C profiles check-profiles
|
||||
|
|
|
@ -96,6 +96,7 @@ coverage-report: .coverage
|
|||
|
||||
coverage-regression: .coverage
|
||||
$(PYTHON) -m coverage report --omit="$(COVERAGE_OMIT)" > coverage-report.txt
|
||||
$(PYTHON) -m coverage html --omit="$(COVERAGE_OMIT)" $(HTML_COVR_ARGS)
|
||||
cat coverage-report.txt
|
||||
@echo 'Checking for coverage changes...'
|
||||
@if grep -vE ' 100%$$|TOTAL|$(INCOMPLETE_COVERAGE)' coverage-report.txt |grep '%$$' ; then echo "ERROR: Coverage regression - the files listed above are expected to have 100% test coverage"; exit 1; fi
|
||||
|
|
Loading…
Add table
Reference in a new issue