Next: Local configuration file, Up: Customizing DejaGnu [Contents][Index]
The global configuration file is where all the target specific configuration variables for a site are set. For example, a centralized testing lab where multiple developers have to share an embedded development board. There are settings for both remote hosts and remote targets. Below is an example of a global configuration file for a Canadian cross environment. A Canadian cross is a toolchain that is built on, runs on, and targets three different system triplets (for example, building a Solaris-hosted MIPS R4000 toolchain on a GNU/Linux system). This example is based on a configuration once used at Cygnus.
Example global configuration file
# Make sure we look in the right place for the board description files. lappend boards_dir "/nfs/cygint/s1/cygnus/dejagnu/boards" verbose "Global config file: target_triplet is $target_triplet" 2 global target_list switch -glob -- $target_triplet { "native" { set target_list "unix" } "sparc64-*elf" { set target_list "sparc64-sim" } "mips-*elf" { set target_list "mips-sim wilma barney" } "mips-lsi-elf" { set target_list "mips-lsi-sim{,soft-float,el}" } }
In this case, we have support for several cross compilers, that all
run on this host. To run DejaGnu tests on tools hosted on operating
systems that do not run Expect, DejaGnu can be run on the build
machine and connect to the remote host to run all the tests. As you
can see, all one does is set the variable target_list
to the
list of targets and options to test.
In this example, simple cases like sparc64-elf only require
setting the name of the single board configuration file. The
mips-elf target is more complicated and sets the list to three
target boards. mips-sim is a symbolic name for a simulator
“board” and wilma and barney are symbolic names for
physical boards. Symbolic names are covered in the Adding a new board section. The more complicated example is the entry for
mips-lsi-elf. This one runs the tests with multiple iterations
using all possible combinations of the --soft-float
and the
--el
(little endian) options. The braced string includes an
initial comma so that the set of combinations includes no options at
all. Needless to say, this last target example is mostly specific to
compiler testing.
Next: Local configuration file, Up: Customizing DejaGnu [Contents][Index]