From: Erwin Janssen Date: Fri, 24 Mar 2017 09:50:04 +0000 (+0100) Subject: Execute CMake test on Travis X-Git-Tag: 2.42.0~183^2~11 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b5061dec7aa2f4b1300082559bf777d4e21789e5;p=graphviz Execute CMake test on Travis Verify the build on Travis by executing the tests added by CMake. --- diff --git a/.travis.yml b/.travis.yml index ad4c5ddc6..ba9bb1827 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,17 +16,21 @@ services: - docker env: -- DOCKER_BUILD=FALSE - BUILD_SYSTEM=autotools + global: + - CTEST_OUTPUT_ON_FAILURE=TRUE -- DOCKER_BUILD=FALSE - BUILD_SYSTEM=cmake + matrix: + - DOCKER_BUILD=FALSE + BUILD_SYSTEM=autotools -- DOCKER_BUILD=TRUE - BUILD_SYSTEM=autotools + - DOCKER_BUILD=FALSE + BUILD_SYSTEM=cmake -- DOCKER_BUILD=TRUE - BUILD_SYSTEM=cmake + - DOCKER_BUILD=TRUE + BUILD_SYSTEM=autotools + + - DOCKER_BUILD=TRUE + BUILD_SYSTEM=cmake install: @@ -42,7 +46,7 @@ install: - sudo ldconfig - cd ${TRAVIS_BUILD_DIR} - if [ ${DOCKER_BUILD} == "TRUE" ] ; then docker build -t centos7-build-env ci/centos7/ ; fi - + script: - cd ${TRAVIS_BUILD_DIR} - if [ ${DOCKER_BUILD} == "FALSE" ] ; then sudo ./ci/${BUILD_SYSTEM}-build_and_test.sh ; fi diff --git a/ci/cmake-build_and_test.sh b/ci/cmake-build_and_test.sh index ca938c9d9..1f8efd0cd 100755 --- a/ci/cmake-build_and_test.sh +++ b/ci/cmake-build_and_test.sh @@ -1,6 +1,6 @@ #!/bin/sh -# Run this script from the root source directory +# Run this script from the root source directory mkdir build || true @@ -33,3 +33,17 @@ else echo "Error: 'make install' failed." >&2 exit 1 fi + +if dot -c ; then + echo "'dot -c' succesfull." +else + echo "Error: 'dot -c' failed." >&2 + exit 1 +fi + +if ctest ; then + echo "'ctest' succesfull." +else + echo "Error: 'ctest' failed." >&2 + exit 1 +fi