]> granicus.if.org Git - graphviz/commitdiff
Execute CMake test on Travis
authorErwin Janssen <erwinjanssen@outlook.com>
Fri, 24 Mar 2017 09:50:04 +0000 (10:50 +0100)
committerErwin Janssen <erwinjanssen@outlook.com>
Thu, 6 Apr 2017 19:38:03 +0000 (21:38 +0200)
Verify the build on Travis by executing the tests added by CMake.

.travis.yml
ci/cmake-build_and_test.sh

index ad4c5ddc6ca7219b2e479db2a35f619926aee061..ba9bb1827fe6bd6c61a8e126df04844dcff5825c 100644 (file)
@@ -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
index ca938c9d9c7b4d4e3b758fb0d525711475fba676..1f8efd0cdeb9abb1d6eded4436e32ffcd7c77340 100755 (executable)
@@ -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