summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Moore <paul@paul-moore.com>2017-02-24 01:57:57 -0500
committerPaul Moore <paul@paul-moore.com>2017-02-24 13:42:53 -0500
commitcde6b3783e563c350059460c8d2e3504e35293f1 (patch)
tree7727290acc793915dea39246463a8a6864421718
parentfa2f2583dc46f7b330833d9ea18623d839db7114 (diff)
downloadlibseccomp-cde6b3783e563c350059460c8d2e3504e35293f1.tar.gz
tests: add the syscall consistency check to the code coverage tests
Signed-off-by: Paul Moore <paul@paul-moore.com>
-rw-r--r--.travis.yml4
-rw-r--r--src/Makefile.am6
-rw-r--r--tests/Makefile.am2
3 files changed, 11 insertions, 1 deletions
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 <http://www.gnu.org/licenses>.
#
+@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