diff --git a/.travis.yml b/.travis.yml index a83b837d83..a380d54d69 100644 --- a/.travis.yml +++ b/.travis.yml @@ -29,7 +29,6 @@ addons: - libnfnetlink-dev - libnfnetlink0 - libhiredis-dev - - libjansson-dev - libevent-dev - libevent-pthreads-2.0-5 # Now define the default set of packages which is those above, and @@ -166,8 +165,9 @@ matrix: - os: linux compiler: gcc env: - - NAME="linux,gcc,no-json" + - NAME="linux,gcc,no-jansson" - *default-cflags + - CONFIGURE_SHOULD_FAIL="yes" addons: apt: packages: @@ -182,14 +182,22 @@ matrix: - *default-cflags script: - - sh ./autogen.sh - | + sh ./autogen.sh + if [[ "${NO_UNITTESTS}" != "yes" ]]; then ARGS="${ARGS} --enable-unittests" fi + if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then export CFLAGS="${CFLAGS} ${EXTRA_CFLAGS}" - ./configure --enable-nfqueue --enable-hiredis ${ARGS} + if ! ./configure --enable-nfqueue --enable-hiredis ${ARGS}; then + if [[ "${CONFIGURE_SHOULD_FAIL}" = "yes" ]]; then + EXIT_CODE=0 + else + EXIT_CODE=1 + fi + fi elif [[ "$TRAVIS_OS_NAME" == "osx" ]]; then export CFLAGS="${CFLAGS} ${EXTRA_CFLAGS}" ./configure --enable-hiredis --enable-ipfw \ @@ -201,13 +209,17 @@ script: --with-libnspr-includes=/usr/local/opt/nspr/include/nspr \ --with-libnspr-libraries=/usr/local/opt/nspr/lib ${ARGS} fi - - | + + if [[ "${EXIT_CODE}" ]]; then + exit "${EXIT_CODE}" + fi + # Linux container builds have 2 cores, make use of them. if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then j="-j 2" fi make ${j} - - | + # Like "make check", but fail on first error. We redirect the output # so Travis doesn't fail the build with a too much output error. if [[ "${NO_UNITTESTS}" != "yes" ]]; then @@ -219,16 +231,17 @@ script: exit 1 fi fi + (cd qa/coccinelle && make check) - - | + if [[ "$DO_DISTCHECK" == "yes" ]]; then make distcheck DISTCHECK_CONFIGURE_FLAGS="${ARGS}" fi - - | + if [[ "$DO_CHECK_SETUP_SCRIPTS" == "yes" ]]; then (cd scripts && ./check-setup.sh) fi - - | + git clone https://github.com/OISF/suricata-verify.git verify python ./verify/run.py