diff options
author | Paul Moore <paul@paul-moore.com> | 2021-08-02 23:44:58 -0400 |
---|---|---|
committer | Paul Moore <paul@paul-moore.com> | 2021-08-12 12:30:20 -0400 |
commit | a415ef0938c2fc8139d45f89a722d132367077cc (patch) | |
tree | 30de85238f403b17ba556a9504ec4968fb19af34 /Makefile.am | |
parent | 72609f73cd95749e27f50f2c5a52bacdbb1a3c5a (diff) | |
download | libseccomp-a415ef0938c2fc8139d45f89a722d132367077cc.tar.gz |
build: reorganize the code coverage targets
This is arguably the way it should have been done in the beginning
but TravisCI and Coveralls masked the need for proper standalone
code coverage tests.
With this change simply enabling code coverage during ./configure
and following with a code coverage build should generate proper
gcov/lcov data and a local HTML report, example:
% ./configure --enable-code-coverage
% make check-code-coverage
Acked-by: Tom Hromatka <tom.hromatka@oracle.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
Diffstat (limited to 'Makefile.am')
-rw-r--r-- | Makefile.am | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/Makefile.am b/Makefile.am index 650dfae..b7d491f 100644 --- a/Makefile.am +++ b/Makefile.am @@ -16,6 +16,13 @@ # along with this library; if not, see <http://www.gnu.org/licenses>. # +@CODE_COVERAGE_RULES@ + +CODE_COVERAGE_IGNORE_PATTERN = \ + /usr/include/bits/* \ + */src/arch-syscall-check.c \ + */src/syscalls.perf + ACLOCAL_AMFLAGS = -I m4 SUBDIRS = include src tools tests doc @@ -43,16 +50,8 @@ check-syntax: @./tools/check-syntax if CODE_COVERAGE_ENABLED -check-code-coverage: check-build - ${MAKE} ${AM_MAKEFLAGS} -C tests check-code-coverage -endif - -if CODE_COVERAGE_ENABLED -test-code-coverage: check-build - ${MAKE} ${AM_MAKEFLAGS} -C src check-code-coverage - LIBSECCOMP_TSTCFG_TYPE=basic \ - ${MAKE} ${AM_MAKEFLAGS} check-code-coverage - LIBSECCOMP_TSTCFG_TYPE=bpf-sim \ +test-code-coverage: + LIBSECCOMP_TSTCFG_TYPE=basic,bpf-sim \ ${MAKE} ${AM_MAKEFLAGS} check-code-coverage endif |