manpagez: man pages & more
info dejagnu
Home | html | info | man
[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

7.2 Adding a target

DejaGnu has some additional requirements for target support, beyond the general-purpose provisions of Cygnus configure. runtest must actively communicate with the target, rather than simply generating or managing code for the target architecture. Therefore, each tool requires an initialization module for each target. For new targets, you must supply a few Tcl procedures to adapt DejaGnu to the target. This permits DejaGnu itself to remain target independent. See section Initialization module, for a discussion of the naming conventions that enable DejaGnu to locate and use init files.

Usually the best way to write a new initialization module is to edit an existing initialization module; some trial and error will be required. If necessary, you can use the ‘--debug’ option to see what is really going on.

When you code an initialization module, be generous in printing information controlled by the verbose procedure (see section DejaGnu procedures).

Most of the work is in getting the communications right. Communications code (for several situations involving IP networks or serial lines) is available in a DejaGnu library file, ‘lib/remote.exp’. See section DejaGnu Builtins.

If you suspect a communication problem, try running the connection interactively from expect. (There are three ways of running expect as an interactive interpreter. You can run expect with no arguments, and control it completely interactively; or you can use ‘expect -i’ together with other command-line options and arguments; or you can run the command interpreter from any expect procedure. Use return to get back to the calling procedure (if any), or return -tcl to make the calling procedure itself return to its caller; use exit or end-of-file to leave expect altogether.) Run the program whose name is recorded in ‘$connectmode’, with the arguments in ‘$targetname’, to establish a connection. You should at least be able to get a prompt from any target that is physically connected.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]
© manpagez.com 2000-2024
Individual documents may contain additional copyright information.