Commit 720d4f42 authored by Rashad Kanavath's avatar Rashad Kanavath

TRAVIS: check return from configure and build

parent 72f1b49c
......@@ -12,6 +12,7 @@ foreach(req
CMAKE_MAKE_PROGRAM
CTEST_CMAKE_GENERATOR
OTB_INSTALL_DIR
XDK_INSTALL_DIR
CTEST_COMMAND
)
if(NOT DEFINED ENV{${req}})
......@@ -52,7 +53,16 @@ OTB_USE_OPENGL:BOOL=ON
OTB_USE_GLEW:BOOL=ON
CMAKE_C_FLAGS:STRING=-Wextra
CMAKE_CXX_FLAGS:STRING=-Wextra -Wno-gnu-static-float-init -Wno-\\#warnings
CMAKE_BUILD_TYPE=Release"
CMAKE_BUILD_TYPE=${CTEST_BUILD_CONFIGURATION}
QT_INSTALL_TRANSLATIONS:PATH=${XDK_INSTALL_DIR}/translations
QT_MOC_EXECUTABLE:FILEPATH=${XDK_INSTALL_DIR}/bin/moc
QT_UIC_EXECUTABLE:FILEPATH=${XDK_INSTALL_DIR}/bin/uic
QT_RCC_EXECUTABLE:FILEPATH=${XDK_INSTALL_DIR}/bin/rcc
QT_INSTALL_PLUGINS:PATH=${XDK_INSTALL_DIR}/plugins
QT_INSTALL_HEADERS:PATH=${XDK_INSTALL_DIR}/include
QMAKE_MKSPECS:PATH=${XDK_INSTALL_DIR}/mkspecs
"
)
file(WRITE "${CTEST_BINARY_DIRECTORY}/CMakeCache.txt" ${INITIAL_CACHE})
......@@ -64,14 +74,22 @@ message(STATUS "Found ${_update_rv} changed files")
ctest_configure (BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE _configure_rv)
ctest_read_custom_files(${CTEST_BINARY_DIRECTORY})
if(NOT _configure_rv EQUAL 0)
do_submit()
endif()
ctest_build (BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE _build_rv)
execute_process(
COMMAND ${CTEST_COMMAND} "-R" "Tu" "."
if(NOT _build_rv EQUAL 0)
do_submit()
endif ()
execute_process(COMMAND ${CTEST_COMMAND} "-R" "Tu" "."
WORKING_DIRECTORY "${CTEST_BINARY_DIRECTORY}"
)
#ctest_test (BUILD "${CTEST_BINARY_DIRECTORY}" INCLUDE Tu RETURN_VALUE _test_rv)
# if(NOT _configure_rv EQUAL 0 OR NOT _build_rv EQUAL 0)
# endif ()
ctest_submit()
macro(do_submit)
ctest_submit()
return()
endmacro()
......@@ -71,5 +71,7 @@ wget https://www.orfeo-toolbox.org/packages/xdk/$XDK_VERSION/$XDK_FILE --no-chec
chmod +x /tmp/$XDK_FILE
/tmp/$XDK_FILE
XDK_INSTALL_DIR=/tmp/$XDK_FILE
export XDK_INSTALL_DIR
echo "Running ctest -VV -S TravisBuild.cmake"
$CTEST_COMMAND -VV -S $CTEST_DASHBOARD_ROOT/orfeotoolbox/OTB/Utilities/Maintenance/TravisBuild.cmake
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment