Commit 93a1d59f authored by Victor Poughon's avatar Victor Poughon

Proof of concept factorization of Config

parent fc246122
# Client maintainer: manuel.grizonnet@cnes.fr
set(dashboard_model Nightly)
set(CTEST_DASHBOARD_ROOT "/home/otbtesting/")
SET (CTEST_SITE "pc-christophe.cst.cnes.fr")
set(dashboard_model Experimental)
set(CTEST_BUILD_CONFIGURATION Release)
set(CTEST_BUILD_NAME "Fedora22-64bits-${CTEST_BUILD_CONFIGURATION}")
set(CTEST_CMAKE_GENERATOR "Unix Makefiles")
set(CTEST_BUILD_COMMAND "/usr/bin/make -j4 -k install" )
set(CTEST_TEST_ARGS PARALLEL_LEVEL 4)
set(CTEST_TEST_TIMEOUT 1500)
set(CTEST_BUILD_NAME "experimental-factor_config-${CTEST_BUILD_CONFIGURATION}")
set(dashboard_root_name "tests")
set(dashboard_source_name "sources/orfeo/trunk/OTB-Nightly")
set(dashboard_binary_name "build/orfeo/trunk/OTB-Nightly/${CTEST_BUILD_CONFIGURATION}")
#set(dashboard_fresh_source_checkout TRUE)
set(dashboard_git_url "http://git@git.orfeo-toolbox.org/git/otb.git")
#set(ENV{DISPLAY} ":0.0")
......@@ -21,7 +13,7 @@ set(INSTALLROOT "${CTEST_DASHBOARD_ROOT}install")
set (OTB_INSTALL_PREFIX "${INSTALLROOT}/orfeo/trunk/OTB-Nightly/${CTEST_BUILD_CONFIGURATION}")
execute_process(COMMAND ${CMAKE_COMMAND} -E remove_directory "${OTB_INSTALL_PREFIX}")
macro(dashboard_hook_init)
macro(dashboard_hook_init_build)
# NOTE: -Wno-deprecated-declarations is in CXX flags to hide 'itkLegacyMacro' related warning
# under gcc 5.1.1, to work around GCC bug 65974.
......@@ -73,4 +65,3 @@ OTB_USE_SIFTFAST=ON
")
endmacro()
include(${CTEST_SCRIPT_DIRECTORY}/../otb_common.cmake)
macro(dashboard_hook_init_site)
# Testing for now
set(CTEST_DASHBOARD_TRACK Experimental)
# Machine configuration
set(CTEST_SITE "pc-christophe.cst.cnes.fr")
set(CTEST_DASHBOARD_ROOT "/home/otbtesting/")
# Build configuration
set(CTEST_BUILD_COMMAND "/usr/bin/make -j4 -k install" )
set(CTEST_CMAKE_GENERATOR "Unix Makefiles")
# Test configuration
set(CTEST_TEST_ARGS PARALLEL_LEVEL 4)
set(CTEST_TEST_TIMEOUT 1500)
endmacro()
......@@ -68,6 +68,26 @@
# set(ENV{LD_LIBRARY_PATH} /path/to/vendor/lib) # (if necessary)
cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
# Include test site configuration
if(DEFINED CTEST_OTB_SITE_CONFIG)
include(${CTEST_OTB_SITE_CONFIG})
if(COMMAND dashboard_hook_init_site)
dashboard_hook_init_site()
endif()
endif()
# Include build configuration
if(DEFINED CTEST_OTB_BUILD_CONFIG)
include(${CTEST_OTB_BUILD_CONFIG})
if(COMMAND dashboard_hook_init_build)
dashboard_hook_init_build()
else()
message(FATAL_ERROR "build configuration must define dashboard_hook_init_site()")
endif()
else()
message(FATAL_ERROR "CTEST_OTB_BUILD_CONFIG is required.")
endif()
set(dashboard_user_home "$ENV{HOME}")
get_filename_component(dashboard_self_dir ${CMAKE_CURRENT_LIST_FILE} PATH)
......@@ -160,7 +180,7 @@ if(NOT DEFINED CTEST_GIT_COMMAND)
endif()
if(NOT DEFINED CTEST_GIT_UPDATE_CUSTOM)
set(CTEST_GIT_UPDATE_CUSTOM ${CMAKE_COMMAND} -D GIT_COMMAND:PATH=${CTEST_GIT_COMMAND} -D TESTED_BRANCH:STRING=${dashboard_git_branch} -P ${CTEST_SCRIPT_DIRECTORY}/../git_updater.cmake)
set(CTEST_GIT_UPDATE_CUSTOM ${CMAKE_COMMAND} -D GIT_COMMAND:PATH=${CTEST_GIT_COMMAND} -D TESTED_BRANCH:STRING=${dashboard_git_branch} -P ${CTEST_SCRIPT_DIRECTORY}/git_updater.cmake)
endif()
# Select a source directory name.
......@@ -384,10 +404,6 @@ macro(run_dashboard)
endif()
endmacro()
if(COMMAND dashboard_hook_init)
dashboard_hook_init()
endif()
set(dashboard_done 0)
while(NOT dashboard_done)
if(dashboard_loop)
......@@ -403,7 +419,7 @@ while(NOT dashboard_done)
set(ORIGINAL_CTEST_GIT_UPDATE_CUSTOM ${CTEST_GIT_UPDATE_CUSTOM})
foreach(branch ${additional_branches})
set(CTEST_BUILD_NAME ${ORIGINAL_CTEST_BUILD_NAME}-${branch})
set(CTEST_GIT_UPDATE_CUSTOM ${CMAKE_COMMAND} -D GIT_COMMAND:PATH=${CTEST_GIT_COMMAND} -D TESTED_BRANCH:STRING=${branch} -P ${CTEST_SCRIPT_DIRECTORY}/../git_updater.cmake)
set(CTEST_GIT_UPDATE_CUSTOM ${CMAKE_COMMAND} -D GIT_COMMAND:PATH=${CTEST_GIT_COMMAND} -D TESTED_BRANCH:STRING=${branch} -P ${CTEST_SCRIPT_DIRECTORY}/git_updater.cmake)
file(REMOVE_RECURSE ${CTEST_BINARY_DIRECTORY}/Testing/Temporary)
file(MAKE_DIRECTORY ${CTEST_BINARY_DIRECTORY}/Testing/Temporary)
run_dashboard()
......
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