Services and Modeling for Embedded Software Development
Embecosm divider strip
Prev  Next

2.3.  A typical test framework directory structure

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 board.exp. For example unix.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 toolname.exp, where toolname is the tool being tested.

Test directories

Directories named toolname[type].tests contain expect tests for the tool toolname. 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.

Embecosm divider strip