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
push_target{}
.
ldflags
libgloss
supported targets this is usually just
the name of the linker script.
config
cflags
connect
telnet
,
rlogin
, or rsh
.
target
serial
netport
baud
x10
fileid
prompt
abbrev
ioport
0
is 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)
# IDP board set target_info(idp,name) "idp" set target_info(idp,ldflags) "-Tidp.ld" set target_info(idp,config) m68k-unknown-aout set target_info(idp,cflags) "" set target_info(idp,connect) telnet set target_info(idp,target) "s7" set target_info(idp,serial) "tstty7" set target_info(idp,netport) "wharfrat:1007" set target_info(idp,baud) "9600" # MVME 135 board set target_info(idp,name) "mvme" set target_info(idp,ldflags) "-Tmvme.ld" set target_info(idp,config) m68k-unknown-aout set target_info(idp,cflags) "" set target_info(idp,connect) telnet set target_info(idp,target) "s8" set target_info(idp,serial) "tstty8" set target_info(idp,netport) "wharfrat:1008" set target_info(idp,baud) "9600"
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)
set target_info(host,name) "nt-host" set target_info(host,config) "386-unknown-winnt" set target_info(host,connect) "telnet" set target_info(host,target) "ripple"
There is more info on how to use these variables in the sections on the config files. See section Master Config File.
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 Using runtest
, for
explanations of the command-line options.
Go to the first, previous, next, last section, table of contents.