Add tests for cmake builds and use on travis.

This commit is contained in:
Roger A. Light 2016-03-12 20:29:32 +00:00
parent 7f9db87f30
commit 62fa209eeb
2 changed files with 22 additions and 7 deletions

View File

@ -1,13 +1,23 @@
language: c language: c
compiler: compiler:
- gcc - gcc
- clang - clang
os: os:
- linux - linux
- osx - osx
script: make ; make test
matrix:
allow_failures:
- os: osx
script:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then make ; make test ; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then cmake . ; make ; make test ; fi
before_install: before_install:
- sudo apt-get update -qq - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get update -qq ; fi
- sudo apt-get install -y debhelper libc-ares-dev libssl-dev libwrap0-dev python-all python3-all uthash-dev uuid-dev libuuid1 xsltproc docbook-xsl - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get install -y debhelper libc-ares-dev libssl-dev libwrap0-dev python-all python3-all uthash-dev uuid-dev libuuid1 xsltproc docbook-xsl ; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update ; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install c-ares openssl libwebsockets ; fi

View File

@ -93,3 +93,8 @@ add_subdirectory(man)
# ======================================== # ========================================
install(FILES mosquitto.conf aclfile.example pskfile.example pwfile.example DESTINATION ${SYSCONFDIR}) install(FILES mosquitto.conf aclfile.example pskfile.example pwfile.example DESTINATION ${SYSCONFDIR})
# ========================================
# Testing
# ========================================
add_custom_target(Tests COMMAND make -C test test)