Skip to content

Commit

Permalink
Return non-zero status from cmake script when build or test fails
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn committed Nov 21, 2014
1 parent cae6bae commit 6c24638
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions qgis-test-travis.ctest
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -30,7 +30,16 @@ ${CTEST_BINARY_DIRECTORY}/CMakeCache.txt
# Requires a track on the CDash server # Requires a track on the CDash server
#ctest_start(Experimental TRACK Travis) #ctest_start(Experimental TRACK Travis)
ctest_start(Experimental) ctest_start(Experimental)
ctest_build (BUILD "${CTEST_BINARY_DIRECTORY}") ctest_build (BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE BUILDRES)
ctest_test (BUILD "${CTEST_BINARY_DIRECTORY}" PARALLEL_LEVEL 2) 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 () ctest_submit ()


0 comments on commit 6c24638

Please sign in to comment.