VTK/Dashboard how to

From KitwarePublic
< VTK
Jump to navigationJump to search


This page documents how to use the VTK dashboard branch in Git. See our table of contents for more information.

Using the dashboard scripts

On Unix-like operating systems

The dashboard branch contains a dashboard client helper script. Create a directory for dashboard builds, and inside that create a directory for dashboard scripts, where you'll track this branch.

mkdir -p ~/Dashboards/VTKScripts
cd ~/Dashboards/VTKScripts
git init
git remote add -t dashboard origin git://vtk.org/VTK.git
git pull origin

Update the dashboard branch to get the latest version of this script by simply running

git pull
  • Create a file for this machine's specific configuration, and name it accordingly.
vim krsdashboard.cmake

A sample can be found in the comments at the top of vtk_common.cmake, and might look like this:

# Client maintainer: christopher.mullins@kitware.com
set(CTEST_SITE "krsdashboard.Kitware")
set(CTEST_BUILD_NAME "Release-gcc4.6.3")
set(CTEST_CONFIGURATION_TYPE Release)
set(CTEST_CMAKE_GENERATOR "Unix Makefiles")
include(${CTEST_SCRIPT_DIRECTORY}/vtk_common.cmake)

On Windows

We recommend using msysgit for a bash shell in a Windows environment. msysgit provides an msys shell that has the appropriate environment set up for using git and its tools.

Once msysgit is installed, you can pretty much follow the same instructions as for Unix.

Warning: Windows does not support paths longer than 260 characters so try to keep your dashboard directory close to the base file system. A popular choice is C:/D.

There are some important changes in the cmake variables. You will have to change the CTEST_CMAKE_GENERATOR variable, and it is recommended to change the CTEST_BUILD_NAME. One example of such a file is:

set(CTEST_SITE "krsdashboard-win.kitware")
set(CTEST_BUILD_NAME "VS2010-Release")
set(CTEST_CONFIGURATION_TYPE Release)
set(CTEST_CMAKE_GENERATOR "Visual Studio 10 Win64")
include(${CTEST_SCRIPT_DIRECTORY}/vtk_common.cmake)

When you're done, run the script with the ctest utility.

ctest -S krsdashboard.cmake -V

and find your build in the Nightly section of the VTK CDash page.

Tip: Consider running as a cron job. Add
0 0 * * * /usr/bin/ctest -S /path/to/VTKScripts/krsdashboard.cmake -V > /path/to/Dashboards/Logs/VTK-linux-master-nightly.log 2>&1
to your crontab to run the Nightly dashboard every night at midnight, and log to the specified file.

Making changes to the dashboard scripts

If you find bugs in the hooks themselves or would like to add new features, the can be edited in the usual Git manner.

$ git checkout -b my_topic_branch

Make your edits, test it, and commit the result. Create a patch file with:

$ git format-patch origin/dashboard

And email the results to the developer's mailing list.

Important dashboard script variables

Feel free to set any of these in your custom ctest file.

Variable Description
dashboard_model Nightly (default), Continuous, or Experimental
dashboard_disable_loop For continuous dashboards, disable loop. TODO what does this mean?
dashboard_root_name Change name of "My Tests" directory, where the source will be checked out and built.
dashboard_source_name Name of source directory. "VTK" by default.
dashboard_binary_name Name of build directory. "VTK-build" by default.
dasbhboard_store_name Name of ExternalData store. "ExternalData" by default.
dashboard_cache Initial CMakeCache.txt file content.
dashboard_cvs_tag CVS tag to checkout (ex: VTK-5-6). TODO does this still work?
dashboard_do_coverage True to enable code coverage checks (ex: gcov)
dashboard_do_memcheck True to enable memcheck (ex: valgrind)
CTEST_UPDATE_COMMAND path to svn or git command-line client
CTEST_BUILD_FLAGS build tool arguments (ex: -j2 for make)
CTEST_DASHBOARD_ROOT Where to put source and build trees.
CTEST_TEST_CTEST Whether to run long CTestTest* tests.
CTEST_TEST_TIMEOUT Per-test timeout length
CTEST_TEST_ARGS ctest_test args (ex: PARALLEL_LEVEL 4)
CMAKE_MAKE_PROGRAM Path to "make" tool to use TODO do we still use this?
VTK_USE_LARGE_DATA True to enable tests using "large" data