From: Paul Moore <[email protected]>

Signed-off-by: Paul Moore <[email protected]>
---
 .travis.yml |    7 ++-----
 Makefile.am |   11 +++++++++++
 2 files changed, 13 insertions(+), 5 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index e1bd540e..6b84bd65 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -61,11 +61,8 @@ script:
   - LIBSECCOMP_TSTCFG_TYPE=live make -C tests check
   # ubuntu 14.04 (trusty) clang has problems with the cython generated code
   - 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
+  # limit the code coverage tests to the 'test-code-coverage' target
+  - make clean && ./configure --enable-code-coverage && make test-code-coverage
 
 after_success:
   # https://github.com/eddyxu/cpp-coveralls/blob/master/README.md
diff --git a/Makefile.am b/Makefile.am
index 29ee2ec1..48078e0b 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -37,8 +37,19 @@ check-build: all
 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 \
+               ${MAKE} ${AM_MAKEFLAGS} check-code-coverage
+endif
 
 if COVERITY
 coverity-build: clean

-- 
You received this message because you are subscribed to the Google Groups 
"libseccomp" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to