Go to the first, previous, next, last section, table of contents.


The DejaGnu Implementation

DejaGnu is entirely written in expect, which uses Tcl as a command language. expect serves as a very programmable shell; you can run any program, as with the usual Unix command shells--but once the program is started, your expect script has fully programmable control of its input and output. This does not just apply to the programs under test; expect can also run any auxiliary program, such as diff or sh, with full control over its input and output.

DejaGnu itself is merely a framework for the set of test suites distributed separately for each GNU tool. Future releases of GNU tools will include even more tests, developed throughout the free software community.

runtest is the glue to tie together and manage the test scripts. The runtest program is actually a simple Bourne shell script that locates a copy of the expect shell and then starts the main Tcl code, runtest.exp. runtest.exp itself has these essential functions:

  1. Parse the command line options, load the library files, and load the default configuration files.
  2. Locating the individual test scripts. runtest.exp locates the tests by exploiting a straightforward naming convention based on the string you specify with the `--tool' option.
  3. Providing an extended test environment, by defining additional Tcl procedures beyond those already in expect.
  4. Locating target-dependent functions, to standardize the test environment across a wide variety of test platforms.


Go to the first, previous, next, last section, table of contents.