Dashboard Intro
Submitting your Own Build to the Dashboard
Here are some tips to add your own nightly or experimental build to the Slicer Dashboard.
The Slicer Dashboard can be found at http://dart.na-mic.org/Slicer2/Dashboard/
Slicer3 Dashboard (As Of May 2, 2008): http://www.cdash.org/CDash/index.php?project=Slicer3
What is a dashboard?
Our dashboard allows us to view the results of nightly builds and testing in a nice format. You can download the source and read more about Dart at Kitware's website: http://public.kitware.com/dashboard.php
It isn't necessary to use CMake to build your project in order to use Dart server. You do need CTest, however, which is provided by Kitware as part of CMake.
OK, so what is CTest?
CTest is a product that can be used to automate updating (using CVS for example), configuring, building, testing, performing memory checking, performing coverage, and submitting results to Dart server.
You can learn more about testing with CTest at http://public.kitware.com/Wiki/CMake_Testing_With_CTest
There is more information about scripting with CTest at http://public.kitware.com/Wiki/CMake_Scripting_Of_CTest
Windows users: see the section titled "Note for Windows/Cygwin users" at the bottom of this page.
How do I use CTest with the Slicer?
Here is an example of how you can use CTest/Dart to add your Slicer build to the dashboard. The example uses Slicer, but can be generalized to other projects.
1. First, create a directory for your build, e.g. /home/bob/my-dart-nightly-build/
2. Checkout your project into this directory:
cvs -d :pserver:anonymous@cvs.spl.harvard.edu:/projects/cvs/slicer login cvs -d :pserver:anonymous@cvs.spl.harvard.edu:/projects/cvs/slicer checkout slicer2
3. Now, you need to create a file named DartConfiguration.tcl at the top level of your project:
/home/bob/my-dart-nightly-build/slicer2/DartConfiguration.tcl
Here is an example DartConfiguration.tcl file that you can modify for your project.
4. Now, you need to generate the libraries that Slicer depends on (which will also get you CTest). Run the command:
/home/bob/my-dart-nightly-build/slicer2/Scripts/genlib.tcl
5. To run an experimental build in verbose mode, run the following commands:
cd /home/bob/my-dart-nightly-build/slicer2 ./Lib/solaris8/CMake-build/bin/ctest -D Experimental -V
(substitute your platform for solaris8)
To run a nightly build, use:
./Lib/solaris8/CMake-build/bin/ctest -D Nightly -V
6. Now, go to the Slicer Dashboard here: http://dart.na-mic.org/Slicer2/Dashboard/ and click the navigator's Refresh button to refresh the page. Once it's posted, you can see your results!
Although Slicer uses CMake in its cmaker.tcl script, there is nothing magical about using CMake for compilation. If you build steps are ./configure, make, make install you could replace genlib.tcl/cmaker.tcl with those steps to build your project.
Great! So, how do I automate it?
You need to create a crontab on your machine that will run this every night. At 1:01 AM every night, my cron job calls a script called master.csh, and outputs the results to my cronlogs folder. Here is an example of my crontab:
01 1 * * * /bin/tcsh /home/hayes/master.csh > /home/hayes/cronlogs/master_csh.log
Here is my master.csh script, which does a Nightly build of the 2-4-release-patches tagged release of slicer2, and then does a Nightly build of the cvs main branch slicer2:
#!/bin/tcsh cd /home/hayes/dart-cvs-release-2-4-patches/slicer2 /home/hayes/dart-cvs-release-2-4-patches/slicer2/Lib/linux-x86/CMake-build/bin/ctest -D Nightly -V cd /home/hayes/dart-cvs-nightly/slicer2 /home/hayes/dart-cvs-nightly/slicer2/Lib/linux-x86/CMake-build/bin/ctest -D Nightly -V
To make your own crontab, use your favorite text editor to create a file like the crontab I have above, name the file something like "mycrontab", and then type the following at the prompt:
crontab ~/mycrontab
If you type "crontab -l", you should see the crontab you just submitted.
Help! I can't get it to work!
If you have any questions or comments about getting your Slicer dashboard nightly build up and running, send email to the Slicer Developers mailing list (slicer-devel@massmail.spl.harvard.edu). For information about how to subscribe to this list, go to http://massmail.spl.harvard.edu/mailman/listinfo/slicer-devel
For more general questions about Dart, try the Dart mailing list (Dart@public.kitware.com). For information about how to subscribe to this list, go to http://public.kitware.com/mailman/listinfo/dart
Note for Windows/Cygwin users
CTest doesn't work with the built-in tclsh provided by Cygwin. Tclsh on Cygwin is horribly broken, so you need to use the version of Tcl that you installed (ActiveState) to run CTest, e.g. run:
/c/cygdrive/your-path-to-slicer/slicer2/Lib/win32/tcl-build/bin/tclsh.exe ctest -D Nightly -V