Skip to content
Permalink
Browse files

Return non-zero status from cmake script when build or test fails

  • Loading branch information
m-kuhn committed Nov 21, 2014
1 parent cae6bae commit 6c24638484bf7d6c094537db8146202dd2d06ebd
Showing with 11 additions and 2 deletions.
  1. +11 −2 qgis-test-travis.ctest
@@ -30,7 +30,16 @@ ${CTEST_BINARY_DIRECTORY}/CMakeCache.txt
# Requires a track on the CDash server
#ctest_start(Experimental TRACK Travis)
ctest_start(Experimental)
ctest_build (BUILD "${CTEST_BINARY_DIRECTORY}")
ctest_test (BUILD "${CTEST_BINARY_DIRECTORY}" PARALLEL_LEVEL 2)
ctest_build (BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE BUILDRES)
IF(NOT ${BUILDRES} EQUAL 0)
ctest_submit ()
MESSAGE( FATAL_ERROR "Build failed." )
ENDIF(NOT ${BUILDRES} EQUAL 0)
ctest_test (BUILD "${CTEST_BINARY_DIRECTORY}" PARALLEL_LEVEL 2 RETURN_VALUE TESTRES)
IF(NOT ${TESTRES} EQUAL 0)
ctest_submit ()
MESSAGE( FATAL_ERROR "Test failed." )
ENDIF(NOT ${TESTRES} EQUAL 0)

ctest_submit ()

0 comments on commit 6c24638

Please sign in to comment.
You can’t perform that action at this time.