-
Notifications
You must be signed in to change notification settings - Fork 77
CDash dashboards from Git
The cooldluid project uses ctest (distributed with cmake) to generate a web-based dashboard at http://coolfluidsrv.vki.ac.be/cdash/index.php?project=coolfluid
This page explains how to add your own dashboard to the website.
The simplest way to start a dashboard is by running a "ctest" command from inside your working build directory.
- Specify the site and buildname of the submission:
cmake -DSITE=<hostname>-<os> -DBUILDNAME=<compiler>-<deps> ./
,
where "deps" tells something about what special dependencies were used or not used.
Example:cmake -DSITE=coolcat-Lion -DBUILDNAME=clang3.1-recommended
- Build and execute all tests:
ctest -D Experimental
for an experimental build.
For nightly builds it is recommended to use a script driven implementation that also updates the source repository.
The following cscript file can be tailored to generate your own submisssion.
##########################################################################
# Site-specific setup
##########################################################################
# Dashboard model (Continuous, Experimental, Nightly)
set(MODEL Nightly)
# source dir
set(CTEST_SOURCE_DIRECTORY "/home/bartnoadmin/coolfluid/src/coolfluid3-main")
# build dir
set(CTEST_BINARY_DIRECTORY "/home/bartnoadmin/coolfluid/build/icc11/coolfluid3-nightly-main")
# Dependencies root
set(CF_DEPS_ROOT "/home/bjanssens/build/coolfluid-deps-intel")
# Build and site identification
set(CTEST_SITE "RMA-mach-centos5.4")
set(CTEST_BUILD_NAME "icc11-Release-Main")
set(CTEST_CMAKE_GENERATOR "Unix Makefiles")
set(CF_BUILD_TYPE "Release")
# commands
set(CTEST_CMAKE_COMMAND "/share/apps/cmake/bin/cmake")
set(CTEST_UPDATE_COMMAND "/share/apps/git/bin/git")
# addditional build flags
set(CTEST_BUILD_FLAGS "-j10")
##########################################################################
# Configuration
##########################################################################
# Initial cache entries
set(CF_CONFIG_OPTIONS "-DDEPS_ROOT=${CF_DEPS_ROOT} \"-DCTEST_BUILD_FLAGS:STRING=${CTEST_BUILD_FLAGS}\" -DCMAKE_BUILD_TYPE:STRING=${CF_BUILD_TYPE}")
set(CF_CONFIG_OPTIONS "${CF_CONFIG_OPTIONS} -DSITE:STRING=${CTEST_SITE} -DBUILDNAME:STRING=${CTEST_BUILD_NAME}")
set(CF_CONFIG_OPTIONS "${CF_CONFIG_OPTIONS} -DCF3_ENABLE_ACCEPTANCE_TESTS=ON")
# Assemble cmake command line
set(CTEST_CONFIGURE_COMMAND "${CTEST_CMAKE_COMMAND} ${CF_CONFIG_OPTIONS}")
set(CTEST_CONFIGURE_COMMAND "${CTEST_CONFIGURE_COMMAND} \"-G${CTEST_CMAKE_GENERATOR}\"")
set(CTEST_CONFIGURE_COMMAND "${CTEST_CONFIGURE_COMMAND} \"${CTEST_SOURCE_DIRECTORY}\"")
##########################################################################
# Run the dashboard
##########################################################################
ctest_start (${MODEL})
ctest_update(RETURN_VALUE HAD_UPDATES)
ctest_configure()
ctest_build()
ctest_test()
ctest_submit()
In order to run the script, you supply it to ctest using the -S parameter. In order to set the correct environment, I run the ctest script from a shell script:
#!/bin/sh
export http_proxy=http://proxy.intra.rma.ac.be:3128
. /share/apps/env/gcc45rc
export PATH=/home/bjanssens/build/coolfluid-deps-gcc4.5/bin:/share/apps/cmake/bin:$PATH
export LD_LIBRARY_PATH=/home/bjanssens/build/coolfluid-deps-gcc4.5/lib:$LD_LIBRARY_PATH
export CC=mpicc
export CXX=mpic++
export FC=gfortran
ctest --http1.0 -VV -S nightly-gcc45.cmake
. /share/apps/intel/bin/iccvars.sh intel64
export PATH=/home/bjanssens/build/coolfluid-deps-intel/bin:$PATH
export LD_LIBRARY_PATH=/home/bjanssens/build/coolfluid-deps-intel/lib:$LD_LIBRARY_PATH
export FC=ifort
ctest --http1.0 -VV -S nightly-icc11.cmake
This script runs a GCC 4.5 and ICC 11.1 test in sequence.
To run a continuous dahsboard, change the model at the top of the nighly script and replace the "run the dashboard" section by this code:
while (${CTEST_ELAPSED_TIME} LESS 72000)
set(START_TIME ${CTEST_ELAPSED_TIME})
ctest_start (${MODEL})
ctest_update(RETURN_VALUE HAD_UPDATES)
if(${HAD_UPDATES} GREATER 0)
ctest_configure()
ctest_build()
ctest_test()
ctest_submit()
endif()
ctest_sleep( ${START_TIME} 60 ${CTEST_ELAPSED_TIME})
endwhile()
This example will poll the git repository for changes each minute and terminate after 20 hours.