| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
4.0.1 Config Variables
DejaGnu uses a named array in Tcl to hold all the info for each
machine. In the case of a canadian cross, this means host information as
well as target information. The named array is called
target_info, and it has two indices. The following fields are
part of the array.
-
name The name of the target. (mostly for error messages) This should also be the string used for this target’s array. It should also be the same as the linker script so we can find them dynamically. This should be the same as the argument used for
push_target{}.-
ldflags This is the linker flags required to produce a fully linked executable. For
libglosssupported targets this is usually just the name of the linker script.-
config The target canonical for this target. This is used by some init files to make sure the target is supported.
-
cflags The flags required to produce an object file from a source file.
-
connect This is the connectmode for this target. This is for both IP and serial connections. Typically this is either
telnet,rlogin, orrsh.-
target This is the hostname of the target. This is for TCP/IP based connections, and is also used for version of tip that use /etc/remote.
-
serial This is the serial port. This is typically /dev/tty? or com?:.
-
netport This is the IP port. This is commonly used for telneting to target boards that are connected to a terminal server. In that case the IP port specifies the which serial port to use.
-
baud This is the baud rate for a serial port connection.
-
x10 This is the parameters for an x10 controller. These are simple devices that let us power cycle or reset a target board remotely.
-
fileid This is the fileid or spawn id of of the connection.
-
prompt a glob style pattern to recognize the prompt.
-
abbrev abbreviation for tool init files.
-
ioport This is the port for I/O on dual port systems. In this configuration, the main serial port
0is usually used for stdin and stdout, which the second serial port can be used for debugging.
The first index into the array is the same value as used in the
name field. This is usually a short version of the name of the
target board. For an example, here’s the settings I use for my
Motorola's IDP board and my Motorola 6U VME
MVME135-1 board. (both m68k targets)
|
DejaGnu can use this information to switch between multiple targets in
one test run. This is done through the use of the push_target
procedure, which is discussed elsewhere.
This array can also hold information for a remote host, which is used
when testing a candain cross. In this case, the only thing different is
the index is just host. Here’s the settings I use to run tests
on my NT machine while running DejaGnu on a Unix machine. (in this case
a Linux box)
|
There is more info on how to use these variables in the sections on the config files. See section Configuration Files.
In the user editable second section of ‘site.exp’, you can not only
override the configuration variables captured in the first section, but
also specify default values for all the runtest command line
options. Save for ‘--debug’, ‘--help’, and ‘--version’,
each command line option has an associated Tcl variable. Use the Tcl
set command to specify a new default value (as for the
configuration variables). The following table describes the
correspondence between command line options and variables you can set in
‘site.exp’. See section Running the Tests, for
explanations of the command-line options.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
