Dart Client Usage - Concepts

The Dart client operates under a number of Models:

Under each model, the Dart client accepts a number of commands. The Commands for Nightly, Continuous and Experimental models are

Dart Client Usage - CMake

If Dart is configured to use CMake, then CMake will produce a number of make targets (Unix) or project files (Windows) to control Dart.

Unix Make Targets





Windows MS Developer Projects


Dart Client Usage - Tcl

Dart can controlled directly using the Tcl scripts in Dart/Source/Client. These scripts are run from your project's build directory and have the form

tclsh Dart/Source/Client/DashboardManager.tcl DartConfiguration.tcl Model Command [Command ...]
The file DartConfiguration.tcl must exist in the project build directory. If you are using Dart with CMake, CMake will construct this file automatically, using Dart/Source/Client/Utility.conf.in as a template. If CMake is not being used, DartConfiguration.tcl must be constructed by hand.


Setting up a Nightly Client

Each Dart client should have a separate checkout of a project's source code and a separate build tree. Configure the build as you normally would. Define the SITE and BUILDNAME via CMake (or in DartConfiguration.tcl if not using CMake). Also make sure the CVSCOMMAND, MAKECOMMAND, TCL_TCLSH are defined properly. When using Microsoft Visual Studio as your compiler, the MAKECOMMAND will specify which build configuration (Release, Debug, etc.) to use. Set MAKECOMMAND to use the build configuration you want. Dart will search for test executables in a prescribed order (Release, Debug, MinSizeRel, RelWithDebInfo). Dart will run a test from the first configuration it finds. Dart clients, therefore, should only have a single configuration built. All other configurations should be empty. Future versions of Dart may allow the client to specify which configuration to run tests from. Finally, if your testing machine is behind a firewall, you may have set the environment variables HTTP_PROXY and HTTP_PROXY_PORT.

Once a build is configured, schedule a job to run your nightly build. The scheduled time can be anytime after the NIGHTLY_START_TIME for your project. Your scheduled job should set any necessary environment variables you need to build and run. Running a nightly build/test sequence can be accomplished with the following commands

cd ProjectNightlyBuildDirectory
tclsh Dart/Source/Client/DashboardManager.tcl DartConfiguration.tcl \
	Nightly Start Update Configure Build Test Submit
If you would like to submit results to the Dartboard as commands finish, you can break the command into several Dart commands. The following will submit the update and build results to the Dart server, then run the tests and submit those results.
cd ProjectNightlyBuildDirectory
tclsh Dart/Source/Client/DashboardManager.tcl DartConfiguration.tcl \
	Nightly Start Update Configure Build 
tclsh Dart/Source/Client/DashboardManager.tcl DartConfiguration.tcl \
	Nightly Test Submit

Setting up a Continuous Client

A Continuous client is setup similar to a Nightly client. It should have its own source checkout and its own build area. Whereas a Nighly client is driven by a scheduled job, a Continuous client is usually started once and runs forever. A script to run a client in Continuous mode would look like:

cd ProjectContinuousBuildDirectory
while (1)
   tclsh Dart/Source/Client/DashboardManager.tcl DartConfiguration.tcl \
	Continuous Start Update Configure Build Test Submit
   sleep 300
end
Here, the Dart commands are inside a "while" loop and the client is instructed to sleep for 5 minutes after completing a build/test sequence. Also note that we do not break the Dart commands into several command sequences like we can do for a Nightly. The reason is that an "Update" on a Continuous build will terminate the Dart client when nothing has changed in the repository. This avoids building and running tests when nothing has changed. This feature is only available when a Dart Continuous client runs all the Dart commands in one operation.