Skip to content
Permalink
Browse files

Create short link to proper page on cdash

  • Loading branch information
m-kuhn committed Sep 21, 2015
1 parent 50d4e72 commit f3f5ea1ff4aaf0c5f14339d6f2fd2cb99b02c99d
Showing with 12 additions and 3 deletions.
  1. +12 −3 qgis-test-travis.ctest
@@ -51,23 +51,32 @@ ENDIF(NOT WIN32)
#ctest_start(Experimental TRACK Travis)
ctest_start(Experimental)
ctest_build (BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE BUILDRES NUMBER_WARNINGS NUMWARN NUMBER_ERRORS NUMERR)

# Create link to test results
# CDash on OTB requires the date to be set for the search to work and that's the timezone this requires
SET(ENV{TZ} "UTC-6")
EXECUTE_PROCESS(COMMAND date +%Y-%m-%d OUTPUT_VARIABLE CDASH_DATE)
SET(RESULT_LINK "http://dash.orfeo-toolbox.org/index.php?project=QGIS&filtercount=1&showfilters=1&field1=buildname/string&compare1=63&value1=$ENV{TRAVIS_COMMIT}&date=${CDASH_DATE}")
EXECUTE_PROCESS(COMMAND curl -s http://tinyurl.com/api-create.php?url=${RESULT_LINK}
OUTPUT_VARIABLE SHORTURL)

IF(NOT ${BUILDRES} EQUAL 0 OR NOT ${NUMERR} EQUAL 0)
ctest_submit (RETRY_COUNT 3 RETRY_DELAY 30)
MESSAGE("${Yellow}Test results submitted to${ColorReset}")
MESSAGE("${BoldYellow}http://dash.orfeo-toolbox.org/index.php?project=QGIS&filtercount=1&showfilters=1&field1=buildname/string&compare1=63&value1=$ENV{TRAVIS_COMMIT}${ColorReset}" )
MESSAGE("${BoldYellow}${SHORTURL}${ColorReset}")
MESSAGE( FATAL_ERROR "${Red}Build failed.${ColorReset}" )
ENDIF(NOT ${BUILDRES} EQUAL 0 OR NOT ${NUMERR} EQUAL 0)
IF(NOT ${NUMWARN} EQUAL 0)
ctest_submit (RETRY_COUNT 3 RETRY_DELAY 30)
MESSAGE("${Yellow}Test results submitted to${ColorReset}")
MESSAGE("${BoldYellow}http://dash.orfeo-toolbox.org/index.php?project=QGIS&filtercount=1&showfilters=1&field1=buildname/string&compare1=63&value1=$ENV{TRAVIS_COMMIT}${ColorReset}" )
MESSAGE("${BoldYellow}${SHORTURL}{ColorReset}" )
MESSAGE( FATAL_ERROR "${Red}Build warnings found, aborting test.${ColorReset}" )
ENDIF(NOT ${NUMWARN} EQUAL 0)
ctest_test (BUILD "${CTEST_BINARY_DIRECTORY}" PARALLEL_LEVEL 2 RETURN_VALUE TESTRES)
IF(NOT ${TESTRES} EQUAL 0)
ctest_submit (RETRY_COUNT 3 RETRY_DELAY 30)
MESSAGE("${Yellow}Test results submitted to${ColorReset}")
MESSAGE("${BoldYellow}http://dash.orfeo-toolbox.org/index.php?project=QGIS&filtercount=1&showfilters=1&field1=buildname/string&compare1=63&value1=$ENV{TRAVIS_COMMIT}${ColorReset}" )
MESSAGE("${BoldYellow}${SHORTURL}{ColorReset}" )
MESSAGE( FATAL_ERROR "Tests failed" )
ENDIF(NOT ${TESTRES} EQUAL 0)

0 comments on commit f3f5ea1

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