From cde6b3783e563c350059460c8d2e3504e35293f1 Mon Sep 17 00:00:00 2001 From: Paul Moore Date: Fri, 24 Feb 2017 01:57:57 -0500 Subject: tests: add the syscall consistency check to the code coverage tests Signed-off-by: Paul Moore --- .travis.yml | 4 +++- src/Makefile.am | 6 ++++++ tests/Makefile.am | 2 ++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index c45754f..e1bd540 100644 --- a/.travis.yml +++ b/.travis.yml @@ -63,9 +63,11 @@ script: - make clean && ./configure && scan-build --status-bugs make # limit the code coverage tests to the native/c code - make clean && ./configure --enable-code-coverage && + make -C src check-code-coverage && LIBSECCOMP_TSTCFG_TYPE=basic make check-code-coverage && LIBSECCOMP_TSTCFG_TYPE=bpf-sim make check-code-coverage after_success: # https://github.com/eddyxu/cpp-coveralls/blob/master/README.md - - coveralls --gcov-options '\-lp' --exclude tests --exclude tools + - coveralls --gcov-options '\-lp' + --exclude tests --exclude tools --exclude src/arch-syscall-check.c diff --git a/src/Makefile.am b/src/Makefile.am index 09d454e..2e7e38d 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -16,6 +16,10 @@ # along with this library; if not, see . # +@CODE_COVERAGE_RULES@ + +CODE_COVERAGE_IGNORE_PATTERN = /usr/include/bits/* */arch-syscall-check.c + SUBDIRS = . if ENABLE_PYTHON SUBDIRS += python @@ -52,6 +56,8 @@ lib_LTLIBRARIES = libseccomp.la arch_syscall_dump_SOURCES = arch-syscall-dump.c ${SOURCES_ALL} arch_syscall_check_SOURCES = arch-syscall-check.c ${SOURCES_ALL} +arch_syscall_check_CFLAGS = ${CODE_COVERAGE_CFLAGS} +arch_syscall_check_LDFLAGS = ${CODE_COVERAGE_LDFLAGS} libseccomp_la_SOURCES = ${SOURCES_ALL} libseccomp_la_CPPFLAGS = ${AM_CPPFLAGS} ${CODE_COVERAGE_CPPFLAGS} \ diff --git a/tests/Makefile.am b/tests/Makefile.am index 99ece2b..3058590 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -18,6 +18,8 @@ @CODE_COVERAGE_RULES@ +CODE_COVERAGE_IGNORE_PATTERN = /usr/include/bits/* */arch-syscall-check.c + if CODE_COVERAGE_ENABLED DBG_STATIC = else -- cgit v1.2.1