This is the full set of command line options that
recognizes. Option names may be abbreviated to the shortest unique
Display all test output. By default, runtest shows only the
output of tests that produce unexpected results; that is, tests with
status FAIL (unexpected failure), XPASS (unexpected
success), or ERROR (a severe error in the test case
--all to see output for tests with status
PASS (success, as expected) XFAIL (failure, as expected),
or WARNING (minor error in the test case itself).
triplet is a system triplet of the form cpu-vendor-os. This is the type of machine DejaGnu and the tools to be tested are built on. For a normal cross environment this is the same as the host, but for a Canadian cross, they are different.
Start the internal Tcl debugger. The Tcl debugger supports breakpoints, single stepping, and other common debugging activities. See the document Debugger for Tcl Applications by Don Libes. If you specify -D1, the expect shell stops at a breakpoint as soon as DejaGnu invokes it. If you specify -D0, DejaGnu starts as usual, but you can enter the debugger by sending an interrupt (e.g. by typing Controlc).
Turns on the Expect internal debugging output. Debugging output is
displayed as part of the runtest output, and logged to a file
called dbg.log. The extra debugging output does not appear
on standard output, unless the verbose level is greater than 2 (for
instance, to see debug output immediately, specify
-v). The debugging output shows all attempts at matching the test
output of the tool with the scripted patterns describing expected
output. The output generated with
--strace also goes into
Prints out a short summary of the runtest options, then exits (even if you specify other options).
triplet is a system triplet of the form cpu-vendor-os.
Use this option to override the default string recorded by your
configuration’s choice of host. This choice does not change how
anything is actually configured unless –build is also specified; it
affects only DejaGnu procedures that compare the host string with
particular values. The procedures ishost, istarget,
isnative, and setup_xfail are affected by
--host. In this usage, host refers to the machine that the
tests are to be run on, which may not be the same as the build
--build is also specified, then
to the machine that the tests will be run on, not the machine DejaGnu is
The host board to use.
The name(s) of specific tests to ignore.
Emit Expect output to stdout. The Expect output is usually only written to the .log file. By enabling this option, they are also printed to standard output.
Send test results to one or more email addresses.
Use path as the top directory containing any auxiliary compiled test code. The default is ’.’. Use this option to locate pre-compiled test code. You can normally prepare any auxiliary files needed with make.
Write log files in directory path. The default is ’.’, the directory where you start runtest. This option affects only the summary (.sum) and the detailed log files (.log). The DejaGnu debug log dbg.log always appears (when requested) in the local directory.
Reboot the target board when
runtest starts. When running tests
on a separate target board, it is safer to reboot the target to be
certain of its state. However, when developing test scripts, rebooting
can take a lot of time.
Use path as the top directory for test scripts to
run. runtest looks in this directory for any subdirectory whose
name begins with the toolname (specified with
--tool gdb, runtest uses tests in
subdirectories gdb.* (with the usual shell-like filename
expansion). If you do not use
--srcdir, runtest looks for
test directories under the current working directory.
Turn on internal tracing for expect, to n levels deep. By
adjusting the level, you can control the extent to which your output
expands multi-level Tcl statements. This allows you to ignore some
levels of case or if statements. Each procedure call or
control structure counts as one “level”. The output is recorded in the
same file, dbg.log, used for output from
Use this option to override the default setting (native
testing). triplet is a system triplet of the form
cpu-vendor-os. This option changes the configuration
runtest uses for the default tool names, and other setup
The list of target boards to run tests on.
Specifies which testsuite to run, and what initialization module to
--tool is used only for these two purposes. It is
not used to name the executable program to test. Executable tool
names (and paths) are recorded in site.exp and you can override
them by specifying Tcl variables on the command line.
For example, including
--tool gcc on the command line runs tests
from all test subdirectories whose names match gcc.*, and uses
one of the initialization modules named config/*-gcc.exp. To
specify the name of the compiler (perhaps as an alternative path to what
runtest would use by default), use GCC=path-to-gcc on the
runtest command line.
The path to the tool executable to test.
A list of additional options to pass to the tool.
Turns on more output. Repeating this option increases the amount of output displayed. Level one (-v) is simply test output. Level two (-v -v) shows messages on options, configuration, and process control. Verbose messages appear in the detailed (*.log) log file, but not in the summary (*.sum) log file.
Prints out the version numbers of DejaGnu, Expect, and Tcl.
Generate XML output. FILE is optional; if given it is the name of the output file. If not given, the output file is named after the tool.
Specify the names of testsuites to run. By default, runtest runs all tests for the tool, but you can restrict it to particular testsuites by giving the names of the .exp expect scripts that control them. testsuite.exp cannot include directory names, only plain filenames.
arg(s) specifies a subset of tests in a suite to run. For
compiler or assembler tests, which often use a single .exp script
covering many different source files, this option allows you to further
restrict the tests by listing particular source files to compile. Some
tools even support wildcards here. The wildcards supported depend upon
the tool, but typically ?, *, and [chars] are
You can define Tcl variables for use by your test scripts in the same
style used with make for environment variables. For example,
runtest GDB=gdb.old defines a variable called
your scripts refer to
$GDB in this run, they use the value
The default Tcl variables used for most tools are defined in the main DejaGnu Makefile; their values are captured in the site.exp file.