DejaGnu has some basic expectations of where it will find files, although this can be overridden with command line options to runtest.
By convention, the test framework lives within a directory
testsuite
. Within that directory are the
following sub-directories:
config
An optional directory containing expect configuration files for each of the different types of target board that might be tested (see Section 2.4). The use of this directory depends on it being set up as part of the configuration.
These have the general name
. For
example board
.expunix.exp
for the default Unix
target.
lib
A directory containing expect configuration files for each of the tools being tested (see Section 2.4).
These files are named
,
where toolname
.exptoolname
is the tool being
tested.
Directories named
contain expect tests for the tool
toolname
[type
].teststoolname
. The optional
type
field allows the tests to be
split into several directories.
For example a compiler tool named xcc
might
have tests both of the compiler (in one directory,
xcc-compile.tests
) and the resulting code
(in a second directory, xcc-execute.tests
).
Strictly speaking the suffix .tests
is not
required, but it is a common convention.
Within each test directory, the tests, written in expect, all
have the file suffix .exp
.