There should be a Makefile.am
in the main test
directory (testsuite
) and each of its
sub-directories.
If dejagnu
appears in
AUTOMAKE_OPTIONS
, then automake will assume a
DejaGnu based test system. This will be run when the user uses
make check.
The tests must pick up the DEJAGNU
environment
variable. So it should be exported from the
Makefile.am
in the main test directory.
The tool(s) must be named. This is done by setting the
DEJATOOL
variable. If there are multiple tools to
be tested, specify them all with DEJATOOL
The following shows part of a Makefile.am
for a
typical test main directory.
SUBDIRS = config \ lib \ libsim.tests \ or1ksim.tests \ test-code \ test-code-or1k EXTRA_DIST = global-conf.exp # Setup for DejaGNU AUTOMAKE_OPTIONS = dejagnu export DEJAGNU DEJATOOL = libsim \ or1ksim
Note the use of EXTRA_DIST
to specify that the
global configuration file must be added to the distribution. In this
example there is a board specific configuration directory
(config
), an expect test directory for each of
two tools (libsim.tests
and
or1ksim.tests
) and two directories of test
program code (test-code
and
test-code-or1k
).
Makefile.am
files are needed in the various
config and expect test directories, but only to ensure their code is
added to the distribution. There is nothing that needs compiling. For
example, the Makefile.am
in the tool specific
configuration directory (lib
) is as follows.
# Just distribute this stuff EXTRA_DIST = libsim.exp \ or1ksim.exp