Permalink
Browse files

COMP: Tweak dashboard script to allow checkout of given SVN branch an…

…d rev

Additionally, the script will now ensure that the project is checked out
in either Continuous, Experimental or Nightly sub directory.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@21501 3bd1e089-480b-0410-8dfb-8563597acbee
  • Loading branch information...
jcfr committed Dec 8, 2012
1 parent 74ec165 commit 9ce0b3de7dbb61c0a1ff493f96e960523f63b48c
Showing with 41 additions and 21 deletions.
  1. +17 −1 CMake/SlicerDashboardDriverScript.cmake
  2. +24 −20 CMake/SlicerDashboardScript.TEMPLATE.cmake
@@ -67,13 +67,26 @@ if(WITH_PACKAGES)
endif()
if(NOT DEFINED GIT_REPOSITORY)
- set(repository http://svn.slicer.org/Slicer4/trunk)
+ if(NOT DEFINED SVN_BRANCH)
+ set(SVN_BRANCH "trunk")
+ endif()
+ set(repository http://svn.slicer.org/Slicer4/${SVN_BRANCH})
+ set(svn_checkout_option "")
+ if(NOT "${SVN_REVISION}" STREQUAL "")
+ set(repository "${repository}@${SVN_REVISION}")
+ set(run_ctest_with_update FALSE)
+ endif()
+ message("SVN_BRANCH .............: ${SVN_BRANCH}")
+ message("SVN_REVISION ...........: ${SVN_REVISION}")
+ message("SVN_REPOSITORY .........: ${repository}")
else()
set(repository ${GIT_REPOSITORY})
set(git_branch_option "")
if(NOT "${GIT_TAG}" STREQUAL "")
set(git_branch_option "-b ${GIT_TAG}")
endif()
+ message("GIT_REPOSITORY ......: ${GIT_REPOSITORY}")
+ message("GIT_TAG .............: ${GIT_TAG}")
endif()
# Should binary directory be cleaned?
@@ -82,6 +95,9 @@ set(empty_binary_directory FALSE)
# Attempt to build and test also if 'ctest_update' returned an error
set(force_build FALSE)
+# Ensure SCRIPT_MODE is lowercase
+string(TOLOWER ${SCRIPT_MODE} SCRIPT_MODE)
+
# Set model and track options
set(model "")
if(SCRIPT_MODE STREQUAL "experimental")
@@ -15,9 +15,27 @@
cmake_minimum_required(VERSION 2.8.4)
#
-# For additional information, see http://http://www.slicer.org/slicerWiki/index.php/Documentation/Snapshot/Developers/Tutorials/DashboardSetup
+# For additional information, see http://www.slicer.org/slicerWiki/index.php/Documentation/Nightly/Developers/Tutorials/DashboardSetup
#
+#-----------------------------------------------------------------------------
+# Experimental:
+# - run_ctest() macro will be called *ONE* time
+# - binary directory will *NOT* be cleaned
+# Continuous:
+# - run_ctest() macro will be called EVERY 5 minutes ...
+# - binary directory will *NOT* be cleaned
+# - configure/build will be executed *ONLY* if the repository has been updated
+# Nightly:
+# - run_ctest() macro will be called *ONE* time
+# - binary directory *WILL BE* cleaned
+set(SCRIPT_MODE "Nightly") # "Experimental", "Continuous", "Nightly"
+
+# You could invoke the script with the following syntax:
+# ctest -S karakoram_Slicer4_nightly.cmake -C <CTEST_BUILD_CONFIGURATION> -V
+#
+# Note that '-C <CTEST_BUILD_CONFIGURATION>' is mandatory on windows
+
#-----------------------------------------------------------------------------
# Dashboard properties
#-----------------------------------------------------------------------------
@@ -26,7 +44,10 @@ set(MY_COMPILER "g++4.4.3")
set(MY_QT_VERSION "4.7.4")
set(QT_QMAKE_EXECUTABLE "$ENV{HOME}/Dashboards/Support/QtSDK-1.2/Desktop/Qt/474/gcc/bin/qmake")
set(CTEST_SITE "karakoram.kitware") # for example: mymachine.kitware, mymachine.bwh.harvard.edu, ...
-set(CTEST_DASHBOARD_ROOT "$ENV{HOME}/Dashboards/")
+set(CTEST_DASHBOARD_ROOT "$ENV{HOME}/Dashboards/${SCRIPT_MODE}")
+
+set(SVN_BRANCH "trunk")
+set(SVN_REVISION "")
# Each dashboard script should specify a unique ID per CTEST_DASHBOARD_ROOT.
# It means the following directories will be created:
@@ -54,23 +75,6 @@ set(CTEST_TEST_TIMEOUT 500)
set(CTEST_BUILD_FLAGS "") # Use multiple CPU cores to build. For example "-j4" on unix
set(CTEST_PARALLEL_LEVEL 8) # Number of tests running in parallel
-# experimental:
-# - run_ctest() macro will be called *ONE* time
-# - binary directory will *NOT* be cleaned
-# continuous:
-# - run_ctest() macro will be called EVERY 5 minutes ...
-# - binary directory will *NOT* be cleaned
-# - configure/build will be executed *ONLY* if the repository has been updated
-# nightly:
-# - run_ctest() macro will be called *ONE* time
-# - binary directory *WILL BE* cleaned
-set(SCRIPT_MODE "nightly") # "experimental", "continuous", "nightly"
-
-# You could invoke the script with the following syntax:
-# ctest -S karakoram_Slicer4_nightly.cmake -C <CTEST_BUILD_CONFIGURATION> -V
-#
-# Note that '-C <CTEST_BUILD_CONFIGURATION>' is mandatory on windows
-
#-----------------------------------------------------------------------------
# Additional CMakeCache options
#-----------------------------------------------------------------------------
@@ -168,7 +172,7 @@ endfunction()
#
# Download and include dashboard driver script
#
-set(url http://svn.slicer.org/Slicer4/trunk/CMake/SlicerDashboardDriverScript.cmake)
+set(url http://svn.slicer.org/Slicer4/${SVN_BRANCH}/CMake/SlicerDashboardDriverScript.cmake)
set(dest ${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}.driver)
download_file(${url} ${dest})
include(${dest})

0 comments on commit 9ce0b3d

Please sign in to comment.