Dart Installation

Dart can be installed anywhere on your system. Installation scripts will be distributed soon.

Dart with CMake

Dart can be controlled by CMake. Please see the CMake website for installation instructions for CMake.

Dart without CMake

Dart can be used on projects without CMake. Additional client and server configuration is required. Details will be provided soon.

Configuring the Dart Client

The Dart client consists of a series of Tcl scripts in Dart/Source/Client. The Tcl scripts can be used to build a software project, to run a series of tests, and submit XML reports to the Dart Server. The Dart client can be installed anywhere on your system. The Dart client can be obtained at here.

The Dart client uses a "Testing" subtree under the root of your project's source tree. If this subtree is not present, it will be created. Local copies of XML reports are stored under Testing/HTML.

The Dart client is controlled via CMake and a series of CMakeList.txt files. The Dart client uses the Tcl scripting language which must be installed on your system. On unix based systems, CMake will create a number of build targets to control the Dart client. On MS Windows, CMake will create a number of extra projects (DSP's) for your software project, allowing the Dart client to be triggered from inside of Developer Studio. Dart in enabled for a software project by including the CMake module Dart.cmake in the project's toplevel CMakeLists.txt file. This module locates a number of programs that are needed by Dart (make command, Tcl, Java, hostname, nslookup, etc.) The CMake ADD_TEST() command is used to identify tests for Dart. ADD_TEST takes a test identifier, an executable or program name to execute, and a series of arguments to pass to the test.

Activating Dart for a CMake compatible project

When using CMake with Dart, Dart is activated by including the Dart.cmake module in your project's toplevel CMakeLists.txt file. A sample toplevel CMakeLists.txt snippet is below:

#
# This toplevel snippet from a CMakeLists.txt configures the testing system.
#

# Include the standard Dart testing module
INCLUDE (${CMAKE_ROOT}/Modules/Dart.cmake)

#
# End of toplevel CMakeLists.txt snippet
#

Configuring Dart with CMake - DartConfig.cmake

The root directory for a software project needs to include a file called DartConfig.cmake. This file identifies the Dart server to be used for your software project. An example DartConfig.cmake file is below

#
# This is the DartConfig.cmake file for the Insight Toolkit.
# The variables here would be set by the software project administrator
# and should not be modified by the user.
#

# Dashboard is opened for submissions for a 24 hour period starting at
# the specified NIGHLY_START_TIME. Time is specified in 24 hour format.
SET (NIGHTLY_START_TIME "1:00:00 EST")

# Dart server to submit results (used by client)
SET (DROP_METHOD "ftp")
SET (DROP_SITE "www.itk.org")
SET (DROP_LOCATION "/incoming")
SET (DROP_SITE_USER "anonymous")
SET (DROP_SITE_PASSWORD "insight-tester@somewhere.com")
SET (TRIGGER_SITE 
       "http://${DROP_SITE}/cgi-bin/Submit-Insight-TestingResults.pl")

# Dart server configuration 
SET (CVS_WEB_URL "http://${DROP_SITE}/cgi-bin/cvsweb.cgi/Insight/")
SET (CVS_WEB_CVSROOT "Insight")

OPTION(BUILD_DOXYGEN "Build source documentation using doxygen" "On")
SET (DOXYGEN_URL "http://${DROP_SITE}/Insight/Doxygen/html/" )
SET (USE_DOXYGEN "On")
SET (DOXYGEN_CONFIG "${PROJECT_BINARY_DIR}/doxygen.config" )

SET (USE_GNATS "On")
SET (GNATS_WEB_URL "http://${DROP_SITE}/cgi-bin/gnatsweb.pl/Insight/")

# Continuous email delivery variables
SET (CONTINUOUS_FROM "someone@somewhere.com")
SET (SMTP_MAILHOST "somemailhost")
SET (CONTINUOUS_MONITOR_LIST "joe@somewhere.com fred@somewhere.com")
SET (CONTINUOUS_BASE_URL "http://www.itk.org/Testing")

# Copy over the testing logo
CONFIGURE_FILE(${PROJECT_SOURCE_DIR}/TestingLogo.gif 
${PROJECT_BINARY_DIR}/Testing/HTML/TestingResults/Icons/Logo.gif COPYONLY) # If DROP_METHOD is set to "scp", then add this FIND_PROGRAM to your DartConfig FIND_PROGRAM(SCPCOMMAND scp DOC
"Path to scp command, sometimes used for submitting Dart results.") # # End of DartConfig.cmake #

Explanation of Dart.cmake items

Defining tests in Dart

With the above two configuration files, developers can submit build results to the Dart server. To add tests to your system, add ADD_TEST() CMake commands to your CMakeLists.txt files. ADD_TEST() has the form

ADD_TEST(TestIdentifier ExecutableName [Arguments])
The ExecutableName can be an executable built by your software project (i.e. a build target of your project) or can be any program on your system (for instance Tcl, Python, etc.). If the former, the ADD_TEST() command needs to be in the same CMakeLists.txt file as the EXECUTABLE() target. The latter allows other test control harnesses be use with Dart to run tests and determine wether a test passed or failed. When Dart executes a test, it uses the return status of the program to determine wether the test passed or failed. Tests are summarized on the Dartboards as "passed", "failed" or "not run".

Configuring the Dart Server

The Dart server consists of five parts:

  1. An ftp or ssh site for the client to drop build and test XML reports. The simplest procedure is to allow anonymous ftp access to the /incoming directory of an ftp server. If you are worried about opening up your ftp site for anyone to store files on, most ftp servers can be configured so a client cannot view /incoming. Hence it is of no use to the casual hacker. If you want to use a directory other than /incoming, you'll need to change the client's DartConfig.cmake DROP_LOCATION variable. You can also specify a user other than anonymous for submissions. If more security is needed, scp can be used as the submission process instead of ftp. This will require establishing an ssh userid that can be used by all Dart clients and distributing the appropriate keys between clients and servers.

  2. The server needs to have a checkout of your project's software and an installation of the Dart tree. This checkout of your software needs to be configured to perform a build (i.e. CMake must be run in the build tree to properly configure the Dart server settings). The build tree is only used for gathering the testing results from the clients and for generating dashboards. Since Dart's dashboard mechanism is driven by CMake, we need to have a build tree available. This checkout and build tree must be accessible (writable) from the web server (usually "nobody") since the web server will move XML files to this build tree. A cvs update will be done on the web server (typically "nobody") so that user must have permission to do a cvs update on that checkout. The best bet is to checkout the source tree from the user nobody in the first place.

  3. A web server capable of running a cgi-bin script. The perl script Dart/Source/Server/Dart.pl can be copied onto your web server. The name of the script should match the TRIGGER_SITE variable that is specified in the client's DartConfig.cmake file. There are two variables in the Dart.pl to modify. "dropLocation" is the directory where the client submitted their XML reports. This must match the DROP_LOCATION variable in the client's DartConfig.cmake file. "destination" is where these XML files should be moved. The XML reports encode their site name and build name into the filename that is placed on the ftp server. This information is decoded as the XML files are moved from "dropLocation" to a subdirectory under "destination". "destination" should be set to the Testing/HTML/TestingResults/Sites directory of the build tree on the server setup in step 2 above.

  4. An installation of Java. Java is used to convert build/test reports from XML to HMTL using XSLT. All the code for the XSLT engine is included with Dart (Dart/Source/Server/XSL/xalan.jar) so all Dart requires is a Java installation.

  5. A series of cron jobs control the opening and closing of dashboards and periodically converting the XML submissions into HTML reports. The conversion to HTML uses a Java XSLT engine which is included in Dart/Source/Server/XSL subtree. The cron jobs need to be run as the same user as the web server (typically "nobody"). Below is a snippet of a crontab (also available in Dart/Source/Server/cron):
    MAILTO=root@localhost
    SHELL=/bin/tcsh
    
    # Open the insight dashboard at 11pm
    5 23 * * * cd /insight/TestingTree/Insight-TestingResults;  \
    make NightlyDashboardStart; ./myconfig > /dev/null; make NightlyDashboardEnd
    
    # Roll up each hour on the hour
    0 0-22 * * * cd /insight/TestingTree/Insight-TestingResults; \
    make NightlyDasboardEnd >>& Log.txt
    
    #
    # End of cron tab
    #
    
  6. XSLT modifications. None needed. Project specific settings can be set through a DartConfig.cmake file for the project. See Configuring the client (the server is itself a client).