]> Creatis software - creaToolsTools.git/blob - ctest/README.txt
8d449f10b0c0d8da24db4441f7e3147a8b931165
[creaToolsTools.git] / ctest / README.txt
1 This folder provides ctest scripts to automatically build a creatool, 
2 test and submit results to creatis dashboard.
3
4 ----------------
5  INSTRUCTIONS
6 ----------------
7
8 * All ctest script files in this folder have the following format : 
9   PROJECT-OS.ctest (e.g. crea-linux.ctest for crea project on linux platforms)
10
11 * The default configuration is to build and run the tests in ${HOME}/dashboard
12   This location is stored by ctest in the var CTEST_DASHBOARD_ROOT 
13
14 * You have to :
15
16 1) Create a initial CMakeCache.txt corresponding to your machine config :
17  
18    a) Checkout the project to test
19    b) Configure the project manually with cmake (ccmake or CMakeSetup) setting your system/install specific options (libraries paths, options, build type, ...)
20    c) Copy the file CMakeCache.txt of the build tree to your testing directory (where you will run ctest, usually the same than CTEST_DASHBOARD_ROOT) giving it a proper name (PROJECT-BUILDTYPE-CMakeCache.txt, e.g. crea-debug-CMakeCache.txt)
21    d) Edit the copied file and comment out (type an initial #) all lines which make explicit reference to the build directory (the directory where you configured with cmake, use the 'find' tool of your editor). Typically for crea, I commented out the following lines :
22  #//Value Computed by CMake
23  #crea_BINARY_DIR:STATIC=/home/guigues/coding/Build/crea
24  #//Value Computed by CMake
25  #crea_SOURCE_DIR:STATIC=/home/guigues/coding/CreaTools/crea
26  #//This is the directory where this CMakeCahe.txt was created
27  #CMAKE_CACHEFILE_DIR:INTERNAL=/home/guigues/coding/Build/crea
28  #//Start directory with the top level CMakeLists.txt file for this
29  #// project
30  #CMAKE_HOME_DIRECTORY:INTERNAL=/home/guigues/coding/CreaTools/crea
31
32    
33 2) Copy the right ctest file to another filename, 
34    e.g. copy crea-linux to crea-mymachine-debug.ctest
35    Typically put it in CTEST_DASHBOARD_ROOT
36
37 3) Edit the new file and set :
38    * The architecture description, typically os+compiler with versions
39       e.g. fc9-gcc4.3.0, win32-vs8, etc.
40    * The build type, e.g. debug, release...
41    * The name of the CMakeCache.txt file to use as initial cache file (see 3) below)
42    * You can also customize the CTEST_DASHBOARD_ROOT folder 
43
44 4) Run ctest with the script, typically :
45 > ctest -S crea-linux-mymachine-debug.ctest -V
46
47
48 * To schedule automatic build, see :
49   http://www.vtk.org/Wiki/CMake_Scripting_Of_CTest