Central to DejaGnu is the runtest command. It takes the general form:
runtest [options
] [test
]
The most important options when getting started are as follows.
--tool
toolname
The naming of this option is confusing. It is the name of the
group of tests being carried out. This might be the name of a
tool (for example or1ksim), but it might
equally be an indicator of a type of test (for example
unit
).
The toolname
is important, because it
is used to construct the names of other entities: the
directories where tests may be found and the name of a tool
specific configuration file.
--srcdir
dir
This specifies a path where directories of tests may be found. A
directory containing tool specific configuration files
(lib
) is also found in this directory.
The actual names of the directories containing tests must be
prefixed by the name of the tool, and by convention end with the
suffix .tests
.
Thus for the tool or1ksim
, the tests might
appear in directories named or1ksim.tests
or
or1ksim-profiling.tests
.
--outdir
dir
This specifies a directory where all the output logs will be placed.
--target_board
board
This is one of the hidden options, only shown with runtest ‑‑help. It specifies board(s) on which the tests should be run. This also controls which board specific configuration file(s) will be used (see Section 2.4).
If no test
is specified, runtest will run
all the tests it can find, which match the specified
toolname
. Otherwise it will run only the
test specified.
Note | |
---|---|
Options may also be set in configuration files (see Section 2.4). Where an option is set both on the command line and in a configuration file, the command line will take precedence. |
Caution | |
---|---|
There are a number of options which are not documented in the manual. You can see all of the options by running runtest --help |