Advanced Dart

Putting a Project Specific Logo on DartBoards

When a Test Crashes on Windows...

When a test crashes on Windows, the operating system displays a dialog asking whether you would like to debug or exit the application. Dart will stop running tests until a user responds to this dialog.

You can suppress this dialog by modifying two register settings for HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AeDebug to be

  • "Debugger"="dummy.bat"
  • "Auto"="1"
Setting "Auto" to "1" instructs the OS to run the program "dummy.bat" automatically when an application crashes. Since "dummy.bat" does not exist, the application simply terminates when it crashes. Normally, "Auto" is set to "0" indicating the dialog should be displayed and "Debugger" is set to msdev.

Email Notifications for Continuous Builds

BuildName Notes, BuildStamp Notes

Code Coverage

Assuming you are using gcc, add -fprofile-arcs -ftest-coverage to the compiler flags. You may also need to use static library linking. Make sure your code is rebuilt from scratch. Then set-up Dart to run with the Test and Coverage commands. While each test is run, your code will create a set of coverage files. Dart invokes gcov to process these files.

Hint: Use static libs with coverage. It appears that the compiler flags are not compatible with dynamic libraries.

Hint: Adding an empty file called .NoDartCoverage to a directory will cause Dart to ignore any coverage information for files in that directory and its subdirectories. Alternatively fill the file with one regular expression per line, to match files you want ignored.

Checking for memory errors

Purify

Valgrind

valgrind is an open-source profiling tool that gives results similar to purify. You will need to set VALGRIND_COMMAND in CMake to the location of your valgrind executable. Optionally, you can also set VALGRIND_COMMAND_OPTIONS, though it defaults to the following.

-q --skin=memcheck --leak-check=yes --show-reachable=yes --workaround-gcc296-bugs=yes --num-callers=100

Finally, specify the Valgrind command when running the dashboard client

/usr/bin/tclsh /path/to/Dart/Source/Client/DashboardManager.tcl DartConfiguration.tcl Nightly Start Update Configure Build Valgrind Submit

You can see an example of a working valgrind dashboard  one or two days per week (try Mondays) on the VXL dashboard.

Named Measurements in Dart

 "Named measurements" allow a test to output information in its stdout stream that gets presented differently from the remainder of the stdout of a test.  Specifically, named measurements take the form of

<DartMeasurement name="foo" type="numeric/double" encoding="none" compression="none"> data </DartMeasurement>

<DartMeasurementFile name="foo" type="image/jpeg"> filename </DartMeasrementFile>

The "type" can be one of the following:

  • text/plain
  • text/string
  • text/html
  • text/xml
  • link/url
  • link/image
  • numeric/integer
  • numeric/float
  • numeric/double
  • numeric/boolean
  • image/png
  • image/jpeg

The "encoding" can be:

  • none (default, does not have to be specified)
  • base64

The "compression" can be:

  • none  (default, does not have to be specified)
  • gzip

The "encoding" and "compression" attributes specify how the data within the tag is encoded or compressed. In most cases, the encoding and compression will be "none".

The <DartMeasurementFile></DartMeasurementFile> tags are provided for convenience.  This tag will pick the appropriate encoding/compression schemes and convert the tag to a <DartMeasurement> tag.

Stdout of the test will be scanned for these tags and the information extracted into Test.xml. This data will be presented in a table on the Test result HTML page.  The row headings will be the "name" of the measurements.  The table entries will provide the measurement values for text/string, link/url, link/image, numeric/*, image/png and image/jpeg.  The table entries will be links for text/xml, text/html and text/plain.

After the table of values, the "rest" (everything that was not within a Dart tag) of the test's stdout will be displayed.

Currently, the numeric/*, text/string, link/*, and image/* named measurements have been implemented and are in the current repository. The named measurements text/plain, text/html and text/xml have not been implemented yet. Furthermore, the combinations of encodings and compressions have not been completely flushed out. But given these restrictions, named measurements are currently very useful.

Debug verses Release