Skip to content

Commit

Permalink
travis-ci: add cppcheck target to travis
Browse files Browse the repository at this point in the history
  • Loading branch information
grondo committed Jun 16, 2016
1 parent 2b70ad8 commit f6c08e7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ compiler:
- clang
- gcc+coverage
- gcc+install
- gcc+cppcheck

cache:
directories:
Expand Down Expand Up @@ -46,6 +47,8 @@ before_install:
- case "$CC" in *+coverage) CC=${CC//+*}; export COVERAGE=t;; esac
# Check if we should test installed flux:
- case "$CC" in *+install) CC=${CC//+*}; export T_INSTALL=t;; esac
# Check if we are only running cppcheck
- case "$CC" in *+cppcheck) CC=${CC//+*}; export CPPCHECK=t;; esac

- test "$TRAVIS_PULL_REQUEST" == "false" || export CCACHE_READONLY=1
- if test "$CC" = "clang"; then export CCACHE_CPP2=1; fi
Expand Down Expand Up @@ -80,6 +83,8 @@ script:
- if test "$COVERAGE" = "t" ; then ARGS="--enable-code-coverage"; MAKECMDS="make && make check-code-coverage && lcov -l flux*-coverage.info"; fi
# Use make install for T_INSTALL:
- if test "$T_INSTALL" = "t" ; then ARGS="--prefix=/tmp/flux"; MAKECMDS="make && make install && /tmp/flux/bin/flux keygen && FLUX_TEST_INSTALLED_PATH=/tmp/flux/bin make check"; fi
# Use src/test/cppcheck.sh instead of make?:
- if test "$CPPCHECK" = "t" ; then MAKECMDS="sh -x src/test/cppcheck.sh"; fi

- export FLUX_TESTS_LOGFILE=t
- if test "$COVERITY_SCAN_BRANCH" != "1" ; then ./autogen.sh && ./configure ${ARGS} && eval ${MAKECMDS}; fi
Expand Down

0 comments on commit f6c08e7

Please sign in to comment.