Once you have the DejaGnu source unpacked and available, you must first configure the software to specify where it is to run (and the associated defaults); then you can proceed to installing it.
Configuring DejaGnu records information about the host (where
runtest executes) and target (where the tools and their output
are tested). It is usually best to configure in a directory separate
from the source tree, specifying where to find the source with the
`--srcdir' option to
configure host-type --target=target-type --srcdir=path
To run tests on a full-fledged operating system, you can specify host and target as the same machine; we call this a native configuration. For native configurations, specifying the target explicitly is not necessary. For example, to configure for a Sun-4 running SunOS:
configure sun4 --srcdir=/usr/cygnus/src/dejagnu
When the host and target are not the same (typically when testing software tools on a "bare board" controlled from a separate general-purpose computer), we refer to a cross configuration. For example, to run tests controlled by Sun-4 on an AMD 29000 board, communicating via the AMD "UDI" protocol:
configure sun4 --target=a29k-amd-udi \ --srcdir=/usr/cygnus/src/dejagnu
You may also want to use the
configure option `--prefix' to
specify where you want DejaGnu and its supporting code installed. By
default, installation is in subdirectories of `/usr/local', but you
can select any alternate directory altdir by including
`--prefix=altdir' on the
configure command line.
(This value is captured in the Makefile variables
DejaGnu uses Cygnus Configure. See section `What Configure Does' in Cygnus Configure, for more information on its capabilities, conventions, and command-line options.
Aside from the usual effect of preparing and building the executables on
your host, configuring and making DejaGnu creates a file called
`site.exp'. This file encapsulates information from both
make, as default values for DejaGnu tests.
See section Setting
Save for a small number of example tests, the DejaGnu distribution
itself does not include any test suites; these are available separately.
Test suites for the GNU compiler (testing both GCC and G++) and for
the GNU binary utilities are distributed in parallel with the
DejaGnu distribution (but packaged as separate files). The test suite
for the GNU debugger is distributed in parallel with each release
of GDB itself, starting with GDB 4.9. After configuring the top-level
DejaGnu directory, unpack and configure the test directories for the
tools you want to test; then, in each test directory, run
build auxiliary programs required by some of the tests.
To install DejaGnu in your filesystem (either in `/usr/local', or
as specified by your `--prefix' option to
eg$ make install
`make install' does these things for DejaGnu:
runtestshell script into `$exec_prefix/bin'.
Each test suite collection comes with simple installation instructions in a `README' file; in general, the test suites are designed to be unpacked in the source directory for the corresponding tool, and extract into a directory called `testsuite'.