diff options
Diffstat (limited to 'doc')
-rw-r--r-- | doc/Makefile.am | 4 | ||||
-rw-r--r-- | doc/Makefile.in | 4 | ||||
-rw-r--r-- | doc/dejagnu.texi | 84 | ||||
-rw-r--r-- | doc/overview.sgml | 24 | ||||
-rw-r--r-- | doc/overview/addtool.html | 8 | ||||
-rw-r--r-- | doc/overview/builtins.html | 6 | ||||
-rw-r--r-- | doc/overview/configfile.html | 4 | ||||
-rw-r--r-- | doc/overview/customizing.html | 8 | ||||
-rw-r--r-- | doc/overview/designgoals.html | 6 | ||||
-rw-r--r-- | doc/overview/gettingup.html | 16 | ||||
-rw-r--r-- | doc/overview/outputfiles.html | 8 | ||||
-rw-r--r-- | doc/overview/runtest.html | 4 | ||||
-rw-r--r-- | doc/overview/x227.html | 120 | ||||
-rw-r--r-- | doc/overview/x276.html | 100 | ||||
-rw-r--r-- | doc/overview/x319.html | 122 | ||||
-rw-r--r-- | doc/ref.sgml | 426 | ||||
-rw-r--r-- | doc/runtest.1 | 24 | ||||
-rw-r--r-- | doc/user.sgml | 464 |
18 files changed, 716 insertions, 716 deletions
diff --git a/doc/Makefile.am b/doc/Makefile.am index 465ca41..8dbfded 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -49,9 +49,9 @@ docs: $(TARGETS) # now for some extra dependencies that the automatic rules will not # catch: -html/book1.html rtf overview.pdf overview.ps overview.dvi overview.rtf overview.html: overview.sgml ref.sgml user.sgml +html/book1.html rtf overview.pdf overview.ps overview.dvi overview.rtf overview.html: overview.sgml ref.sgml user.sgml -html/book1.html: overview.sgml ref.sgml user.sgml +html/book1.html: overview.sgml ref.sgml user.sgml clean realclean distclean: rm -fr $(TARGETS) DBHTOHTML* html dejagnu.info* overview.junk overview overview.{aux,dvi,log,ps,pdf,tex} diff --git a/doc/Makefile.in b/doc/Makefile.in index b8e2164..9a895a5 100644 --- a/doc/Makefile.in +++ b/doc/Makefile.in @@ -354,9 +354,9 @@ docs: $(TARGETS) # now for some extra dependencies that the automatic rules will not # catch: -html/book1.html rtf overview.pdf overview.ps overview.dvi overview.rtf overview.html: overview.sgml ref.sgml user.sgml +html/book1.html rtf overview.pdf overview.ps overview.dvi overview.rtf overview.html: overview.sgml ref.sgml user.sgml -html/book1.html: overview.sgml ref.sgml user.sgml +html/book1.html: overview.sgml ref.sgml user.sgml clean realclean distclean: rm -fr $(TARGETS) DBHTOHTML* html dejagnu.info* overview.junk overview overview.{aux,dvi,log,ps,pdf,tex} diff --git a/doc/dejagnu.texi b/doc/dejagnu.texi index ef433b9..cd41018 100644 --- a/doc/dejagnu.texi +++ b/doc/dejagnu.texi @@ -13,7 +13,7 @@ @c FIXME---MAIN TODO LIST! @c @c * Revisit organization. -@c +@c @c * discuss Tcl/expect basics---enough to get started (see seminar notes). @c Maybe this would permit abbreviating appendices. @@ -527,7 +527,7 @@ all test suites, and these procedures are already known to conform to procedures (see below), and you must be careful to return @code{UNRESOLVED} where appropriate, as described in the @code{UNRESOLVED} section above. - + Besides the @sc{posix} messages, DejaGnu provides for variations of the PASS and FAIL messages that can be helpful for the tool maintainers. It must be noted, however, that this feature is not @sc{posix} 1003.3 @@ -551,9 +551,9 @@ than @code{XFAIL} even if a failure was expected. @item KFAIL A test is known to fail in some environment(s) due to a known bug -in the tool being tested (identified by a bug id string). This +in the tool being tested (identified by a bug id string). This exists so that, after a bug is identified and properly registered -in a bug tracking database (Gnats, for instance), the count of +in a bug tracking database (Gnats, for instance), the count of failures can be kept as zero. Having zero as a baseline in all platforms allow the tool developers to immediately detect regressions caused by changes (which may affect some platforms and not others). @@ -587,7 +587,7 @@ must also be checked. returned for test cases which were expected to fail and did not, if @sc{posix} 1003.3 compliance is required. This means that @code{PASS} is in some sense more ambiguous than if -@code{XPASS} and @code{KPASS} are also used. +@code{XPASS} and @code{KPASS} are also used. @end ftable @@ -624,7 +624,7 @@ Tcl was introduced in a paper by John K. Ousterhout at the 1990 Winter Usenix conference, @cite{Tcl: An Embeddable Command Language}. That paper is included in PostScript form in the @file{doc} subdirectory of the Tcl distribution. The version of Tcl included in DejaGnu at this time is -Tcl 7.4p3. +Tcl 7.4p3. @cindex @code{expect} scripting language @cindex Libes, Don @@ -647,7 +647,7 @@ is expect 5.18.0. @code{runtest} is the executable test driver for DejaGnu. You can specify two kinds of things on the @code{runtest} command line: command line options, and Tcl variables for the test scripts. The options are -listed alphabetically below. +listed alphabetically below. @cindex exit code from @code{runtest} @cindex @code{runtest} exit code @@ -1136,7 +1136,7 @@ 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 @code{target_info}, and it has two indices. The following fields are -part of the array. +part of the array. @table @code @item name @@ -1146,10 +1146,10 @@ 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 @code{push_target@{@}}. -@item ldflags +@item ldflags This is the linker flags required to produce a fully linked executable. For @code{libgloss} supported targets this is usually just -the name of the linker script. +the name of the linker script. @item config The target canonical for this target. This is used by some init files to @@ -1165,7 +1165,7 @@ serial connections. Typically this is either @code{telnet}, @item 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. +and is also used for version of tip that use /etc/remote. @item serial This is the serial port. This is typically /dev/tty? or com?:. @@ -1175,12 +1175,12 @@ 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. -@item baud +@item baud This is the baud rate for a serial port connection. @item x10 This is the parameters for an x10 controller. These are simple devices -that let us power cycle or reset a target board remotely. +that let us power cycle or reset a target board remotely. @item fileid This is the fileid or spawn id of of the connection. @@ -1202,7 +1202,7 @@ The first index into the array is the same value as used in the target board. For an example, here's the settings I use for my @code{Motorola's} @code{IDP} board and my @code{Motorola} 6U VME @code{MVME135-1} board. (both m68k targets) - + @cartouche @smallexample # IDP board @@ -1290,7 +1290,7 @@ explanations of the command-line options. @ifinfo @display -runtest Tcl +runtest Tcl option variable description __________ ________ ___________________________________________ @@ -1298,7 +1298,7 @@ __________ ________ ___________________________________________ --baud baud set the default baud rate to something other than 9600. ---connect connectmode @samp{rlogin}, @samp{telnet}, @samp{rsh}, +--connect connectmode @samp{rlogin}, @samp{telnet}, @samp{rsh}, @samp{kermit}, @samp{tip}, or @samp{mondfe} --outdir outdir directory for @file{@var{tool}.sum} and @file{@var{tool}.log} @@ -1361,7 +1361,7 @@ do not reboot if set to @code{"0"} (the default)\cr The master config file is where all the target specific config variables get set for a whole site get set. The idea is that for a centralized testing lab where people have to share a target between multiple -developers. There are settings for both remote targets and remote hosts. +developers. There are settings for both remote targets and remote hosts. Here's an example of a Master Config File (also called the Global config file) for a @emph{canadian cross}. A canadian cross is when you build and test a cross compiler on a machine other than the one it's to be @@ -1479,7 +1479,7 @@ The first section starts with: @end cartouche In the second section, you can override any default values (locally to -DejaGnu) for all the variables. The +DejaGnu) for all the variables. The second section can also contain your preferred defaults for all the command line options to @code{runtest}. This allows you to easily customize @code{runtest} for your preferences in each configured @@ -1525,7 +1525,7 @@ Here I set @code{all_flag} so I see all the test cases that PASS along with the ones that FAIL. I also set @var{RLOGIN} and @code{RSH} to the BSD version. I have @code{kerberos} installed, and when I rlogin to a target board, it usually isn't supported. So I use the non secure -versions of these programs rather than the default that's in my path. +versions of these programs rather than the default that's in my path. @node Internals @chapter The DejaGnu Implementation @@ -1690,7 +1690,7 @@ if ![info exists CFLAGS] then @{ @} @end smallexample @end cartouche - + It is always a good idea to first check the variable, and only set it if it has not yet been defined. Often the proper value of @code{AR} is set on the command line that invokes @file{runtest}. @@ -1813,14 +1813,14 @@ the verbosity level use @code{note}. @item pass "@var{string}" @cindex test case, declaring success -Declares a test to have passed. @code{pass} writes in the +Declares a test to have passed. @code{pass} writes in the log files a message beginning with @samp{PASS} (or @code{XPASS}/@code{KPASS}, if failure was expected), appending the argument @var{string}. @item fail "@var{string}" @cindex test case, declaring failure -Declares a test to have failed. @code{fail} writes in the +Declares a test to have failed. @code{fail} writes in the log files a message beginning with @samp{FAIL} (or @code{XFAIL}, if failure was expected), appending the argument @var{string}. @@ -1877,7 +1877,7 @@ configured host matches the argument string, the result is @code{1}; otherwise the result is @code{0}. @var{host} must be a full three-part @code{configure} host name; in particular, you may not use the shorter nicknames supported by @code{configure} (but you can use wildcard -characters, using shell syntax, to specify sets of names). +characters, using shell syntax, to specify sets of names). @item istarget "@var{target}" @cindex target configuration test @@ -1923,7 +1923,7 @@ DejaGnu directly from a source directory, without first running either case, it then looks in the current directory for a directory called @code{lib}. If there are duplicate definitions, the last one loaded takes precedence over the earlier ones. - + @item setup_xfail "@var{config} @r{[}@var{bugid}@r{]}" @c two spaces above to make it absolutely clear there's whitespace---a @c crude sort of italic correction! @@ -1940,7 +1940,7 @@ output; use it as a link to a bug-tracking system such as @sc{gnats} (@pxref{Overview,, Overview, gnats.info, Tracking Bugs With GNATS}). See notes under setup_kfail (below). - + @item setup_kfail "@var{config} @r{[}@var{bugid}@r{]}" @c two spaces above to make it absolutely clear there's whitespace---a @c crude sort of italic correction! @@ -1972,7 +1972,7 @@ the @samp{XFAIL} ones this will hopefuly ensure the test result is not overlooked. @emph{Warning:} you must clear the expected/known failure after using -@code{setup_xfail} or @code{setup_kfail} in a test case. Any call to +@code{setup_xfail} or @code{setup_kfail} in a test case. Any call to @code{pass} or @code{fail} clears the expectedknown failure implicitly; if the test has some other outcome, e.g. an error, you can call @code{clear_xfail} to clear the expected failure or @code{clear_kfail} @@ -2038,11 +2038,11 @@ set compiler_conditional_xfail_data @{@ \ "sparc*-sun*-* *-pc-*-*" \ @{@"-Wall -v" "-O3"@}@ \ @{@"-O1" "-Map" @}@ \ - @}@ + @}@ @end smallexample @end cartouche - What this does is it matches only for these two targets if "-Wall -v" or + What this does is it matches only for these two targets if "-Wall -v" or "-O3" is set, but neither "-O1" or "-Map" is set. For a set to match, the options specified are searched for independantly of @@ -2300,7 +2300,7 @@ otherwise it returns @code{NULL}. Search @var{runtests} for @var{testcase} and return 1 if found, 0 if not. @var{runtests} is a list of two elements. The first is a copy of what was on the right side of the @code{=} if @samp{foo.exp="@dots{}"} was specified, -or an empty string if no such argument is present. The second is the +or an empty string if no such argument is present. The second is the pathname of the current testcase under consideration. This is used by tools like compilers where each testcase is a file. @@ -2420,7 +2420,7 @@ the watchpoints. It is abbreviated as @code{dw}. @c FIXME: finish these when the code is fixed. @c @item watcharray @emph{element} @emph{type} @c @cindex Set a watchpoint on an array -@c This sets an watchpoint of the @emph{element-type} on the +@c This sets an watchpoint of the @emph{element-type} on the @c @item watchvar v null type @c @cindex Set a watchpoint on a variable @@ -2779,7 +2779,7 @@ FAIL: help run "r" abbreviation Running ./gdb.t10/crossload.exp ... PASS: m68k-elf (elf-big) explicit format; loaded XFAIL: mips-ecoff (ecoff-bigmips) "ptype v_signed_char" signed -C types +C types === gdb Summary === # of expected passes 5 # of expected failures 1 @@ -2865,7 +2865,7 @@ expect: does @{@var{tool output}@} (spawn_id @var{n}) match pattern For every unsuccessful match, @code{expect} issues a @samp{no} after this message; if other patterns are specified for the same @code{expect} command, they are reflected also, but without the first -part of the message (@samp{expect@dots{}match pattern}). +part of the message (@samp{expect@dots{}match pattern}). When @code{expect} finds a match, the log for the successful match ends with @samp{yes}, followed by a record of the @code{expect} variables set @@ -2889,7 +2889,7 @@ expect: does @{@} (spawn_id 0) match pattern @{<return>@}? no @{command@}? no break gdbme.c:34 Breakpoint 8 at 0x23d8: file gdbme.c, line 34. -(gdb) expect: does @{break gdbme.c:34\r\nBreakpoint 8 at 0x23d8: +(gdb) expect: does @{break gdbme.c:34\r\nBreakpoint 8 at 0x23d8: file gdbme.c, line 34.\r\n(gdb) @} (spawn_id 6) match pattern @{Breakpoint.*at.* file gdbme.c, line 34.*\(gdb\) $@}? yes expect: set expect_out(0,start) @{18@} @@ -2919,7 +2919,7 @@ completely before all output, as in this case). Interspersed tool output. The beginning of the log entry for the second attempted match may be hard to spot: this is because the prompt @samp{(gdb) } appears on the same line, just before the @samp{expect:} -that marks the beginning of the log entry. +that marks the beginning of the log entry. @item Fail-safe patterns. Many of the patterns tested are fail-safe patterns @@ -2978,7 +2978,7 @@ coded almost purely in Tcl. Writing the complete suite of C tests, then, consisted of these steps: @enumerate -@item +@item @cindex Granlund, Torbjorn @cindex C torture test Copying all the C code into the test directory. These tests were based on @@ -3102,7 +3102,7 @@ Add the new directory name to the @samp{configdirs} definition in the @code{make} and @code{configure} next run, they include the new directory. @item -Add the new test case to the directory, as above. +Add the new test case to the directory, as above. @item To add support in the new directory for configure and make, you must @@ -3150,7 +3150,7 @@ characters after close-quote}. If you have trouble understanding why a pattern does not match the program output, try using the @samp{--debug} option to @code{runtest}, -and examine the debug log carefully. @xref{Debug,,Debug Log}. +and examine the debug log carefully. @xref{Debug,,Debug Log}. Be careful not to neglect output generated by setup rather than by the interesting parts of a test case. For example, while testing @sc{gdb}, @@ -3209,7 +3209,7 @@ tests.} @item expect_out(buffer) @cindex last command output The output from the last command. This is an internal variable set by -@code{expect}. +@code{expect}. @item exec_output This is the output from a @code{@var{tool}_load} command. This only @@ -3224,7 +3224,7 @@ further interaction. @end ftable @node Extending -@chapter New Tools, Targets, or Hosts +@chapter New Tools, Targets, or Hosts The most common ways to extend the DejaGnu framework are: adding a suite of tests for a new tool to be tested; adding support for testing on a @@ -3378,7 +3378,7 @@ configuration-dependent values. The @code{check} target must run @smallexample check: site.exp all $(RUNTEST) $(RUNTESTFLAGS) $(FLAGS_TO_PASS) \ - --tool @var{example} --srcdir $(srcdir) + --tool @var{example} --srcdir $(srcdir) @end smallexample @end cartouche @@ -3431,7 +3431,7 @@ eg$ mkdir config @item Make an init file in this directory; its name must start with the -@code{target_abbrev} value, so call it @file{config/unix.exp}. +@code{target_abbrev} value, so call it @file{config/unix.exp}. This is the file that contains the target-dependent procedures; fortunately, most of them do not have to do very much in order for @code{runtest} to run. @@ -3547,7 +3547,7 @@ Builtins, 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, @file{lib/remote.exp}. -@xref{DejaGnu Builtins,,DejaGnu Builtins}. +@xref{DejaGnu Builtins,,DejaGnu Builtins}. @c FIXME! Say something about Tcl debugger here. If you suspect a communication problem, try running the connection diff --git a/doc/overview.sgml b/doc/overview.sgml index e1bc35c..d5c59d8 100644 --- a/doc/overview.sgml +++ b/doc/overview.sgml @@ -166,7 +166,7 @@ into another language, under the above conditions for modified versions. URL="mailto:deja@welcomehome.org">Deja Snow Savoye</ulink> (now 13 years old as of September 2003), who was a toddler during DejaGnu's beginnings.</para> - + <para>DejaGnu offers several advantages for testing:</para> <itemizedlist mark="bullet" spacing="compact"> @@ -214,7 +214,7 @@ into another language, under the above conditions for modified versions. <sect1 id=new xreflabel="Release Notes"> <title>What's New In This Release</title> - + <para>This release has a number of substantial changes over version 1.3. The most visible change is that the version of Expect and Tcl included in the release are up-to-date with the current stable net @@ -253,7 +253,7 @@ into another language, under the above conditions for modified versions. <sect2 id=cygwin xreflabel="Windows Support"> <title>Windows Support</title> - + <para>To use DejaGnu on Windows, you need to first install the <ulink URL="http://www.cygwin.com/">Cygwin</ulink> release. This works as of the B20.1 release. Cygwin is a POSIX @@ -349,13 +349,13 @@ into another language, under the above conditions for modified versions. These definitions specify the output of a test case:</para> - <variablelist> + <variablelist> <varlistentry> <term>PASS</term> <listitem><para>A test has succeeded. That is, it demonstrated that the assertion is true.</para></listitem> </varlistentry> - + <varlistentry> <term>XFAIL</term> <listitem><para>POSIX 1003.3 does not incorporate the notion of @@ -365,7 +365,7 @@ into another language, under the above conditions for modified versions. <emphasis>PASS</emphasis> is in some sense more ambiguous than if <emphasis>XPASS</emphasis> is also used.</para></listitem> </varlistentry> - + <varlistentry> <term>FAIL</term> <listitem><para>A test has produced the bug it was intended to @@ -376,7 +376,7 @@ into another language, under the above conditions for modified versions. <emphasis>FAIL</emphasis> rather than <emphasis>XFAIL</emphasis> even if a failure was expected.</para></listitem> </varlistentry> - + <varlistentry> <term>UNRESOLVED</term> <listitem><para>A test produced indeterminate results. Usually, this @@ -426,7 +426,7 @@ into another language, under the above conditions for modified versions. </itemizedlist> <variablelist> - <varlistentry> + <varlistentry> <term>UNTESTED</term> <listitem><para>A test was not run. This is a place-holder, used when there is no real test case yet.</para></listitem> @@ -438,7 +438,7 @@ into another language, under the above conditions for modified versions. conditional:</para> <variablelist> - <varlistentry> + <varlistentry> <term>UNSUPPORTED</term> <listitem><para>There is no support for the tested case. This may mean that a conditional feature of an operating system, or of a @@ -448,9 +448,9 @@ into another language, under the above conditions for modified versions. test for the system subroutine <emphasis>gethostname</emphasis> would never work on a target board running only a boot monitor.</para></listitem> - </varlistentry> + </varlistentry> </variablelist> - + <para>DejaGnu uses the same output procedures to produce these messages for all testsuites and these procedures are already known to conform to POSIX 1003.3. For a DejaGnu testsuite to conform to POSIX 1003.3, @@ -462,7 +462,7 @@ into another language, under the above conditions for modified versions. </sect1> </chapter> - + <!-- include the user manual --> &user; diff --git a/doc/overview/addtool.html b/doc/overview/addtool.html index b12ced4..fda9926 100644 --- a/doc/overview/addtool.html +++ b/doc/overview/addtool.html @@ -244,13 +244,13 @@ CLASS="PROGRAMLISTING" # The flags to pass to runtest RUNTESTFLAGS = - # Execute the tests + # Execute the tests check: site.exp all $(RUNTEST) $(RUNTESTFLAGS) \ --tool <SPAN CLASS="SYMBOL" >${example}</SPAN -> --srcdir $(srcdir) +> --srcdir $(srcdir) # Make the local config file site.exp: ./config.status Makefile @@ -355,7 +355,7 @@ WIDTH="90%" ><TD ><PRE CLASS="PROGRAMLISTING" -> +> proc foo_exit {} {} proc foo_version {} {} @@ -593,4 +593,4 @@ VALIGN="top" ></DIV ></BODY ></HTML ->
\ No newline at end of file +> diff --git a/doc/overview/builtins.html b/doc/overview/builtins.html index bb8b668..c15a75f 100644 --- a/doc/overview/builtins.html +++ b/doc/overview/builtins.html @@ -1224,7 +1224,7 @@ NAME="XFAIL" failed. <TT CLASS="FUNCTION" >xfail</TT -> +> writes in the log files a message beginning with <I CLASS="EMPHASIS" @@ -8831,7 +8831,7 @@ NAME="COMPILE" >Compile Procedure</A ></H3 ><P ->This invokes the compiler as set by CC to compile the +>This invokes the compiler as set by CC to compile the file <TT CLASS="FILENAME" >file</TT @@ -12271,4 +12271,4 @@ VALIGN="top" ></DIV ></BODY ></HTML ->
\ No newline at end of file +> diff --git a/doc/overview/configfile.html b/doc/overview/configfile.html index 75db2d9..7bb62df 100644 --- a/doc/overview/configfile.html +++ b/doc/overview/configfile.html @@ -111,7 +111,7 @@ CLASS="OPTION" >, and <TT CLASS="OPTION" >--version</TT ->, each +>, each command line option has an associated Tcl variable. Use the Tcl <B CLASS="COMMAND" @@ -541,4 +541,4 @@ VALIGN="top" ></DIV ></BODY ></HTML ->
\ No newline at end of file +> diff --git a/doc/overview/customizing.html b/doc/overview/customizing.html index b756ab0..fb81523 100644 --- a/doc/overview/customizing.html +++ b/doc/overview/customizing.html @@ -156,7 +156,7 @@ CLASS="FILENAME" >site.exp</TT > file.</P ><P ->You can usually generate or update the testsuite's local +>You can usually generate or update the testsuite's local <TT CLASS="FILENAME" >site.exp</TT @@ -364,7 +364,7 @@ WIDTH="100%" ><TD ><PRE CLASS="PROGRAMLISTING" -> +> ## these variables are automatically generated by make ## # Do not edit here. If you wish to override these values # add them to the last section @@ -379,7 +379,7 @@ CLASS="PROGRAMLISTING" set tmpdir /build/devo-builds/i586-pc-linux-gnulibc1/gcc/testsuite set srcdir "${srcdir}/testsuite" ## All variables above are generated by configure. Do Not Edit ## - + </PRE ></TD ></TR @@ -450,4 +450,4 @@ VALIGN="top" ></DIV ></BODY ></HTML ->
\ No newline at end of file +> diff --git a/doc/overview/designgoals.html b/doc/overview/designgoals.html index c5024c5..9846d3d 100644 --- a/doc/overview/designgoals.html +++ b/doc/overview/designgoals.html @@ -156,14 +156,14 @@ CLASS="COMMAND" >, <B CLASS="COMMAND" >tip</B ->, +>, <B CLASS="COMMAND" >kermit</B >, and <B CLASS="COMMAND" >mondfe</B -> for remote +> for remote communications.</P ></DIV ><DIV @@ -225,4 +225,4 @@ VALIGN="top" ></DIV ></BODY ></HTML ->
\ No newline at end of file +> diff --git a/doc/overview/gettingup.html b/doc/overview/gettingup.html index bc3ec37..9bdb3b6 100644 --- a/doc/overview/gettingup.html +++ b/doc/overview/gettingup.html @@ -132,14 +132,14 @@ WIDTH="100%" ><TD ><PRE CLASS="PROGRAMLISTING" ->dgt:~/dejagnu.test$ runtest -WARNING: Couldn't find the global config file. -WARNING: No tool specified Test +>dgt:~/dejagnu.test$ runtest +WARNING: Couldn't find the global config file. +WARNING: No tool specified Test Run By dgt on Sun Nov 25 17:07:03 2001 Native configuration is i586-pc-linux-gnu === tests === Schedule of variations: unix -Running target unix Using /usr/share/dejagnu/baseboards/unix.exp as board description file for target. -Using /usr/share/dejagnu/config/unix.exp as generic interface file for target. +Running target unix Using /usr/share/dejagnu/baseboards/unix.exp as board description file for target. +Using /usr/share/dejagnu/config/unix.exp as generic interface file for target. ERROR: Couldn't find tool config file for unix. === Summary ===</PRE ></TD @@ -182,8 +182,8 @@ NAME="AEN224" >Getting the source code for the calc example</A ></H2 ><P ->If you are running a Debian distribution you can find the examples under /usr/share/doc/dejagnu/examples. -These examples seem to be missing in RedHat's RPM. +>If you are running a Debian distribution you can find the examples under /usr/share/doc/dejagnu/examples. +These examples seem to be missing in RedHat's RPM. In this case download the sources of DejaGnu and adjust the pathes to the DejaGnu examples accordingly.</P ></DIV ></DIV @@ -244,4 +244,4 @@ VALIGN="top" ></DIV ></BODY ></HTML ->
\ No newline at end of file +> diff --git a/doc/overview/outputfiles.html b/doc/overview/outputfiles.html index 97980f4..8f2de75 100644 --- a/doc/overview/outputfiles.html +++ b/doc/overview/outputfiles.html @@ -193,7 +193,7 @@ CLASS="SCREEN" FAIL: help run "r" abbreviation Running ./gdb.t10/crossload.exp ... PASS: m68k-elf (elf-big) explicit format; loaded - XFAIL: mips-ecoff (ecoff-bigmips) "ptype v_signed_char" signed C types + XFAIL: mips-ecoff (ecoff-bigmips) "ptype v_signed_char" signed C types === gdb Summary === # of expected passes 5 # of expected failures 1 @@ -437,7 +437,7 @@ CLASS="SCREEN" {command}? no break gdbme.c:34 Breakpoint 8 at 0x23d8: file gdbme.c, line 34. - (gdb) expect: does {break gdbme.c:34\r\nBreakpoint 8 at 0x23d8: + (gdb) expect: does {break gdbme.c:34\r\nBreakpoint 8 at 0x23d8: file gdbme.c, line 34.\r\n(gdb) } (spawn_id 6) match pattern {Breakpoint.*at.* file gdbme.c, line 34.*\(gdb\) $}? yes expect: set expect_out(0,start) {18} @@ -479,7 +479,7 @@ CLASS="EMPHASIS" output. <SPAN CLASS="PRODUCTNAME" >Expect</SPAN -> begins +> begins attempting to match the patterns supplied immediately; often, the first pass is against incomplete output (or completely before all output, as in this case).</P @@ -613,4 +613,4 @@ VALIGN="top" ></DIV ></BODY ></HTML ->
\ No newline at end of file +> diff --git a/doc/overview/runtest.html b/doc/overview/runtest.html index b3a8a00..5740545 100644 --- a/doc/overview/runtest.html +++ b/doc/overview/runtest.html @@ -1027,7 +1027,7 @@ CLASS="SCREEN" >You can use the option <I CLASS="EMPHASIS" >--srcdir</I -> to point to +> to point to some other directory containing a collection of tests:</P ><TABLE BORDER="0" @@ -1154,4 +1154,4 @@ VALIGN="top" ></DIV ></BODY ></HTML ->
\ No newline at end of file +> diff --git a/doc/overview/x227.html b/doc/overview/x227.html index 014b820..ac1eb05 100644 --- a/doc/overview/x227.html +++ b/doc/overview/x227.html @@ -75,7 +75,7 @@ NAME="AEN227" >Create a minimal project, e.g. calc</A ></H1 ><P ->In this section you will to start a small project, +>In this section you will to start a small project, using the sample application calc, which is part of your DejaGnu distribution</P ><DIV CLASS="SECT2" @@ -97,8 +97,8 @@ WIDTH="100%" ><TD ><PRE CLASS="PROGRAMLISTING" ->set tool calc -set srcdir . +>set tool calc +set srcdir . set objdir /home/dgt/dejagnu.test</PRE ></TD ></TR @@ -146,7 +146,7 @@ CLASS="PROGRAMLISTING" ></TR ></TABLE ><P ->autoconf is another part of the auto-tools. +>autoconf is another part of the auto-tools. Run it to generate configure based on information contained in configure.in.</P ><TABLE BORDER="0" @@ -161,7 +161,7 @@ CLASS="PROGRAMLISTING" ></TR ></TABLE ><P ->autoheader is another part of the auto-tools. +>autoheader is another part of the auto-tools. Run it to generate calc.h.in. </P ><TABLE BORDER="0" @@ -176,13 +176,13 @@ CLASS="PROGRAMLISTING" ></TR ></TABLE ><P ->The Makefile.am of this example was developed as port of the DejaGnu -distribution. -Adapt Makefile.am for this test. Replace the line -“#noinst_PROGRAMS = calc” to -“bin_PROGRAMS = calc”. +>The Makefile.am of this example was developed as port of the DejaGnu +distribution. +Adapt Makefile.am for this test. Replace the line +“#noinst_PROGRAMS = calc” to +“bin_PROGRAMS = calc”. Change the RUNTESTDEFAULTFLAGS from -“$$srcdir/testsuite” to +“$$srcdir/testsuite” to “./testsuite”.</P ><P >Running automake at this point contains a series of warning in its output as shown in the following example:</P @@ -204,24 +204,24 @@ WIDTH="100%" ><PRE CLASS="PROGRAMLISTING" >dgt:~/dejagnu.test$ automake --add-missing -automake: configure.in: installing `./install-sh' -automake: configure.in: installing `./mkinstalldirs' -automake: configure.in: installing `./missing' -automake: Makefile.am: installing `./INSTALL' -automake: Makefile.am: required file `./NEWS' not found -automake: Makefile.am: required file `./README' not found -automake: Makefile.am: installing `./COPYING' -automake: Makefile.am: required file `./AUTHORS' not found -automake: Makefile.am: required file `./ChangeLog' not found -configure.in: 4: required file `./calc.h.in' not found +automake: configure.in: installing `./install-sh' +automake: configure.in: installing `./mkinstalldirs' +automake: configure.in: installing `./missing' +automake: Makefile.am: installing `./INSTALL' +automake: Makefile.am: required file `./NEWS' not found +automake: Makefile.am: required file `./README' not found +automake: Makefile.am: installing `./COPYING' +automake: Makefile.am: required file `./AUTHORS' not found +automake: Makefile.am: required file `./ChangeLog' not found +configure.in: 4: required file `./calc.h.in' not found Makefile.am:6: required directory ./doc does not exist</PRE ></TD ></TR ></TABLE ></DIV ><P ->Create a empty directory doc and empty files -INSTALL, NEWS, README, AUTHORS, ChangeLog and COPYING. +>Create a empty directory doc and empty files +INSTALL, NEWS, README, AUTHORS, ChangeLog and COPYING. The default COPYING will point to the GNU Public License (GPL). In a real project it would be time to add some meaningfull text in each file.</P ><P @@ -243,35 +243,35 @@ WIDTH="100%" ><TD ><PRE CLASS="PROGRAMLISTING" ->dgt:~/dejagnu.test$ ./configure -creating cache ./config.cache -checking whether to enable maintainer-specific portions of Makefiles... no -checking for a BSD compatible install... /usr/bin/install -c -checking whether build environment is sane... yes -checking whether make sets ${MAKE}... yes -checking for working aclocal... found -checking for working autoconf... found -checking for working automake... found -checking for working autoheader... found -checking for working makeinfo... found -checking for gcc... gcc checking whether the C compiler (gcc ) works... yes -checking whether the C compiler (gcc ) is a cross-compiler... no +>dgt:~/dejagnu.test$ ./configure +creating cache ./config.cache +checking whether to enable maintainer-specific portions of Makefiles... no +checking for a BSD compatible install... /usr/bin/install -c +checking whether build environment is sane... yes +checking whether make sets ${MAKE}... yes +checking for working aclocal... found +checking for working autoconf... found +checking for working automake... found +checking for working autoheader... found +checking for working makeinfo... found +checking for gcc... gcc checking whether the C compiler (gcc ) works... yes +checking whether the C compiler (gcc ) is a cross-compiler... no checking whether we are using GNU C... yes -checking whether gcc accepts -g... yes -checking for a BSD compatible install... /usr/bin/install -c -checking how to run the C preprocessor... gcc -E -checking for stdlib.h... yes -checking for strcmp... yes -updating cache ./config.cache -creating ./config.status +checking whether gcc accepts -g... yes +checking for a BSD compatible install... /usr/bin/install -c +checking how to run the C preprocessor... gcc -E +checking for stdlib.h... yes +checking for strcmp... yes +updating cache ./config.cache +creating ./config.status creating Makefile creating calc.h</PRE ></TD ></TR ></TABLE ></DIV ><P ->If you are familiar with GNU software, -this output should not contain any surprise to you. +>If you are familiar with GNU software, +this output should not contain any surprise to you. Any errors should be easy to fix for such a simple program.</P ><P >Build the calc executable:</P @@ -292,15 +292,15 @@ WIDTH="100%" ><TD ><PRE CLASS="PROGRAMLISTING" ->dgt:~/dejagnu.test$ make -gcc -DHAVE_CONFIG_H -I. -I. -I. -g -O2 -c calc.c +>dgt:~/dejagnu.test$ make +gcc -DHAVE_CONFIG_H -I. -I. -I. -g -O2 -c calc.c gcc -g -O2 -o calc calc.o</PRE ></TD ></TR ></TABLE ></DIV ><P ->You prepared a few files and then called some commands. +>You prepared a few files and then called some commands. Respecting the right order assures a automatic and correctly compiled calc program. The following example resumes the correct order.</P ><DIV CLASS="EXAMPLE" @@ -340,24 +340,24 @@ WIDTH="100%" ><TD ><PRE CLASS="PROGRAMLISTING" ->dgt:~/dejagnu.test$ ./calc -calc: version -Version: 1.1 +>dgt:~/dejagnu.test$ ./calc +calc: version +Version: 1.1 calc:<I CLASS="EMPHASIS" > </I ->add 3 4 -7 +>add 3 4 +7 calc: multiply 3 4<I CLASS="EMPHASIS" > </I > -12 +12 calc: multiply 2 4<I CLASS="EMPHASIS" > </I > -12 +12 calc: quit </PRE ></TD ></TR @@ -365,8 +365,8 @@ calc: quit </PRE ><P >Look at the intentional bug that 2 times 4 equals 12.</P ><P ->The tests run by DejaGnu need a file called site.exp, -which is automatically generated if we call “make site.exp”. +>The tests run by DejaGnu need a file called site.exp, +which is automatically generated if we call “make site.exp”. This was the purpose of the “AUTOMAKE_OPTIONS = dejagnu” in Makefile.am.</P ><DIV CLASS="EXAMPLE" @@ -385,8 +385,8 @@ WIDTH="100%" ><TD ><PRE CLASS="PROGRAMLISTING" ->dgt: make site.exp -dgt:~/dejagnu.test$ make site.exp +>dgt: make site.exp +dgt:~/dejagnu.test$ make site.exp Making a new site.exp file...</PRE ></TD ></TR @@ -453,4 +453,4 @@ VALIGN="top" ></DIV ></BODY ></HTML ->
\ No newline at end of file +> diff --git a/doc/overview/x276.html b/doc/overview/x276.html index ca3a1d3..55e2fb2 100644 --- a/doc/overview/x276.html +++ b/doc/overview/x276.html @@ -101,37 +101,37 @@ WIDTH="100%" ><TD ><PRE CLASS="PROGRAMLISTING" ->dgt:~/dejagnu.test$ make check -make check-DEJAGNU -make[1]: Entering directory `/home/dgt/dejagnu.test' srcdir=`cd . && pwd`; export srcdir; \ -EXPECT=expect; export EXPECT; \ runtest=runtest; \ +>dgt:~/dejagnu.test$ make check +make check-DEJAGNU +make[1]: Entering directory `/home/dgt/dejagnu.test' srcdir=`cd . && pwd`; export srcdir; \ +EXPECT=expect; export EXPECT; \ runtest=runtest; \ if /bin/sh -c "$runtest --version" > /dev/null 2>&1; then \ -$runtest --tool calc CALC=`pwd`/calc --srcdir ./testsuite ; \ -else echo "WARNING: could not find \`runtest'" 1>&2; :;\ -fi -WARNING: Couldn't find the global config file. -WARNING: Couldn't find tool init file -Test Run By dgt on Sun Nov 25 21:42:21 2001 +$runtest --tool calc CALC=`pwd`/calc --srcdir ./testsuite ; \ +else echo "WARNING: could not find \`runtest'" 1>&2; :;\ +fi +WARNING: Couldn't find the global config file. +WARNING: Couldn't find tool init file +Test Run By dgt on Sun Nov 25 21:42:21 2001 Native configuration is i586-pc-linux-gnu === calc tests === -Schedule of variations: +Schedule of variations: unix -Running target unix -Using /usr/share/dejagnu/baseboards/unix.exp as board description file for target. -Using /usr/share/dejagnu/config/unix.exp as generic interface file for target. +Running target unix +Using /usr/share/dejagnu/baseboards/unix.exp as board description file for target. +Using /usr/share/dejagnu/config/unix.exp as generic interface file for target. Using ./testsuite/config/unix.exp as tool-and-target-specific interface file. -Running ./testsuite/calc.test/calc.exp ... +Running ./testsuite/calc.test/calc.exp ... FAIL: multiply2 (bad match) === calc Summary === -# of expected passes 5 -# of unexpected failures 1 +# of expected passes 5 +# of unexpected failures 1 /home/Dgt/dejagnu.test/calc version Version: 1.1 -make[1]: *** [check-DEJAGNU] Fehler 1 +make[1]: *** [check-DEJAGNU] Fehler 1 make[1]: Leaving directory `/home/Dgt/dejagnu.test' make: *** [check-am] Fehler 2</PRE ></TD ></TR @@ -140,11 +140,11 @@ make[1]: Leaving directory `/home/Dgt/dejagnu.test' make: *** [check-am] Fehler ><P >Did you see the line “FAIL:“? The test cases for calc catch the bug in the calc.c file. Fix the error in calc.c later as the following examples assume a unchanged calc.c.</P ><P ->Examine the output files calc.sum and calc.log. +>Examine the output files calc.sum and calc.log. Try to understand the testcases written in ~/dejagnu.test/testsuite/calc.test/calc.exp. To understand Expect you might take a look at the book "Exploring Expect", -which is an excellent resource for learning and using Expect. (Pub: O'Reilly, ISBN 1-56592-090-2) -The book contains hundreds of examples and also includes a tutorial on Tcl. +which is an excellent resource for learning and using Expect. (Pub: O'Reilly, ISBN 1-56592-090-2) +The book contains hundreds of examples and also includes a tutorial on Tcl. Exploring Expect is 602 pages long. </P ></DIV ><DIV @@ -170,7 +170,7 @@ CLASS="PROGRAMLISTING" ></TR ></TABLE ><P ->Rerun make check. Test whether the output contains "I am ~/.dejagnurc". +>Rerun make check. Test whether the output contains "I am ~/.dejagnurc". Create ~/my_dejagnu.exp and insert the following line:</P ><TABLE BORDER="0" @@ -199,8 +199,8 @@ CLASS="PROGRAMLISTING" ></TR ></TABLE ><P ->Run “make check” again. The output should not contain -“WARNING: Couldn't find the global config file.”. +>Run “make check” again. The output should not contain +“WARNING: Couldn't find the global config file.”. Create the sub-directory lib. Create the file “calc.exp” in it and insert the following line:</P ><TABLE BORDER="0" @@ -215,8 +215,8 @@ CLASS="PROGRAMLISTING" ></TR ></TABLE ><P ->The last warning “WARNING: Couldn't find tool init file” -should not be part of the output of make check. +>The last warning “WARNING: Couldn't find tool init file” +should not be part of the output of make check. Create the directory ˜/boards. Create the file ˜/boards/standard.exp and insert the following line:</P ><TABLE BORDER="0" @@ -249,32 +249,32 @@ WIDTH="100%" ><TD ><PRE CLASS="PROGRAMLISTING" ->dgt:~/dejagnu.test$ make check +>dgt:~/dejagnu.test$ make check <...> -fi -I am ~/.dejagnurc -I am ~/my_dejagnu.exp -I am lib/calc.exp -Test Run By dgt on Sun Nov 25 22:19:14 2001 +fi +I am ~/.dejagnurc +I am ~/my_dejagnu.exp +I am lib/calc.exp +Test Run By dgt on Sun Nov 25 22:19:14 2001 Native configuration is i586-pc-linux-gnu === calc tests === Using /home/Dgt/boards/standard.exp as standard board description\ -file for build. -I am ~/boards/standard.exp +file for build. +I am ~/boards/standard.exp Using /home/Dgt/boards/standard.exp as standard board description\ - file for host. -I am ~/boards/standard.exp + file for host. +I am ~/boards/standard.exp -Schedule of variations: +Schedule of variations: unix -Running target unix +Running target unix Using /home/Dgt/boards/standard.exp as standard board description\ - file for target. -I am ~/boards/standard.exp + file for target. +I am ~/boards/standard.exp Using /usr/share/dejagnu/baseboards/unix.exp as board description file\ -for target. +for target. <...></PRE ></TD ></TR @@ -282,8 +282,8 @@ for target. ></DIV ><P >It is up to you to decide when and where to use any of the above -mentioned config files for customizing. -This chapters showed you where and in which order the different config +mentioned config files for customizing. +This chapters showed you where and in which order the different config files are run.</P ></DIV ><DIV @@ -345,8 +345,8 @@ NAME="AEN312" ></H2 ><P >This test checks, whether the built-in shell command “echo Hello world” - will really write “Hello world” on the console. -Create the file ~/dejagnu.test/testsuite/calc.test/local_echo.exp. + will really write “Hello world” on the console. +Create the file ~/dejagnu.test/testsuite/calc.test/local_echo.exp. It should contain the following lines</P ><DIV CLASS="EXAMPLE" @@ -365,10 +365,10 @@ WIDTH="100%" ><TD ><PRE CLASS="PROGRAMLISTING" ->set test "Local Hello World" -send "echo Hello World" -expect { - -re "Hello World" { pass "$test" } +>set test "Local Hello World" +send "echo Hello World" +expect { + -re "Hello World" { pass "$test" } }</PRE ></TD ></TR @@ -437,4 +437,4 @@ VALIGN="top" ></DIV ></BODY ></HTML ->
\ No newline at end of file +> diff --git a/doc/overview/x319.html b/doc/overview/x319.html index 9958b9a..4b7c5af 100644 --- a/doc/overview/x319.html +++ b/doc/overview/x319.html @@ -77,7 +77,7 @@ NAME="AEN319" ><P >Testing remote targets is a lot trickier especially if you are using an embedded target -which has no built in support for things like a compiler, ftp server or a Bash-shell. +which has no built in support for things like a compiler, ftp server or a Bash-shell. Before you can test calc on a remote target you have to acquire a few basics skills.</P ><DIV CLASS="SECT2" @@ -88,15 +88,15 @@ NAME="AEN322" >Setup telnet to your own host</A ></H2 ><P ->The easiest remote host is usually the host you are working on. -In this example we will use telnet to login in your own workstation. -For security reason you should never have a telnet deamon running on +>The easiest remote host is usually the host you are working on. +In this example we will use telnet to login in your own workstation. +For security reason you should never have a telnet deamon running on machine connected on the internet, as password and usernames are transmitted - in clear text. + in clear text. We assume you know how to setup your machine for a telnet daemon.</P ><P ->Next try whether you may login in your own host by issuing the -command “telnet localhost.1”. In order to be able to +>Next try whether you may login in your own host by issuing the +command “telnet localhost.1”. In order to be able to distinguish between a normal session an a telnet login add the following lines to /home/dgt/.bashrc.</P ><TABLE BORDER="0" @@ -107,8 +107,8 @@ WIDTH="100%" ><PRE CLASS="PROGRAMLISTING" >if [ "$REMOTEHOST" ] -then - PS1='remote:\w\$ ' +then + PS1='remote:\w\$ ' fi</PRE ></TD ></TR @@ -133,17 +133,17 @@ WIDTH="100%" ><PRE CLASS="PROGRAMLISTING" >dgt:~/dejagnu.test$ telnet localhost -Trying 127.0.0.1... -Connected to 127.0.0.1. -Escape character is '^]'. -Debian GNU/Linux testing/unstable Linux +Trying 127.0.0.1... +Connected to 127.0.0.1. +Escape character is '^]'. +Debian GNU/Linux testing/unstable Linux K6Linux login: dgt -Password: -Last login: Sun Nov 25 22:46:34 2001 from localhost on pts/4 -Linux K6Linux 2.4.14 #1 Fre Nov 16 19:28:25 CET 2001 i586 unknown -No mail. +Password: +Last login: Sun Nov 25 22:46:34 2001 from localhost on pts/4 +Linux K6Linux 2.4.14 #1 Fre Nov 16 19:28:25 CET 2001 i586 unknown +No mail. remote:~$ exit -logout +logout Connection closed by foreign host.</PRE ></TD ></TR @@ -159,8 +159,8 @@ NAME="AEN331" >A test case for login via telnet</A ></H2 ><P ->In order to define a correct setup we have add a line containing -“set target unix” either to ~/.dejagnurc or to ~/my_dejagnu.exp. +>In order to define a correct setup we have add a line containing +“set target unix” either to ~/.dejagnurc or to ~/my_dejagnu.exp. In ~/boards/standard.exp add the following four lines to define a few patterns for the DejaGnu telnet login procedure.</P ><DIV CLASS="EXAMPLE" @@ -179,17 +179,17 @@ WIDTH="100%" ><TD ><PRE CLASS="PROGRAMLISTING" ->set_board_info shell_prompt "remote:" -set_board_info telnet_username "dgt" -set_board_info telnet_password "top_secret" +>set_board_info shell_prompt "remote:" +set_board_info telnet_username "dgt" +set_board_info telnet_password "top_secret" set_board_info hostname "localhost" </PRE ></TD ></TR ></TABLE ></DIV ><P ->As DejaGnu will be parsing the telnet session output for some well -known pattern the output there are a lot of things that can go wrong. +>As DejaGnu will be parsing the telnet session output for some well +known pattern the output there are a lot of things that can go wrong. If you have any problems verify your setup:</P ><P ></P @@ -221,8 +221,8 @@ CLASS="FILENAME" ></LI ></UL ><P ->To test the login via telnet write a sample test case. -Create the file ~/dejagnu.test/testsuite/calc.test/remote_echo.exp and +>To test the login via telnet write a sample test case. +Create the file ~/dejagnu.test/testsuite/calc.test/remote_echo.exp and add the following few lines:</P ><DIV CLASS="EXAMPLE" @@ -242,16 +242,16 @@ WIDTH="100%" ><PRE CLASS="PROGRAMLISTING" >puts "this is remote_echo.exp target for $target " -target_info $target -#set verbose 9 -set shell_id [remote_open $target] -set test "Remote login to $target" +target_info $target +#set verbose 9 +set shell_id [remote_open $target] +set test "Remote login to $target" #set verbose 0 puts "Spawn id for remote shell is $shell_id" -if { $shell_id > 0 } { - pass "$test" -} else { - fail "Remote open to $target" +if { $shell_id > 0 } { + pass "$test" +} else { + fail "Remote open to $target" }</PRE ></TD ></TR @@ -267,9 +267,9 @@ WIDTH="100%" ><TD ><PRE CLASS="PROGRAMLISTING" ->Running ./testsuite/calc.test/local_echo.exp ... -Running ./testsuite/calc.test/remote_echoo.exp ... -this is remote_echo.exp target is unix +>Running ./testsuite/calc.test/local_echo.exp ... +Running ./testsuite/calc.test/remote_echoo.exp ... +this is remote_echo.exp target is unix Spawn id for remote shell is exp7</PRE ></TD ></TR @@ -287,8 +287,8 @@ NAME="AEN357" >Remote testing “Hello world”</A ></H2 ><P ->Next you will transform the above “hello world” example to -its remote equivalent. +>Next you will transform the above “hello world” example to +its remote equivalent. This can be done by adding the following lines to our file remote_echo.exp.</P ><DIV CLASS="EXAMPLE" @@ -307,12 +307,12 @@ WIDTH="100%" ><TD ><PRE CLASS="PROGRAMLISTING" ->set test "Remote_send Hello World" +>set test "Remote_send Hello World" set status [remote_send $target "echo \"Hello World\"\n" ] pass "$test" -set test "Remote_expect Hello World" -remote_expect $target 5 { - -re "Hello World" { pass "$test" } +set test "Remote_expect Hello World" +remote_expect $target 5 { + -re "Hello World" { pass "$test" } }</PRE ></TD ></TR @@ -324,10 +324,10 @@ remote_expect $target 5 { ><P >Have a look at the procedures in /usr/share/dejagnu/remote.exp to have an overview of the offered procedures and their features. </P ><P ->Now setup a real target. -In the following example we assume as target a PowerBook running Debian. -As above add a test user "dgt", install telnet and FTP servers. -In order to distinguish it from the host add the line +>Now setup a real target. +In the following example we assume as target a PowerBook running Debian. +As above add a test user "dgt", install telnet and FTP servers. +In order to distinguish it from the host add the line <TABLE BORDER="0" BGCOLOR="#E0E0E0" @@ -340,8 +340,8 @@ CLASS="PROGRAMLISTING" ></TD ></TR ></TABLE -> to /home/dgt/.bash_profile. -Also add a corresponding entry "powerbook" to /etc/hosts and verify that you +> to /home/dgt/.bash_profile. +Also add a corresponding entry "powerbook" to /etc/hosts and verify that you are able to ping, telnet and ftp to the target "powerbook".</P ><P >In order to let runtest run its test on the "powerbook" target change the following lines in ~/boards/standard.exp:</P @@ -420,11 +420,11 @@ puts "status of remote_download ist $status" ></TABLE ></DIV ><P ->After running runtest again, check whether the file dejagnu2 exists on the target. +>After running runtest again, check whether the file dejagnu2 exists on the target. This example will only work if the rcp command works with your target. -If you have a working FTP-server on the target you can use it by adding the +If you have a working FTP-server on the target you can use it by adding the following lines to ~/boards/standard.exp:</P ><DIV CLASS="EXAMPLE" @@ -461,8 +461,8 @@ NAME="AEN382" ></H2 ><P >For crosscompiling you need working binutils, gcc and a base library like -libc or glib for your target. -It is beyond the scope of this document to describe how to get it working. +libc or glib for your target. +It is beyond the scope of this document to describe how to get it working. The following examples assume a cross compiler for PowerPC which is called linux-powerpc-gcc.</P ><P >Add AC_CANONICAL_TARGET in dejagnu.test/configure.in at the following location. Copy config.guess from /usr/share/automake to dejagnu.test.</P @@ -475,14 +475,14 @@ WIDTH="100%" ><PRE CLASS="PROGRAMLISTING" >AM_CONFIG_HEADER(calc.h) -AC_CANONICAL_TARGET([]) +AC_CANONICAL_TARGET([]) AM_INIT_AUTOMAKE(calc, 1.1)</PRE ></TD ></TR ></TABLE ><P ->You need to run automake 2.5 or later. -Depending on your installation calling autoconf2.5 instead of autoconf is not needed. +>You need to run automake 2.5 or later. +Depending on your installation calling autoconf2.5 instead of autoconf is not needed. The sequence to regenerate all files is:</P ><DIV CLASS="EXAMPLE" @@ -504,13 +504,13 @@ CLASS="PROGRAMLISTING" >$ autoconf2.5 $ autoheader $ automake -$ ./configure --host=powerpc-linux --target=powerpc-linux +$ ./configure --host=powerpc-linux --target=powerpc-linux configure: WARNING: If you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used. checking build system type... ./config.guess: ./config.guess: No such file or directory configure: error: cannot guess build type; you must specify one $ cp /usr/share/automake/config.guess . -$ ./configure --host=powerpc-linux --target=powerpc-linux +$ ./configure --host=powerpc-linux --target=powerpc-linux configure: WARNING: If you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used. \ checking build system type... i586-pc-linux-gnu @@ -537,7 +537,7 @@ WIDTH="100%" ><PRE CLASS="PROGRAMLISTING" >$ make -powerpc-linux-gcc -DHAVE_CONFIG_H -I. -I. -I. -g -O2 -c calc.c +powerpc-linux-gcc -DHAVE_CONFIG_H -I. -I. -I. -g -O2 -c calc.c powerpc-linux-gcc -g -O2 -o calc calc.o </PRE ></TD ></TR @@ -629,4 +629,4 @@ VALIGN="top" ></DIV ></BODY ></HTML ->
\ No newline at end of file +> diff --git a/doc/ref.sgml b/doc/ref.sgml index dc9686d..2fa363a 100644 --- a/doc/ref.sgml +++ b/doc/ref.sgml @@ -14,7 +14,7 @@ <sect1 id=installation xreflabel="Installation"> <title>Installation</title> - + <para>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.</para> @@ -60,7 +60,7 @@ suites.</para> </sect2> - + <sect2 id=installing xreflabel="Installing DejaGnu"> <title>Installing DejaGnu</title> @@ -132,7 +132,7 @@ <para></para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>open_logs</function></funcdef> <paramdef><parameter></parameter</paramdef> </funcsynopsis> @@ -143,7 +143,7 @@ <para></para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>close_logs</function></funcdef> <paramdef><parameter></parameter</paramdef> </funcsynopsis> @@ -162,7 +162,7 @@ passed a NULL string, then it returns the name of the build canonical configuration.</para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>isbuild</function></funcdef> <paramdef><parameter>pattern</parameter</paramdef> </funcsynopsis> @@ -179,7 +179,7 @@ <para></para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>is_remote</function></funcdef> <paramdef><parameter>board</parameter</paramdef> </funcsynopsis> @@ -199,7 +199,7 @@ the result is <emphasis>1</emphasis>; otherwise the result is <emphasis>0</emphasis>.</para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>is3way</function></funcdef> <paramdef><parameter></parameter</paramdef> </funcsynopsis> @@ -216,7 +216,7 @@ shorter nicknames supported by configure (but you can use wildcard characters, using shell syntax, to specify sets of names).</para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>ishost</function></funcdef> <paramdef><parameter>pattern</parameter></paramdef> </funcsynopsis> @@ -241,7 +241,7 @@ <emphasis>NULL</emphasis> string, then it returns the name of the build canonical configuration.</para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>istarget</function></funcdef> <paramdef><parameter>args</parameter></paramdef> </funcsynopsis> @@ -261,7 +261,7 @@ a <emphasis>1</emphasis>; otherwise it returns a <emphasis>0</emphasis>.</para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>isnative</function></funcdef> <paramdef><parameter></parameter</paramdef> </funcsynopsis> @@ -272,7 +272,7 @@ <para></para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>unknown</function></funcdef> <paramdef><parameter>args</parameter></paramdef> </funcsynopsis> @@ -289,7 +289,7 @@ <para></para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>clone_output</function></funcdef> <paramdef><parameter>message</parameter></paramdef> </funcsynopsis> @@ -306,7 +306,7 @@ <para></para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>reset_vars</function></funcdef> <paramdef><parameter></parameter</paramdef> </funcsynopsis> @@ -317,7 +317,7 @@ <para></para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>log_and_exit</function></funcdef> <paramdef><parameter></parameter</paramdef> </funcsynopsis> @@ -328,7 +328,7 @@ <para></para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>log_summary</function></funcdef> <paramdef><parameter>args</parameter</paramdef> </funcsynopsis> @@ -345,7 +345,7 @@ <para></para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>cleanup</function></funcdef> <paramdef><parameter></parameter</paramdef> </funcsynopsis> @@ -379,7 +379,7 @@ applies to whatever test runs next, leading to surprising results.</para></warning> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>setup_xfail</function></funcdef> <paramdef><parameter>config</parameter> <parameter>bugid</parameter></paramdef> @@ -403,7 +403,7 @@ <para></para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>record_test</function></funcdef> <paramdef><parameter>type</parameter> <parameter>message</parameter> @@ -434,7 +434,7 @@ was expected), appending the argument <parameter>string</parameter>.</para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>pass</function></funcdef> <paramdef><parameter>string</parameter></paramdef> </funcsynopsis> @@ -454,9 +454,9 @@ writes in the log files a message beginning with <emphasis>FAIL</emphasis> (or <emphasis>XFAIL</emphasis>, if failure was expected), appending the argument - <parameter>string</parameter>.</para> + <parameter>string</parameter>.</para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>fail</function></funcdef> <paramdef><parameter>string</parameter></paramdef> </funcsynopsis> @@ -479,7 +479,7 @@ was expected), appending the argument <parameter>string</parameter>.</para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>xpass</function></funcdef> <paramdef><parameter>string</parameter></paramdef> </funcsynopsis> @@ -496,13 +496,13 @@ <title>Xfail Procedure</title> <para>Declares a test to have expectably - failed. <function>xfail</function> + failed. <function>xfail</function> writes in the log files a message beginning with <emphasis>XFAIL</emphasis> (or <emphasis>PASS</emphasis>, if success was expected), appending the argument <parameter>string</parameter>.</para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>xpass</function></funcdef> <paramdef><parameter>string</parameter></paramdef> </funcsynopsis> @@ -524,7 +524,7 @@ <emphasis>PASS</emphasis> or <emphasis>FAIL</emphasis> into an <emphasis>UNRESOLVED</emphasis>.</para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>set_warning_threshold</function></funcdef> <paramdef><parameter>threshold</parameter></paramdef> </funcsynopsis> @@ -545,7 +545,7 @@ value controls how many <function>warning</function> procedures can be called before becoming <emphasis>UNRESOLVED</emphasis>.</para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>get_warning_threshold</function></funcdef> <paramdef><parameter></parameter></paramdef> </funcsynopsis> @@ -573,9 +573,9 @@ is <emphasis>0</emphasis>, then there are no further side effects to calling this function, and the following test outcome doesn't become <emphasis>UNRESOLVED</emphasis>. This can be used for errors with no - known side effects.</para> + known side effects.</para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>warning</function></funcdef> <paramdef><parameter>string</parameter> <parameter>number</parameter> @@ -615,7 +615,7 @@ doesn't become <emphasis>UNRESOLVED</emphasis>. This can be used for errors with no known side effects.</para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>perror</function></funcdef> <paramdef><parameter>string</parameter> <parameter>number</parameter> @@ -648,7 +648,7 @@ such messages, but in cases where a message is needed in the log file regardless of the verbosity level use <function>note</function>.</para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>note</function></funcdef> <paramdef><parameter>string</parameter></paramdef> </funcsynopsis> @@ -669,7 +669,7 @@ might use this in a dummy test whose only role is to record that a test does not yet exist for some feature.</para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>untested</function></funcdef> <paramdef><parameter>string</parameter></paramdef> </funcsynopsis> @@ -692,7 +692,7 @@ not execute as expected, and a human being must go over results to determine if it passed or failed (and to improve the test case).</para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>unresolved</function></funcdef> <paramdef><parameter>string</parameter></paramdef> </funcsynopsis> @@ -713,7 +713,7 @@ writes in the log file a message beginning with <emphasis>UNSUPPORTED</emphasis>, appending the argument string.</para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>unsupported</function></funcdef> <paramdef><parameter>string</parameter></paramdef> </funcsynopsis> @@ -731,7 +731,7 @@ <para></para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>init_testcounts</function></funcdef> <paramdef><parameter></parameter></paramdef> </funcsynopsis> @@ -742,7 +742,7 @@ <para></para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>incr_count</function></funcdef> <paramdef><parameter>name</parameter> <parameter>args</parameter></paramdef> @@ -768,9 +768,9 @@ tools are installed using the same naming conventions: For example, for a cross compiler supporting the <emphasis>m68k-vxworks</emphasis> configuration, the result of transform <command>gcc</command> is - <command>m68k-vxworks-gcc</command>.</para> + <command>m68k-vxworks-gcc</command>.</para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>transform</function></funcdef> <paramdef><parameter>toolname</parameter></paramdef> </funcsynopsis> @@ -778,7 +778,7 @@ <varlistentry> <term><parameter>toolname</parameter></term> <listitem><para>The name of the cross-development program to - transform.</para></listitem> + transform.</para></listitem> </varlistentry> </variablelist> </sect3> @@ -804,7 +804,7 @@ conditional is true, or <emphasis>0</emphasis> if the conditional is false.</para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>check_conditional_xfail</function></funcdef> <paramdef><parameter>message</parameter> <parameter>targets</parameter> @@ -836,7 +836,7 @@ <listitem><para>This is a list of sets of options to search for in the compiler options to activate this conditional. If any set of the options matches, (regardless of whether any of the include sets - match) then this conditional is de-activated.</para></listitem> + match) then this conditional is de-activated.</para></listitem> </varlistentry> </variablelist> @@ -872,9 +872,9 @@ of configuration target names. It is only necessary to call <command>clear_xfail</command> if a test case ends without calling either <command>pass</command> or <command>fail</command>, after - calling <command>setup_xfail</command>.</para> + calling <command>setup_xfail</command>.</para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>clear_xfail</function></funcdef> <paramdef><parameter>config</parameter></paramdef> </funcsynopsis> @@ -902,7 +902,7 @@ to print string without a trailing newline. Use the optional <option>--</option> argument if string begins with "-".</para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>verbose</function></funcdef> <paramdef><parameter>-log</parameter> <parameter>-x</parameter> @@ -952,7 +952,7 @@ duplicate definitions, the last one loaded takes precedence over the earlier ones.</para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>load_lib</function></funcdef> <paramdef><parameter>filespec</parameter></paramdef> </funcsynopsis> @@ -994,7 +994,7 @@ <para></para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>call_remote</function></funcdef> <paramdef><parameter>type</parameter> <parameter>proc</parameter> @@ -1023,7 +1023,7 @@ <para></para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>check_for_board_status</function></funcdef> <paramdef><parameter>variable</parameter></paramdef> </funcsynopsis> @@ -1040,7 +1040,7 @@ <para></para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>file_on_build</function></funcdef> <paramdef><parameter>op</parameter> <parameter>file</parameter> @@ -1067,7 +1067,7 @@ <para></para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>file_on_host</function></funcdef> <paramdef><parameter>op</parameter> <parameter>file</parameter> @@ -1094,7 +1094,7 @@ <para></para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>local_exec</function></funcdef> <paramdef><parameter>commandline</parameter> <parameter>inp</parameter> @@ -1122,7 +1122,7 @@ <para></para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>remote_binary</function></funcdef> <paramdef><parameter>host</parameter></paramdef> </funcsynopsis> @@ -1139,7 +1139,7 @@ <para></para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>remote_close</function></funcdef> <paramdef><parameter>shellid</parameter></paramdef> </funcsynopsis> @@ -1161,7 +1161,7 @@ <para></para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>remote_download</function></funcdef> <paramdef><parameter>dest</parameter> <parameter>file</parameter> @@ -1188,7 +1188,7 @@ <para></para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>remote_exec</function></funcdef> <paramdef><parameter>hostname</parameter> <parameter>program</parameter> @@ -1215,7 +1215,7 @@ <para></para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>remote_expect</function></funcdef> <paramdef><parameter>board</parameter> <parameter>timeout</parameter> @@ -1242,7 +1242,7 @@ <para></para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>remote_file</function></funcdef> <paramdef><parameter>dest</parameter> <parameter>args</parameter</paramdef> @@ -1264,7 +1264,7 @@ <para></para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>remote_ld</function></funcdef> <paramdef><parameter>dest</parameter> <parameter>prog</parameter></paramdef> @@ -1286,7 +1286,7 @@ <para></para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>remote_load</function></funcdef> <paramdef><parameter>dest</parameter> <parameter>prog</parameter> @@ -1313,7 +1313,7 @@ <para></para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>remote_open</function></funcdef> <paramdef><parameter>type</parameter></paramdef> </funcsynopsis> @@ -1342,7 +1342,7 @@ <para></para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>remote_pop_conn</function></funcdef> <paramdef><parameter>host</parameter></paramdef> </funcsynopsis> @@ -1359,7 +1359,7 @@ <para></para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>remote_push_conn</function></funcdef> <paramdef><parameter>host</parameter></paramdef> </funcsynopsis> @@ -1376,7 +1376,7 @@ <para></para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>remote_raw_binary</function></funcdef> <paramdef><parameter>host</parameter></paramdef> </funcsynopsis> @@ -1393,7 +1393,7 @@ <para></para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>remote_raw_close</function></funcdef> <paramdef><parameter>host</parameter></paramdef> </funcsynopsis> @@ -1410,7 +1410,7 @@ <para></para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>remote_raw_file</function></funcdef> <paramdef><parameter>dest</parameter> <parameter>args</parameter></paramdef> @@ -1432,7 +1432,7 @@ <para></para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>remote_raw_ld</function></funcdef> <paramdef><parameter>dest</parameter> <parameter>prog</parameter></paramdef> @@ -1454,7 +1454,7 @@ <para></para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>remote_raw_load</function></funcdef> <paramdef><parameter>dest</parameter> <parameter>prog</parameter> @@ -1481,7 +1481,7 @@ <para></para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>remote_raw_open</function></funcdef> <paramdef><parameter>args</parameter></paramdef> </funcsynopsis> @@ -1498,7 +1498,7 @@ <para></para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>remote_raw_send</function></funcdef> <paramdef><parameter>dest</parameter> <parameter>string</parameter></paramdef> @@ -1520,7 +1520,7 @@ <para></para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>remote_raw_spawn</function></funcdef> <paramdef><parameter>dest</parameter> <parameter>commandline</parameter></paramdef> @@ -1543,7 +1543,7 @@ <para></para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>remote_raw_transmit</function></funcdef> <paramdef><parameter>dest</parameter> <parameter>file</parameter></paramdef> @@ -1565,7 +1565,7 @@ <para></para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>remote_raw_wait</function></funcdef> <paramdef><parameter>dest</parameter> <parameter>timeout</parameter></paramdef> @@ -1587,7 +1587,7 @@ <para></para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>remote_reboot</function></funcdef> <paramdef><parameter>host</parameter></paramdef> </funcsynopsis> @@ -1604,7 +1604,7 @@ <para></para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>remote_send</function></funcdef> <paramdef><parameter>dest</parameter> <parameter>string</parameter></paramdef> @@ -1626,7 +1626,7 @@ <para></para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>remote_spawn</function></funcdef> <paramdef><parameter>dest</parameter> <parameter>commandline</parameter> @@ -1653,7 +1653,7 @@ <para></para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>remote_swap_conn</function></funcdef> <paramdef><parameter>host</parameter></paramdef> </funcsynopsis> @@ -1670,7 +1670,7 @@ <para></para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>remote_transmit</function></funcdef> <paramdef><parameter>dest</parameter> <parameter>file</parameter></paramdef> @@ -1692,7 +1692,7 @@ <para></para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>remote_upload</function></funcdef> <paramdef><parameter>dest</parameter> <parameter>srcfile</parameter> @@ -1719,7 +1719,7 @@ <para></para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>remote_wait</function></funcdef> <paramdef><parameter>dest</parameter> <parameter>timeout</parameter></paramdef> @@ -1741,7 +1741,7 @@ <para></para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>standard_close</function></funcdef> <paramdef><parameter>host</parameter></paramdef> </funcsynopsis> @@ -1758,7 +1758,7 @@ <para></para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>standard_download</function></funcdef> <paramdef><parameter>dest</parameter> <parameter>file</parameter> @@ -1785,7 +1785,7 @@ <para></para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>standard_exec</function></funcdef> <paramdef><parameter>hostname</parameter> <parameter>args</parameter></paramdef> @@ -1807,7 +1807,7 @@ <para></para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>standard_file</function></funcdef> <paramdef><parameter>dest</parameter <parameter>op</parameter @@ -1826,7 +1826,7 @@ <para></para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>standard_load</function></funcdef> <paramdef><parameter>dest</parameter> <parameter>prog</parameter> @@ -1853,7 +1853,7 @@ <para></para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>standard_reboot</function></funcdef> <paramdef><parameter>host</parameter></paramdef> </funcsynopsis> @@ -1870,7 +1870,7 @@ <para></para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>standard_send</function></funcdef> <paramdef><parameter>dest</parameter> <parameter>string</parameter></paramdef> @@ -1892,7 +1892,7 @@ <para></para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>standard_spawn</function></funcdef> <paramdef><parameter>dest</parameter> <parameter>commandline</parameter></paramdef> @@ -1914,7 +1914,7 @@ <para></para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>standard_transmit</function></funcdef> <paramdef><parameter>dest</parameter> <parameter>file</parameter></paramdef> @@ -1936,7 +1936,7 @@ <para></para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>standard_upload</function></funcdef> <paramdef><parameter>dest srcfile destfile</parameter></paramdef> </funcsynopsis> @@ -1961,7 +1961,7 @@ <para></para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>standard_wait</function></funcdef> <paramdef><parameter>dest</parameter> <parameter>timeout</parameter></paramdef> @@ -1984,7 +1984,7 @@ <para></para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>unix_clean_filename</function></funcdef> <paramdef><parameter>dest</parameter> <parameter>file</parameter></paramdef> @@ -2007,7 +2007,7 @@ <para></para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>exit_remote_shell</function></funcdef> <paramdef><parameter>spawnid</parameter></paramdef> </funcsynopsis> @@ -2024,7 +2024,7 @@ --> </sect2> - + <sect2 id=connprocs xreflabel="connprocs"> <title>Procedures For Using Utilities to Connect</title> @@ -2146,7 +2146,7 @@ <para></para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>kermit_open</function></funcdef> <paramdef><parameter>dest</parameter> <parameter>args</parameter></paramdef> @@ -2168,7 +2168,7 @@ <para></para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>kermit_command</function></funcdef> <paramdef><parameter>dest</parameter> <parameter>args</parameter></paramdef> @@ -2190,7 +2190,7 @@ <para></para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>kermit_send</function></funcdef> <paramdef><parameter>dest string args</parameter></paramdef> </funcsynopsis> @@ -2215,7 +2215,7 @@ <para></para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>kermit_transmit</function></funcdef> <paramdef><parameter>dest</parameter> <parameter>file</parameter> @@ -2242,7 +2242,7 @@ <para></para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>telnet_open</function></funcdef> <paramdef><parameter>hostname</parameter> <parameter>args</parameter></paramdef> @@ -2264,7 +2264,7 @@ <para></para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>telnet_binary</function></funcdef> <paramdef><parameter>hostname</parameter></paramdef> </funcsynopsis> @@ -2281,7 +2281,7 @@ <para></para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>telnet_transmit</function></funcdef> <paramdef><parameter>dest</parameter> <parameter>file</parameter> @@ -2308,7 +2308,7 @@ <para></para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>tip_open</function></funcdef> <paramdef><parameter>hostname</parameter></paramdef> </funcsynopsis> @@ -2325,7 +2325,7 @@ <para></para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>rlogin_open</function></funcdef> <paramdef><parameter>arg</parameter></paramdef> </funcsynopsis> @@ -2342,7 +2342,7 @@ <para></para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>rlogin_spawn</function></funcdef> <paramdef><parameter>dest</parameter> <parameter>cmdline</parameter></paramdef> @@ -2364,7 +2364,7 @@ <para></para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>rsh_open</function></funcdef> <paramdef><parameter>hostname</parameter></paramdef> </funcsynopsis> @@ -2381,7 +2381,7 @@ <para></para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>rsh_download</function></funcdef> <paramdef><parameter>desthost</parameter> <parameter>srcfile</parameter> @@ -2408,7 +2408,7 @@ <para></para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>rsh_upload</function></funcdef> <paramdef><parameter>desthost</parameter> <parameter>srcfile</parameter> @@ -2435,7 +2435,7 @@ <para></para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>rsh_exec</function></funcdef> <paramdef><parameter>boardname</parameter> <parameter>cmd</parameter> @@ -2462,7 +2462,7 @@ <para></para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>ftp_open</function></funcdef> <paramdef><parameter>host</parameter></paramdef> </funcsynopsis> @@ -2479,7 +2479,7 @@ <para></para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>ftp_upload</function></funcdef> <paramdef><parameter>host</parameter> <parameter>remotefile</parameter> @@ -2506,7 +2506,7 @@ <para></para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>ftp_download</function></funcdef> <paramdef><parameter>host</parameter> <parameter>localfile</parameter> @@ -2533,7 +2533,7 @@ <para></para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>ftp_close</function></funcdef> <paramdef><parameter>host</parameter></paramdef> </funcsynopsis> @@ -2550,7 +2550,7 @@ <para></para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>tip_download</function></funcdef> <paramdef><parameter>spawnid</parameter> <parameter>file</parameter></paramdef> @@ -2587,7 +2587,7 @@ <para></para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>default_link</function></funcdef> <paramdef><parameter>board</parameter> <parameter>objects</parameter> @@ -2620,7 +2620,7 @@ <para></para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>default_target_assemble</function></funcdef> <paramdef><parameter>source</parameter> <parameter>destfile</parameter> @@ -2648,7 +2648,7 @@ <para></para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>default_target_compile</function></funcdef> <paramdef><parameter>source</parameter> <parameter>destfile</parameter> @@ -2680,7 +2680,7 @@ <para></para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>pop_config</function></funcdef> <paramdef><parameter>type</parameter></paramdef> </funcsynopsis> @@ -2697,7 +2697,7 @@ <para></para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>prune_warnings</function></funcdef> <paramdef><parameter>text</parameter></paramdef> </funcsynopsis> @@ -2714,7 +2714,7 @@ <para></para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>push_build</function></funcdef> <paramdef><parameter>name</parameter></paramdef> </funcsynopsis> @@ -2731,7 +2731,7 @@ <para></para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>push_config</function></funcdef> <paramdef><parameter>type</parameter> <parameter>name</parameter></paramdef> @@ -2753,7 +2753,7 @@ <para></para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>reboot_target</function></funcdef> <paramdef><parameter></parameter></paramdef> </funcsynopsis> @@ -2764,7 +2764,7 @@ <para></para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>target_assemble</function></funcdef> <paramdef><parameter>source destfile flags</parameter></paramdef> </funcsynopsis> @@ -2789,7 +2789,7 @@ <para></para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>target_compile</function></funcdef> <paramdef><parameter>source</parameter> <parameter>destfile</parameter> @@ -2825,7 +2825,7 @@ <para></para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>board_info</function></funcdef> <paramdef><parameter>machine</parameter> <parameter>op</parameter> @@ -2852,7 +2852,7 @@ <para></para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>host_info</function></funcdef> <paramdef><parameter>op</parameter> <parameter>args</parameter></paramdef> @@ -2874,7 +2874,7 @@ <para></para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>set_board_info</function></funcdef> <paramdef><parameter>entry</parameter> <parameter>value</parameter></paramdef> @@ -2897,7 +2897,7 @@ <para></para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>set_currtarget_info</function></funcdef> <paramdef><parameter>entry</parameter> <parameter>value</parameter></paramdef> @@ -2919,7 +2919,7 @@ <para></para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>target_info</function></funcdef> <paramdef><parameter>op</parameter> <parameter>args</parameter></paramdef> @@ -2941,7 +2941,7 @@ <para></para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>unset_board_info</function></funcdef> <paramdef><parameter>entry</parameter></paramdef> </funcsynopsis> @@ -2959,7 +2959,7 @@ <para></para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>unset_currtarget_info</function></funcdef> <paramdef><parameter>entry</parameter></paramdef> </funcsynopsis> @@ -2979,7 +2979,7 @@ an index into the <symbol>target_info</symbol> array and is set in the global config file.</para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>push_target</function></funcdef> <paramdef><parameter>name</parameter></paramdef> </funcsynopsis> @@ -2997,7 +2997,7 @@ <para>This unsets the current target connection.</para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>pop_target</function></funcdef> <paramdef><parameter></parameter></paramdef> </funcsynopsis> @@ -3009,7 +3009,7 @@ <para>This lists all the supported targets for this architecture.</para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>list_targets</function></funcdef> <paramdef><parameter></parameter></paramdef> </funcsynopsis> @@ -3024,7 +3024,7 @@ <symbol>target_info</symbol> array and is set in the global config file.</para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>push_host</function></funcdef> <paramdef><parameter>name</parameter></paramdef> </funcsynopsis> @@ -3041,7 +3041,7 @@ <para>This unsets the current host connection.</para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>pop_host</function></funcdef> <paramdef><parameter></parameter></paramdef> </funcsynopsis> @@ -3050,7 +3050,7 @@ <sect3 id=compile xreflabel="compile procedure"> <title>Compile Procedure</title> - <para>This invokes the compiler as set by CC to compile the + <para>This invokes the compiler as set by CC to compile the file <filename>file</filename>. The default options for many cross compilation targets are <emphasis>guessed</emphasis> by DejaGnu, and these options can be added to by passing in more parameters as @@ -3060,7 +3060,7 @@ then compiler is run on the remote host using <command>execute_anywhere</command>.</para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>compile</function></funcdef> <paramdef><parameter>file</parameter></paramdef> </funcsynopsis> @@ -3082,7 +3082,7 @@ host is not the same as the build machines, then then archiver is run on the remote host using <command>execute_anywhere</command>.</para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>archive</function></funcdef> <paramdef><parameter>file</parameter></paramdef> </funcsynopsis> @@ -3101,7 +3101,7 @@ aren't POSIX yet. Any parameters passed to <command>ranlib</command> are used in for the flags.</para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>ranlib</function></funcdef> <paramdef><parameter>file</parameter></paramdef> </funcsynopsis> @@ -3128,7 +3128,7 @@ output produced when the command was executed. This is used for running the tool to be tested, not a test case.</para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>execute_anywhere</function></funcdef> <paramdef><parameter>cmdline</parameter></paramdef> </funcsynopsis> @@ -3193,7 +3193,7 @@ <function>${tool}_start</function> (or makes other arrangements to run the tool).</para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>${tool}_start</function></funcdef> <paramdef><parameter></parameter></paramdef> </funcsynopsis> @@ -3219,7 +3219,7 @@ downloading. Test scripts call <function>${tool}_load</function>.</para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>${tool}_load</function></funcdef> <paramdef><parameter></parameter></paramdef> </funcsynopsis> @@ -3233,9 +3233,9 @@ session. You can also use <function>${tool}_exit</function> to remove any temporary files left over from the tests. <command>runtest</command> calls - <function>${tool}_exit</function>.</para> + <function>${tool}_exit</function>.</para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>${tool}_exit</function></funcdef> <paramdef><parameter></parameter></paramdef> </funcsynopsis> @@ -3250,7 +3250,7 @@ should consist of the full path name used for the tested tool, and its version number.</para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>${tool}_version</function></funcdef> <paramdef><parameter></parameter></paramdef> </funcsynopsis> @@ -3268,7 +3268,7 @@ directory a single directory that match an optional pattern. </para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>getdirs</function></funcdef> <paramdef><parameter>rootdir</parameter> <parameter>pattern</parameter></paramdef> @@ -3302,7 +3302,7 @@ result include all intervening subdirectory names. If no files match the pattern, then a NULL string is returned.</para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>find</function></funcdef> <paramdef><parameter>rootdir</parameter> <parameter>pattern</parameter></paramdef> @@ -3330,9 +3330,9 @@ <emphasis>PATH</emphasis>. It returns <emphasis>0</emphasis> if the binary is not in the path, or if there is no <emphasis>PATH</emphasis> environment variable. If <command>binary</command> is in the path, it - returns the full path to <command>binary</command>.</para> + returns the full path to <command>binary</command>.</para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>which</function></funcdef> <paramdef><parameter>file</parameter></paramdef> </funcsynopsis> @@ -3353,14 +3353,14 @@ <emphasis>regexp</emphasis>. The result is a list of all the lines that match. If no lines match, the result is an empty string. Specify <emphasis>regexp</emphasis> using the standard regular expression style - used by the Unix utility program grep.</para> + used by the Unix utility program grep.</para> <para>Use the optional third argument <emphasis>line</emphasis> to start lines in the result with the line number in <filename>filename</filename>. (This argument is simply an option flag; type it just as shown <option>--line</option>.)</para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>grep</function></funcdef> <paramdef><parameter>filename</parameter> <parameter>regexp</parameter> @@ -3375,12 +3375,12 @@ <term><parameter>regexp</parameter></term> <listitem><para>The Unix style regular expression (as used by the <command>grep</command> Unix utility) to search - for.</para></listitem> + for.</para></listitem> </varlistentry> <varlistentry> <term><parameter>--line</parameter></term> <listitem><para>Prefix the line number to each line where the - regexp matches.</para></listitem> + regexp matches.</para></listitem> </varlistentry> </variablelist> </sect3> @@ -3392,9 +3392,9 @@ Elements are fields delimited by spaces. The result is a copy of list, without any elements that match <emphasis>pattern</emphasis>. You can use the common shell wildcard characters to specify the - pattern.</para> + pattern.</para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>prune</function></funcdef> <paramdef><parameter>list</parameter> <parameter>pattern</parameter></paramdef> @@ -3423,7 +3423,7 @@ under Windows if you have Cygwin or another Unix subsystem for Windows installed.</para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>slay</function></funcdef> <paramdef><parameter>name</parameter></paramdef> </funcsynopsis> @@ -3442,7 +3442,7 @@ <para>This procedure takes the relative <emphasis>path</emphasis>, and converts it to an absolute path.</para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>absolute</function></funcdef> <paramdef><parameter>path</parameter></paramdef> </funcsynopsis> @@ -3462,7 +3462,7 @@ error it returns a <emphasis>1</emphasis>, otherwise it returns a <emphasis>0</emphasis>.</para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>psource</function></funcdef> <paramdef><parameter>file</parameter></paramdef> </funcsynopsis> @@ -3488,7 +3488,7 @@ pathname of the current testcase under consideration. This is used by tools like compilers where each testcase is a file.</para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>runtest_file_p</function></funcdef> <paramdef><parameter>runtests</parameter> <parameter>testcase</parameter></paramdef> @@ -3497,7 +3497,7 @@ <varlistentry> <term><parameter>runtests</parameter></term> <listitem><para>The list of patterns to compare against. - </para></listitem> + </para></listitem> </varlistentry> <varlistentry> <term><parameter>testcase</parameter></term> @@ -3514,7 +3514,7 @@ <symbol>verbose</symbol> is set, then it'll print the differences to the screen.</para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>diff</function></funcdef> <paramdef><parameter>file_1</parameter> <parameter>file_2</parameter></paramdef> @@ -3537,7 +3537,7 @@ <para>Sets the environment variable <emphasis>var</emphasis> to the value <emphasis>val</emphasis>.</para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>setenv</function></funcdef> <paramdef><parameter>var</parameter> <parameter>val</parameter></paramdef> @@ -3560,7 +3560,7 @@ <para>Unsets the environment variable <emphasis>var</emphasis>.</para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>unsetenv</function></funcdef> <paramdef><parameter>var</parameter></paramdef> </funcsynopsis> @@ -3579,7 +3579,7 @@ <para>Returns the value of <emphasis>var</emphasis> in the environment if it exists, otherwise it returns NULL.</para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>getenv</function></funcdef> <paramdef><parameter>var</parameter></paramdef> </funcsynopsis> @@ -3601,7 +3601,7 @@ is the message that is printed if a shared library is out of date.</para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>prune_system_crud</function></funcdef> <paramdef><parameter>system</parameter> <parameter>test</parameter></paramdef> @@ -3634,7 +3634,7 @@ <para></para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>libgloss_link_flags</function></funcdef> <paramdef><parameter>args</parameter></paramdef> </funcsynopsis> @@ -3652,7 +3652,7 @@ <para></para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>libgloss_include_flags</function></funcdef> <paramdef><parameter>args</parameter></paramdef> </funcsynopsis> @@ -3669,7 +3669,7 @@ <para></para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>newlib_link_flags</function></funcdef> <paramdef><parameter>args</parameter></paramdef> </funcsynopsis> @@ -3687,7 +3687,7 @@ <para></para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>newlib_include_flags</function></funcdef> <paramdef><parameter>args</parameter></paramdef> </funcsynopsis> @@ -3705,7 +3705,7 @@ <para></para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>libio_include_flags</function></funcdef> <paramdef><parameter>args</parameter></paramdef> </funcsynopsis> @@ -3722,7 +3722,7 @@ <para></para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>libio_link_flags</function></funcdef> <paramdef><parameter>args</parameter></paramdef> </funcsynopsis> @@ -3739,7 +3739,7 @@ <para></para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>g++_include_flags</function></funcdef> <paramdef><parameter>args</parameter></paramdef> </funcsynopsis> @@ -3756,7 +3756,7 @@ <para></para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>g++_link_flags</function></funcdef> <paramdef><parameter>args</parameter></paramdef> </funcsynopsis> @@ -3774,7 +3774,7 @@ <para></para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>libstdc++_include_flags</function></funcdef> <paramdef><parameter>args</parameter></paramdef> </funcsynopsis> @@ -3792,7 +3792,7 @@ <para></para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>libstdc++_link_flags</function></funcdef> <paramdef><parameter>args</parameter></paramdef> </funcsynopsis> @@ -3809,7 +3809,7 @@ <para></para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>get_multilibs</function></funcdef> <paramdef><parameter>args</parameter></paramdef> </funcsynopsis> @@ -3826,7 +3826,7 @@ <para></para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>find_binutils_prog</function></funcdef> <paramdef><parameter>name</parameter></paramdef> </funcsynopsis> @@ -3843,7 +3843,7 @@ <para></para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>find_gcc</function></funcdef> <paramdef><parameter></parameter></paramdef> </funcsynopsis> @@ -3854,7 +3854,7 @@ <para></para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>find_gcj</function></funcdef> <paramdef><parameter></parameter></paramdef> </funcsynopsis> @@ -3865,7 +3865,7 @@ <para></para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>find_g++</function></funcdef> <paramdef><parameter></parameter></paramdef> </funcsynopsis> @@ -3876,7 +3876,7 @@ <para></para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>find_g77</function></funcdef> <paramdef><parameter></parameter></paramdef> </funcsynopsis> @@ -3888,7 +3888,7 @@ <para></para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>process_multilib_options</function></funcdef> <paramdef><parameter>args</parameter></paramdef> </funcsynopsis> @@ -3906,7 +3906,7 @@ <para></para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>add_multilib_option</function></funcdef> <paramdef><parameter>args</parameter></paramdef> </funcsynopsis> @@ -3923,7 +3923,7 @@ <para></para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>find_gas</function></funcdef> <paramdef><parameter></parameter></paramdef> </funcsynopsis> @@ -3934,7 +3934,7 @@ <para></para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>find_ld</function></funcdef> <paramdef><parameter></parameter></paramdef> </funcsynopsis> @@ -3945,7 +3945,7 @@ <para></para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>build_wrapper</function></funcdef> <paramdef><parameter>gluefile</parameter></paramdef> </funcsynopsis> @@ -3963,7 +3963,7 @@ <para></para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>winsup_include_flags</function></funcdef> <paramdef><parameter>args</parameter></paramdef> </funcsynopsis> @@ -3980,7 +3980,7 @@ <para></para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>winsup_link_flags</function></funcdef> <paramdef><parameter>args</parameter></paramdef> </funcsynopsis> @@ -4006,7 +4006,7 @@ the values of the global variable names that match. It is abbreviated as <emphasis>dv</emphasis>.</para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>dumpvars</function></funcdef> <paramdef><parameter>vars</parameter></paramdef> </funcsynopsis> @@ -4025,7 +4025,7 @@ prints the values of the local variable names that match. It is abbreviated as <emphasis>dl</emphasis>.</para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>dumplocals</function></funcdef> <paramdef><parameter>args</parameter></paramdef> </funcsynopsis> @@ -4044,7 +4044,7 @@ prints the body of all procs that match. It is abbreviated as <emphasis>dp</emphasis>.</para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>dumprocs</function></funcdef> <paramdef><parameter>pattern</parameter></paramdef> </funcsynopsis> @@ -4064,7 +4064,7 @@ prints all the watchpoints. It is abbreviated as <emphasis>dw</emphasis>.</para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>dumpwatch</function></funcdef> <paramdef><parameter>pattern</parameter></paramdef> </funcsynopsis> @@ -4082,7 +4082,7 @@ <para></para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>watcharray</function></funcdef> <paramdef><parameter>element</parameter> <parameter>type</parameter></paramdef> @@ -4101,7 +4101,7 @@ <para></para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>watchvar</function></funcdef> <paramdef><parameter>var</parameter> <parameter>type</parameter></paramdef> @@ -4121,7 +4121,7 @@ <symbol>var</symbol> is unset. It is abbreviated as <emphasis>wu</emphasis>.</para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>watchunset</function></funcdef> <paramdef><parameter>arg</parameter></paramdef> </funcsynopsis> @@ -4138,9 +4138,9 @@ <para>This breaks program execution when the variable <symbol>var</symbol> is written. It is abbreviated as - <emphasis>ww</emphasis>.</para> + <emphasis>ww</emphasis>.</para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>watchwrite</function></funcdef> <paramdef><parameter>var</parameter></paramdef> </funcsynopsis> @@ -4159,7 +4159,7 @@ <symbol>var</symbol> is read. It is abbreviated as <emphasis>wr</emphasis>.</para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>watchread</function></funcdef> <paramdef><parameter>var</parameter></paramdef> </funcsynopsis> @@ -4177,7 +4177,7 @@ <para>This deletes a the watchpoint from the watch list. It is abbreviated as <emphasis>wd</emphasis>.</para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>watchdel</function></funcdef> <paramdef><parameter>args</parameter></paramdef> </funcsynopsis> @@ -4196,7 +4196,7 @@ <parameter>var</parameter>. It is abbreviated as <emphasis>p</emphasis>.</para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>print</function></funcdef> <paramdef><parameter>var</parameter></paramdef> </funcsynopsis> @@ -4214,7 +4214,7 @@ <para>This makes runtest exit. It is abbreviated as <emphasis>q</emphasis>.</para> - <funcsynopsis role="tcl"> + <funcsynopsis role="tcl"> <funcdef><function>quit</function></funcdef> <paramdef><parameter></parameter></paramdef> </funcsynopsis> @@ -4272,7 +4272,7 @@ <sect1 id=cunit xreflabel="C Unit Testing API"> <title>C Unit Testing API</title> - + <para>All of the functions that take a <parameter>msg</parameter> parameter use a C char * that is the message to be dislayed. There currently is no support for @@ -4281,11 +4281,11 @@ <sect2 id=passfunc xreflabel="pass function"> <title>Pass Function</title> - + <para>This prints a message for a successful test completion.</para> - <funcsynopsis role="C"> + <funcsynopsis role="C"> <funcdef><function>pass</function></funcdef> <paramdef><parameter>msg</parameter></paramdef> </funcsynopsis> @@ -4294,11 +4294,11 @@ <sect2 id=failfunc xreflabel="fail function"> <title>Fail Function</title> - + <para>This prints a message for an unsuccessful test completion.</para> - <funcsynopsis role="C"> + <funcsynopsis role="C"> <funcdef><function>fail</function></funcdef> <paramdef><parameter>msg</parameter></paramdef> </funcsynopsis> @@ -4311,7 +4311,7 @@ <para>This prints a message for an test case that isn't run for some technical reason.</para> - <funcsynopsis role="C"> + <funcsynopsis role="C"> <funcdef><function>untested</function></funcdef> <paramdef><parameter>msg</parameter></paramdef> </funcsynopsis> @@ -4325,7 +4325,7 @@ human to look over the results to determine what happened. </para> - <funcsynopsis role="C"> + <funcsynopsis role="C"> <funcdef><function>unresolved</function></funcdef> <paramdef><parameter>msg</parameter></paramdef> </funcsynopsis> @@ -4337,7 +4337,7 @@ <para>This prints out the total numbers of all the test state outputs.</para> - <funcsynopsis role="C"> + <funcsynopsis role="C"> <funcdef><function>totals</function></funcdef> <paramdef><parameter></parameter></paramdef> </funcsynopsis> @@ -4347,20 +4347,20 @@ <sect1 id=cppunit xreflabel="C++ Unit Testing API"> <title>C++ Unit Testing API</title> - + <para>All of the methods that take a <parameter>msg</parameter> parameter use a C char * or STL string, that is the message to be dislayed. There currently is no support for variable length arguments.</para> - + <sect2 id=passmeth xreflabel="pass method"> <title>Pass Method</title> <para>This prints a message for a successful test completion.</para> - <funcsynopsis role="C++"> + <funcsynopsis role="C++"> <funcdef><function>TestState::pass</function></funcdef> <paramdef><parameter>msg</parameter></paramdef> </funcsynopsis> @@ -4372,7 +4372,7 @@ <para>This prints a message for an unsuccessful test completion.</para> - <funcsynopsis role="C++"> + <funcsynopsis role="C++"> <funcdef><function>TestState::fail</function></funcdef> <paramdef><parameter>msg</parameter></paramdef> </funcsynopsis> @@ -4384,7 +4384,7 @@ <para>This prints a message for an test case that isn't run for some technical reason.</para> - <funcsynopsis role="C++"> + <funcsynopsis role="C++"> <funcdef><function>TestState::untested</function></funcdef> <paramdef><parameter>msg</parameter></paramdef> </funcsynopsis> @@ -4398,7 +4398,7 @@ human to look over the results to determine what happened. </para> - <funcsynopsis role="C++"> + <funcsynopsis role="C++"> <funcdef><function>TestState::unresolved</function></funcdef> <paramdef><parameter>msg</parameter></paramdef> </funcsynopsis> @@ -4410,7 +4410,7 @@ <para>This prints out the total numbers of all the test state outputs.</para> - <funcsynopsis role="C++"> + <funcsynopsis role="C++"> <funcdef><function>TestState::totals</function></funcdef> <paramdef><parameter></parameter></paramdef> </funcsynopsis> diff --git a/doc/runtest.1 b/doc/runtest.1 index dfd27ce..175cdbd 100644 --- a/doc/runtest.1 +++ b/doc/runtest.1 @@ -7,9 +7,9 @@ runtest \- the DejaGnu test driver program .SH DESCRIPTION .I DejaGnu is a framework for running test suites on GNU tools. It is written in -expect, which uses Tcl (Tool command language). +expect, which uses Tcl (Tool command language). .B runtest -is the test driver program; use it to control what tests to run, +is the test driver program; use it to control what tests to run, and variations on how to run them. You can find a comprehensive description of DejaGnu and \fBruntest\fR in @@ -20,7 +20,7 @@ or its Info version, .SH OPTIONS .TP .B --all -Print all test output to screen. By default, only unexpected results are +Print all test output to screen. By default, only unexpected results are displayed. .TP .BI --baud \ rate @@ -29,11 +29,11 @@ programs (like \fBtip\fR) don't use this value but instead use a separate initialization file. .TP .BI --connect \ type -The type of connection to use. The choices are -.BR rlogin , +The type of connection to use. The choices are +.BR rlogin , .BR telnet , -.BR rsh , -.BR kermit , +.BR rsh , +.BR kermit , .BR tip and .BR mondfe . @@ -56,7 +56,7 @@ Do not run the specified tests. .TP .BI --mail \ \'name1\ name2\ ...\' Electronic mail addresses to receive test results. -.TP +.TP .BI --name \ hostname The network hostname of the target board. .TP @@ -77,16 +77,16 @@ Reboot the target board when \fBruntest\fR initializes Turns on .B expect internal tracing to \fIN\fR levels deep. -.TP +.TP .BI --target \ type The configuration string for the target. -.TP +.TP .BI --tool \ toolname -Specify the tool to be tested. \fItoolname\fR controls the test suite +Specify the tool to be tested. \fItoolname\fR controls the test suite applied, and the associated initialization module. .TP .B --verbose,\ -v -Turns on more debugging output from test cases and DejaGnu utility code. +Turns on more debugging output from test cases and DejaGnu utility code. Use more than once to increase output further. .TP .B --version,\ -V diff --git a/doc/user.sgml b/doc/user.sgml index 1a4c7f2..5f71f85 100644 --- a/doc/user.sgml +++ b/doc/user.sgml @@ -1,11 +1,11 @@ <chapter id=gettingup> <title>Getting DejaGnu up and running</title> -<para>This chapter was originally written by Niklaus Giger (ngiger@mus.ch) because he lost a week to figure out how DejaGnu works and how to write a first test.</para> +<para>This chapter was originally written by Niklaus Giger (ngiger@mus.ch) because he lost a week to figure out how DejaGnu works and how to write a first test.</para> <para>Follow these instructions as closely a possible in order get a good insight into how DejaGnu works, else you might run into a lot of subtle problems. You have been warned.</para> <para>It should be no big problems installing DejaGnu using your package manager or from the source code. Under a Debian/GNU/Linux systems just type (as root) <programlisting>apt-get dejagnu</programlisting>. These examples were run on a primary machine with a AMD K6 and a Mac Powerbook G3 serving as a remote target.</para> -<para> The tests for Windows were run under Windows NT using the actual Cygwin version (1.3.x as of October 2001). It's target system was a PPC embedded system running vxWorks. +<para> The tests for Windows were run under Windows NT using the actual Cygwin version (1.3.x as of October 2001). It's target system was a PPC embedded system running vxWorks. </para> <sect1> @@ -25,20 +25,20 @@ dgt:~$ cd ~/dejagnu.test </title> <programlisting> -dgt:~/dejagnu.test$ runtest -WARNING: Couldn't find the global config file. -WARNING: No tool specified Test +dgt:~/dejagnu.test$ runtest +WARNING: Couldn't find the global config file. +WARNING: No tool specified Test Run By dgt on Sun Nov 25 17:07:03 2001 Native configuration is i586-pc-linux-gnu === tests === Schedule of variations: unix -Running target unix Using /usr/share/dejagnu/baseboards/unix.exp as board description file for target. -Using /usr/share/dejagnu/config/unix.exp as generic interface file for target. +Running target unix Using /usr/share/dejagnu/baseboards/unix.exp as board description file for target. +Using /usr/share/dejagnu/config/unix.exp as generic interface file for target. ERROR: Couldn't find tool config file for unix. === Summary ===</programlisting> <para>We will show you later how to get rid of all the WARNING- and ERROR-messages. The files testrun.sum and testrun.log have been created, which do not interest us at this point. Let's remove them.</para> -<programlisting>:~/dejagnu.test$ rm testrun.sum testrun.log +<programlisting>:~/dejagnu.test$ rm testrun.sum testrun.log </programlisting> </example> @@ -53,8 +53,8 @@ ERROR: Couldn't find tool config file for unix. <sect2> <title>Getting the source code for the calc example</title> -<para>If you are running a Debian distribution you can find the examples under /usr/share/doc/dejagnu/examples. -These examples seem to be missing in Red Hat's RPM. +<para>If you are running a Debian distribution you can find the examples under /usr/share/doc/dejagnu/examples. +These examples seem to be missing in Red Hat's RPM. In this case download the sources of DejaGnu and adjust the pathes to the DejaGnu examples accordingly.</para> </sect2> </sect1> @@ -62,7 +62,7 @@ In this case download the sources of DejaGnu and adjust the pathes to the DejaGn <sect1> <title>Create a minimal project, e.g. calc</title> -<para>In this section you will to start a small project, +<para>In this section you will to start a small project, using the sample application calc, which is part of your DejaGnu distribution</para> <sect2><title>A simple project without the GNU autotools</title> @@ -71,8 +71,8 @@ using the sample application calc, which is part of your DejaGnu distribution</p <para>The generated site.exp should like like:</para> <programlisting> -set tool calc -set srcdir . +set tool calc +set srcdir . set objdir /home/dgt/dejagnu.test </programlisting></sect2> @@ -96,27 +96,27 @@ dgt:~/dejagnu.test$ cp -r /usr/share/doc/dejagnu/examples/calc/\ dgt:~/dejagnu.test$ aclocal </programlisting> -<para>autoconf is another part of the auto-tools. +<para>autoconf is another part of the auto-tools. Run it to generate configure based on information contained in configure.in.</para> <programlisting> dgt:~/dejagnu.test$ autoconf </programlisting> -<para>autoheader is another part of the auto-tools. +<para>autoheader is another part of the auto-tools. Run it to generate calc.h.in. </para> <programlisting> dgt:~/dejagnu.test$ autoheader </programlisting> -<para>The Makefile.am of this example was developed as port of the DejaGnu -distribution. -Adapt Makefile.am for this test. Replace the line -“#noinst_PROGRAMS = calc” to -“bin_PROGRAMS = calc”. +<para>The Makefile.am of this example was developed as port of the DejaGnu +distribution. +Adapt Makefile.am for this test. Replace the line +“#noinst_PROGRAMS = calc” to +“bin_PROGRAMS = calc”. Change the RUNTESTDEFAULTFLAGS from -“$$srcdir/testsuite” to +“$$srcdir/testsuite” to “./testsuite”.</para> <para>Running automake at this point contains a series of warning in its output as shown in the following example:</para> @@ -125,22 +125,22 @@ Change the RUNTESTDEFAULTFLAGS from <title>Sample output of automake with missing files</title> <programlisting> dgt:~/dejagnu.test$ automake --add-missing -automake: configure.in: installing `./install-sh' -automake: configure.in: installing `./mkinstalldirs' -automake: configure.in: installing `./missing' -automake: Makefile.am: installing `./INSTALL' -automake: Makefile.am: required file `./NEWS' not found -automake: Makefile.am: required file `./README' not found -automake: Makefile.am: installing `./COPYING' -automake: Makefile.am: required file `./AUTHORS' not found -automake: Makefile.am: required file `./ChangeLog' not found -configure.in: 4: required file `./calc.h.in' not found +automake: configure.in: installing `./install-sh' +automake: configure.in: installing `./mkinstalldirs' +automake: configure.in: installing `./missing' +automake: Makefile.am: installing `./INSTALL' +automake: Makefile.am: required file `./NEWS' not found +automake: Makefile.am: required file `./README' not found +automake: Makefile.am: installing `./COPYING' +automake: Makefile.am: required file `./AUTHORS' not found +automake: Makefile.am: required file `./ChangeLog' not found +configure.in: 4: required file `./calc.h.in' not found Makefile.am:6: required directory ./doc does not exist </programlisting> </example> -<para>Create a empty directory doc and empty files -INSTALL, NEWS, README, AUTHORS, ChangeLog and COPYING. +<para>Create a empty directory doc and empty files +INSTALL, NEWS, README, AUTHORS, ChangeLog and COPYING. The default COPYING will point to the GNU Public License (GPL). In a real project it would be time to add some meaningfull text in each file. </para> @@ -150,33 +150,33 @@ In a real project it would be time to add some meaningfull text in each file. <title>Sample output of configure </title> <programlisting> -dgt:~/dejagnu.test$ ./configure -creating cache ./config.cache -checking whether to enable maintainer-specific portions of Makefiles... no -checking for a BSD compatible install... /usr/bin/install -c -checking whether build environment is sane... yes -checking whether make sets ${MAKE}... yes -checking for working aclocal... found -checking for working autoconf... found -checking for working automake... found -checking for working autoheader... found -checking for working makeinfo... found -checking for gcc... gcc checking whether the C compiler (gcc ) works... yes -checking whether the C compiler (gcc ) is a cross-compiler... no +dgt:~/dejagnu.test$ ./configure +creating cache ./config.cache +checking whether to enable maintainer-specific portions of Makefiles... no +checking for a BSD compatible install... /usr/bin/install -c +checking whether build environment is sane... yes +checking whether make sets ${MAKE}... yes +checking for working aclocal... found +checking for working autoconf... found +checking for working automake... found +checking for working autoheader... found +checking for working makeinfo... found +checking for gcc... gcc checking whether the C compiler (gcc ) works... yes +checking whether the C compiler (gcc ) is a cross-compiler... no checking whether we are using GNU C... yes -checking whether gcc accepts -g... yes -checking for a BSD compatible install... /usr/bin/install -c -checking how to run the C preprocessor... gcc -E -checking for stdlib.h... yes -checking for strcmp... yes -updating cache ./config.cache -creating ./config.status +checking whether gcc accepts -g... yes +checking for a BSD compatible install... /usr/bin/install -c +checking how to run the C preprocessor... gcc -E +checking for stdlib.h... yes +checking for strcmp... yes +updating cache ./config.cache +creating ./config.status creating Makefile creating calc.h </programlisting> </example> -<para>If you are familiar with GNU software, -this output should not contain any surprise to you. +<para>If you are familiar with GNU software, +this output should not contain any surprise to you. Any errors should be easy to fix for such a simple program.</para> <para>Build the calc executable:</para> @@ -185,13 +185,13 @@ Any errors should be easy to fix for such a simple program.</para> <title>Sample output building calc </title> <programlisting> -dgt:~/dejagnu.test$ make -gcc -DHAVE_CONFIG_H -I. -I. -I. -g -O2 -c calc.c +dgt:~/dejagnu.test$ make +gcc -DHAVE_CONFIG_H -I. -I. -I. -g -O2 -c calc.c gcc -g -O2 -o calc calc.o </programlisting> </example> -<para>You prepared a few files and then called some commands. +<para>You prepared a few files and then called some commands. Respecting the right order assures a automatic and correctly compiled calc program. The following example resumes the correct order.</para> <example> @@ -211,29 +211,29 @@ dgt:~/dejagnu.test$ make A sample session might look like this:</para> <programlisting> -dgt:~/dejagnu.test$ ./calc -calc: version -Version: 1.1 -calc:<emphasis> </emphasis>add 3 4 -7 +dgt:~/dejagnu.test$ ./calc +calc: version +Version: 1.1 +calc:<emphasis> </emphasis>add 3 4 +7 calc: multiply 3 4<emphasis> </emphasis> -12 +12 calc: multiply 2 4<emphasis> </emphasis> -12 +12 calc: quit </programlisting> <para>Look at the intentional bug that 2 times 4 equals 12.</para> -<para>The tests run by DejaGnu need a file called site.exp, -which is automatically generated if we call “make site.exp”. +<para>The tests run by DejaGnu need a file called site.exp, +which is automatically generated if we call “make site.exp”. This was the purpose of the “AUTOMAKE_OPTIONS = dejagnu” in Makefile.am.</para> <example> <title>Sample output generating a site.exp</title> <programlisting> -dgt: make site.exp -dgt:~/dejagnu.test$ make site.exp +dgt: make site.exp +dgt:~/dejagnu.test$ make site.exp Making a new site.exp file... </programlisting> </example> @@ -252,48 +252,48 @@ Making a new site.exp file... <title>Sample output of runtest in a configured directory</title> <programlisting> -dgt:~/dejagnu.test$ make check -make check-DEJAGNU -make[1]: Entering directory `/home/dgt/dejagnu.test' srcdir=`cd . && pwd`; export srcdir; \ -EXPECT=expect; export EXPECT; \ runtest=runtest; \ +dgt:~/dejagnu.test$ make check +make check-DEJAGNU +make[1]: Entering directory `/home/dgt/dejagnu.test' srcdir=`cd . && pwd`; export srcdir; \ +EXPECT=expect; export EXPECT; \ runtest=runtest; \ if /bin/sh -c "$runtest --version" > /dev/null 2>&1; then \ -$runtest --tool calc CALC=`pwd`/calc --srcdir ./testsuite ; \ -else echo "WARNING: could not find \`runtest'" 1>&2; :;\ -fi -WARNING: Couldn't find the global config file. -WARNING: Couldn't find tool init file -Test Run By dgt on Sun Nov 25 21:42:21 2001 +$runtest --tool calc CALC=`pwd`/calc --srcdir ./testsuite ; \ +else echo "WARNING: could not find \`runtest'" 1>&2; :;\ +fi +WARNING: Couldn't find the global config file. +WARNING: Couldn't find tool init file +Test Run By dgt on Sun Nov 25 21:42:21 2001 Native configuration is i586-pc-linux-gnu === calc tests === -Schedule of variations: +Schedule of variations: unix -Running target unix -Using /usr/share/dejagnu/baseboards/unix.exp as board description file for target. -Using /usr/share/dejagnu/config/unix.exp as generic interface file for target. +Running target unix +Using /usr/share/dejagnu/baseboards/unix.exp as board description file for target. +Using /usr/share/dejagnu/config/unix.exp as generic interface file for target. Using ./testsuite/config/unix.exp as tool-and-target-specific interface file. -Running ./testsuite/calc.test/calc.exp ... +Running ./testsuite/calc.test/calc.exp ... FAIL: multiply2 (bad match) === calc Summary === -# of expected passes 5 -# of unexpected failures 1 +# of expected passes 5 +# of unexpected failures 1 /home/Dgt/dejagnu.test/calc version Version: 1.1 -make[1]: *** [check-DEJAGNU] Fehler 1 +make[1]: *** [check-DEJAGNU] Fehler 1 make[1]: Leaving directory `/home/Dgt/dejagnu.test' make: *** [check-am] Fehler 2 </programlisting> </example> <para>Did you see the line “FAIL:“? The test cases for calc catch the bug in the calc.c file. Fix the error in calc.c later as the following examples assume a unchanged calc.c.</para> -<para>Examine the output files calc.sum and calc.log. +<para>Examine the output files calc.sum and calc.log. Try to understand the testcases written in ~/dejagnu.test/testsuite/calc.test/calc.exp. To understand Expect you might take a look at the book "Exploring Expect", -which is an excellent resource for learning and using Expect. (Pub: O'Reilly, ISBN 1-56592-090-2) -The book contains hundreds of examples and also includes a tutorial on Tcl. +which is an excellent resource for learning and using Expect. (Pub: O'Reilly, ISBN 1-56592-090-2) +The book contains hundreds of examples and also includes a tutorial on Tcl. Exploring Expect is 602 pages long. </para> </sect2> @@ -306,7 +306,7 @@ Exploring Expect is 602 pages long. </para> puts "I am ~/.dejagnurc" </programlisting> -<para>Rerun make check. Test whether the output contains "I am ~/.dejagnurc". +<para>Rerun make check. Test whether the output contains "I am ~/.dejagnurc". Create ~/my_dejagnu.exp and insert the following line:</para> <programlisting> @@ -319,16 +319,16 @@ puts "I am ~/my_dejagnu.exp" dgt:~/dejagnu.test$ export DEJAGNU=~/my_dejagnu.exp </programlisting> -<para>Run “make check” again. The output should not contain -“WARNING: Couldn't find the global config file.”. +<para>Run “make check” again. The output should not contain +“WARNING: Couldn't find the global config file.”. Create the sub-directory lib. Create the file “calc.exp” in it and insert the following line:</para> <programlisting> puts "I am lib/calc.exp" </programlisting> -<para>The last warning “WARNING: Couldn't find tool init file” -should not be part of the output of make check. +<para>The last warning “WARNING: Couldn't find tool init file” +should not be part of the output of make check. Create the directory ˜/boards. Create the file ˜/boards/standard.exp and insert the following line:</para> <programlisting> @@ -340,39 +340,39 @@ puts "I am boards/standard.exp" <example> <title>Sample output of runtest with the usual configuration files</title> <programlisting> -dgt:~/dejagnu.test$ make check +dgt:~/dejagnu.test$ make check <...> -fi -I am ~/.dejagnurc -I am ~/my_dejagnu.exp -I am lib/calc.exp -Test Run By dgt on Sun Nov 25 22:19:14 2001 +fi +I am ~/.dejagnurc +I am ~/my_dejagnu.exp +I am lib/calc.exp +Test Run By dgt on Sun Nov 25 22:19:14 2001 Native configuration is i586-pc-linux-gnu === calc tests === Using /home/Dgt/boards/standard.exp as standard board description\ -file for build. -I am ~/boards/standard.exp +file for build. +I am ~/boards/standard.exp Using /home/Dgt/boards/standard.exp as standard board description\ - file for host. -I am ~/boards/standard.exp + file for host. +I am ~/boards/standard.exp -Schedule of variations: +Schedule of variations: unix -Running target unix +Running target unix Using /home/Dgt/boards/standard.exp as standard board description\ - file for target. -I am ~/boards/standard.exp + file for target. +I am ~/boards/standard.exp Using /usr/share/dejagnu/baseboards/unix.exp as board description file\ -for target. +for target. <...> </programlisting> </example> <para>It is up to you to decide when and where to use any of the above -mentioned config files for customizing. -This chapters showed you where and in which order the different config +mentioned config files for customizing. +This chapters showed you where and in which order the different config files are run.</para> </sect2> @@ -402,17 +402,17 @@ set verbose 9 <title>Testing “Hello world” locally</title> <para>This test checks, whether the built-in shell command “echo Hello world” - will really write “Hello world” on the console. -Create the file ~/dejagnu.test/testsuite/calc.test/local_echo.exp. + will really write “Hello world” on the console. +Create the file ~/dejagnu.test/testsuite/calc.test/local_echo.exp. It should contain the following lines</para> <example> <title>A first (local) test case</title> <programlisting> -set test "Local Hello World" -send "echo Hello World" -expect { - -re "Hello World" { pass "$test" } +set test "Local Hello World" +send "echo Hello World" +expect { + -re "Hello World" { pass "$test" } } </programlisting> </example> @@ -426,26 +426,26 @@ expect { <para>Testing remote targets is a lot trickier especially if you are using an embedded target -which has no built in support for things like a compiler, ftp server or a Bash-shell. +which has no built in support for things like a compiler, ftp server or a Bash-shell. Before you can test calc on a remote target you have to acquire a few basics skills.</para> <sect2> <title>Setup telnet to your own host</title> -<para>The easiest remote host is usually the host you are working on. -In this example we will use telnet to login in your own workstation. -For security reason you should never have a telnet deamon running on +<para>The easiest remote host is usually the host you are working on. +In this example we will use telnet to login in your own workstation. +For security reason you should never have a telnet deamon running on machine connected on the internet, as password and usernames are transmitted - in clear text. + in clear text. We assume you know how to setup your machine for a telnet daemon.</para> -<para>Next try whether you may login in your own host by issuing the -command “telnet localhost.1”. In order to be able to +<para>Next try whether you may login in your own host by issuing the +command “telnet localhost.1”. In order to be able to distinguish between a normal session an a telnet login add the following lines to /home/dgt/.bashrc.</para> <programlisting> if [ "$REMOTEHOST" ] -then - PS1='remote:\w\$ ' +then + PS1='remote:\w\$ ' fi </programlisting> @@ -455,17 +455,17 @@ fi <title>Sample log of a telnet login to localhost</title> <programlisting> dgt:~/dejagnu.test$ telnet localhost -Trying 127.0.0.1... -Connected to 127.0.0.1. -Escape character is '^]'. -Debian GNU/Linux testing/unstable Linux +Trying 127.0.0.1... +Connected to 127.0.0.1. +Escape character is '^]'. +Debian GNU/Linux testing/unstable Linux K6Linux login: dgt -Password: -Last login: Sun Nov 25 22:46:34 2001 from localhost on pts/4 -Linux K6Linux 2.4.14 #1 Fre Nov 16 19:28:25 CET 2001 i586 unknown -No mail. +Password: +Last login: Sun Nov 25 22:46:34 2001 from localhost on pts/4 +Linux K6Linux 2.4.14 #1 Fre Nov 16 19:28:25 CET 2001 i586 unknown +No mail. remote:~$ exit -logout +logout Connection closed by foreign host. </programlisting> </example> @@ -473,23 +473,23 @@ Connection closed by foreign host. <sect2> <title>A test case for login via telnet</title> -<para>In order to define a correct setup we have add a line containing -“set target unix” either to ~/.dejagnurc or to ~/my_dejagnu.exp. +<para>In order to define a correct setup we have add a line containing +“set target unix” either to ~/.dejagnurc or to ~/my_dejagnu.exp. In ~/boards/standard.exp add the following four lines to define a few patterns for the DejaGnu telnet login procedure.</para> <example> <title>Defining a remote target board</title> <programlisting> -set_board_info shell_prompt "remote:" -set_board_info telnet_username "dgt" -set_board_info telnet_password "top_secret" +set_board_info shell_prompt "remote:" +set_board_info telnet_username "dgt" +set_board_info telnet_password "top_secret" set_board_info hostname "localhost" </programlisting> </example> -<para>As DejaGnu will be parsing the telnet session output for some well -known pattern the output there are a lot of things that can go wrong. +<para>As DejaGnu will be parsing the telnet session output for some well +known pattern the output there are a lot of things that can go wrong. If you have any problems verify your setup:</para> <itemizedlist> @@ -506,24 +506,24 @@ If you have any problems verify your setup:</para> <para>The LANG environment variable must be either empty or set to “C”. </para></listitem> </itemizedlist> -<para>To test the login via telnet write a sample test case. -Create the file ~/dejagnu.test/testsuite/calc.test/remote_echo.exp and +<para>To test the login via telnet write a sample test case. +Create the file ~/dejagnu.test/testsuite/calc.test/remote_echo.exp and add the following few lines:</para> <example> <title>DejaGnu script for logging in into a remote target</title> <programlisting> puts "this is remote_echo.exp target for $target " -target_info $target -#set verbose 9 -set shell_id [remote_open $target] -set test "Remote login to $target" +target_info $target +#set verbose 9 +set shell_id [remote_open $target] +set test "Remote login to $target" #set verbose 0 puts "Spawn id for remote shell is $shell_id" -if { $shell_id > 0 } { - pass "$test" -} else { - fail "Remote open to $target" +if { $shell_id > 0 } { + pass "$test" +} else { + fail "Remote open to $target" } </programlisting> </example> @@ -531,9 +531,9 @@ if { $shell_id > 0 } { <para>In the runtest output you should find something like:</para> <programlisting> -Running ./testsuite/calc.test/local_echo.exp ... -Running ./testsuite/calc.test/remote_echoo.exp ... -this is remote_echo.exp target is unix +Running ./testsuite/calc.test/local_echo.exp ... +Running ./testsuite/calc.test/remote_echoo.exp ... +this is remote_echo.exp target is unix Spawn id for remote shell is exp7 </programlisting> @@ -543,19 +543,19 @@ parse the input. </para></sect2> <sect2> <title>Remote testing “Hello world”</title> -<para>Next you will transform the above “hello world” example to -its remote equivalent. +<para>Next you will transform the above “hello world” example to +its remote equivalent. This can be done by adding the following lines to our file remote_echo.exp.</para> <example> <title>A first (local) remote "Hello world" test</title> <programlisting> -set test "Remote_send Hello World" +set test "Remote_send Hello World" set status [remote_send $target "echo \"Hello\" \"World\"\n" ] pass "$test" -set test "Remote_expect Hello World" -remote_expect $target 5 { - -re "Hello World" { pass "$test" } +set test "Remote_expect Hello World" +remote_expect $target 5 { + -re "Hello World" { pass "$test" } } </programlisting> </example> @@ -565,12 +565,12 @@ remote_expect $target 5 { <para>Have a look at the procedures in /usr/share/dejagnu/remote.exp to have an overview of the offered procedures and their features. </para> -<para>Now setup a real target. -In the following example we assume as target a PowerBook running Debian. -As above add a test user "dgt", install telnet and FTP servers. -In order to distinguish it from the host add the line -<programlisting>PS1='test:>'</programlisting> to /home/dgt/.bash_profile. -Also add a corresponding entry "powerbook" to /etc/hosts and verify that you +<para>Now setup a real target. +In the following example we assume as target a PowerBook running Debian. +As above add a test user "dgt", install telnet and FTP servers. +In order to distinguish it from the host add the line +<programlisting>PS1='test:>'</programlisting> to /home/dgt/.bash_profile. +Also add a corresponding entry "powerbook" to /etc/hosts and verify that you are able to ping, telnet and ftp to the target "powerbook".</para> <para>In order to let runtest run its test on the "powerbook" target change the following lines in ~/boards/standard.exp:</para> @@ -615,11 +615,11 @@ puts "status of remote_download ist $status" </programlisting> </example> -<para>After running runtest again, check whether the file dejagnu2 exists on the target. +<para>After running runtest again, check whether the file dejagnu2 exists on the target. This example will only work if the rcp command works with your target. -If you have a working FTP-server on the target you can use it by adding the +If you have a working FTP-server on the target you can use it by adding the following lines to ~/boards/standard.exp:</para> <example> @@ -637,8 +637,8 @@ set_board_info ftp_password "1234" <title>Preparing for crosscompilation</title> <para>For crosscompiling you need working binutils, gcc and a base library like -libc or glib for your target. -It is beyond the scope of this document to describe how to get it working. +libc or glib for your target. +It is beyond the scope of this document to describe how to get it working. The following examples assume a cross compiler for PowerPC which is called linux-powerpc-gcc. </para> @@ -646,12 +646,12 @@ The following examples assume a cross compiler for PowerPC which is called linux <programlisting> AM_CONFIG_HEADER(calc.h) -AC_CANONICAL_TARGET([]) +AC_CANONICAL_TARGET([]) AM_INIT_AUTOMAKE(calc, 1.1) </programlisting> -<para>You need to run automake 2.5 or later. -Depending on your installation calling autoconf2.5 instead of autoconf is not needed. +<para>You need to run automake 2.5 or later. +Depending on your installation calling autoconf2.5 instead of autoconf is not needed. The sequence to regenerate all files is:</para> <example> @@ -660,13 +660,13 @@ The sequence to regenerate all files is:</para> $ autoconf2.5 $ autoheader $ automake -$ ./configure --host=powerpc-linux --target=powerpc-linux +$ ./configure --host=powerpc-linux --target=powerpc-linux configure: WARNING: If you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used. checking build system type... ./config.guess: ./config.guess: No such file or directory configure: error: cannot guess build type; you must specify one $ cp /usr/share/automake/config.guess . -$ ./configure --host=powerpc-linux --target=powerpc-linux +$ ./configure --host=powerpc-linux --target=powerpc-linux configure: WARNING: If you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used. \ checking build system type... i586-pc-linux-gnu @@ -685,7 +685,7 @@ C Compiler flags: -g -O2 <para>Everything should be ready to recompile for the target:</para> <programlisting>$ make -powerpc-linux-gcc -DHAVE_CONFIG_H -I. -I. -I. -g -O2 -c calc.c +powerpc-linux-gcc -DHAVE_CONFIG_H -I. -I. -I. -g -O2 -c calc.c powerpc-linux-gcc -g -O2 -o calc calc.o </programlisting> @@ -755,7 +755,7 @@ powerpc-linux-gcc -g -O2 -o calc calc.o <filename>Makefile</filename>.</para> </sect1> - + <sect1 id=runtest xreflabel="Runtest"> <title>Runtest</title> @@ -792,14 +792,14 @@ powerpc-linux-gcc -g -O2 -o calc calc.o case to determine whether you should amend it to stop expecting failure.</para></listitem> </varlistentry> - + <varlistentry> <term>FAIL</term> <listitem><para>A test failed, although it was expected to succeed. This may indicate regress; inspect the test case and the failing software to ocate the bug.</para></listitem> </varlistentry> - + <varlistentry> <term>XFAIL</term> <listitem><para>A test failed, but it was expected to fail. This @@ -808,7 +808,7 @@ powerpc-linux-gcc -g -O2 -o calc calc.o by the test, the outcome is <emphasis>UNSUPPORTED</emphasis> instead.</para></listitem> </varlistentry> - + <varlistentry> <term>UNRESOLVED</term> <listitem><para>Output from a test requires manual inspection; the @@ -816,7 +816,7 @@ powerpc-linux-gcc -g -O2 -o calc calc.o example, your tests can report this outcome is when a test does not complete as expected.</para></listitem> </varlistentry> - + <varlistentry> <term>UNTESTED</term> <listitem><para>A test case is not yet complete, and in particular @@ -825,7 +825,7 @@ powerpc-linux-gcc -g -O2 -o calc calc.o ``tests'' that note explicitly the absence of a real test case for a particular property.</para></listitem> </varlistentry> - + <varlistentry> <term>UNSUPPORTED</term> <listitem><para>A test depends on a conditionally available feature @@ -1061,7 +1061,7 @@ powerpc-linux-gcc -g -O2 -o calc calc.o test. Executable tool names (and paths) are recorded in <filename>site.exp</filename> and you can override them by specifying Tcl variables on the command line.</para> - + <para>For example, including "<option>--tool</option> gcc" on the <emphasis>runtest</emphasis> command line runs tests from all test subdirectories whose names match <filename>gcc.*</filename>, and uses @@ -1072,7 +1072,7 @@ powerpc-linux-gcc -g -O2 -o calc calc.o <emphasis>GCC=binname</emphasis> on the <emphasis>runtest</emphasis> command line.</para></listitem> </varlistentry> - + <varlistentry> <term><option>--tool_exec [name]</option></term> <listitem><para>The path to the tool executable to @@ -1095,7 +1095,7 @@ powerpc-linux-gcc -g -O2 -o calc calc.o file, but not in the summary (<filename>*.sum</filename>) log file.</para></listitem> </varlistentry> - + <varlistentry> <term><option>--version</option> (-V)</term> <listitem><para>Prints out the version numbers of DejaGnu, @@ -1130,7 +1130,7 @@ powerpc-linux-gcc -g -O2 -o calc calc.o </varlistentry> <varlistentry> - <term><filename>testfile</filename>.exp="testfile1 ..."</term> + <term><filename>testfile</filename>.exp="testfile1 ..."</term> <listitem><para>Specify a subset of tests in a suite to run. For compiler or assembler tests, which often use a single <emphasis>.exp</emphasis> script covering many different source @@ -1185,7 +1185,7 @@ powerpc-linux-gcc -g -O2 -o calc calc.o /usr/latest/bin/gdb version 4.14.4 -nx </screen> - <para>You can use the option <emphasis>--srcdir</emphasis> to point to + <para>You can use the option <emphasis>--srcdir</emphasis> to point to some other directory containing a collection of tests:</para> <screen> @@ -1211,7 +1211,7 @@ powerpc-linux-gcc -g -O2 -o calc calc.o <filename>gdb.sum</filename> and <filename>gdb.log</filename>.)</para> </sect2> - </sect1> + </sect1> <sect1 id=outputfiles xreflabel="Output Files"> @@ -1270,7 +1270,7 @@ powerpc-linux-gcc -g -O2 -o calc calc.o FAIL: help run "r" abbreviation Running ./gdb.t10/crossload.exp ... PASS: m68k-elf (elf-big) explicit format; loaded - XFAIL: mips-ecoff (ecoff-bigmips) "ptype v_signed_char" signed C types + XFAIL: mips-ecoff (ecoff-bigmips) "ptype v_signed_char" signed C types === gdb Summary === # of expected passes 5 # of expected failures 1 @@ -1394,7 +1394,7 @@ powerpc-linux-gcc -g -O2 -o calc calc.o {command}? no break gdbme.c:34 Breakpoint 8 at 0x23d8: file gdbme.c, line 34. - (gdb) expect: does {break gdbme.c:34\r\nBreakpoint 8 at 0x23d8: + (gdb) expect: does {break gdbme.c:34\r\nBreakpoint 8 at 0x23d8: file gdbme.c, line 34.\r\n(gdb) } (spawn_id 6) match pattern {Breakpoint.*at.* file gdbme.c, line 34.*\(gdb\) $}? yes expect: set expect_out(0,start) {18} @@ -1417,7 +1417,7 @@ powerpc-linux-gcc -g -O2 -o calc calc.o <listitem><para>Empty output for the first attempted match. The first set of attempted matches shown ran against the output <emphasis>{}</emphasis> --- that is, no - output. <productname>Expect</productname> begins + output. <productname>Expect</productname> begins attempting to match the patterns supplied immediately; often, the first pass is against incomplete output (or completely before all output, as in this case).</para></listitem> @@ -1456,10 +1456,10 @@ powerpc-linux-gcc -g -O2 -o calc calc.o </sect2> </sect1> </chapter> - + <chapter id=Customizing xreflabel="Customizing DejaGnu"> <title>Customizing DejaGnu</title> - + <para>The site configuration file, <filename>site.exp</filename>, captures configuration-dependent values and propagates them to the DejaGnu test environment using Tcl variables. This ties the @@ -1494,7 +1494,7 @@ powerpc-linux-gcc -g -O2 -o calc calc.o either rely on and use, or override, any of the global values from the global <filename>site.exp</filename> file.</para> - <para>You can usually generate or update the testsuite's local + <para>You can usually generate or update the testsuite's local <filename>site.exp</filename> by typing <command>make site.exp</command> in the testsuite directory, after the test suite is configured.</para> @@ -1513,7 +1513,7 @@ powerpc-linux-gcc -g -O2 -o calc calc.o <sect1 id=local xreflabel="Local Config File"> <title>Local Config File</title> - + <para>It is usually more convenient to keep these <emphasis>manual overrides</emphasis> in the <filename>site.exp</filename> local to each test directory, rather than in the global @@ -1579,7 +1579,7 @@ powerpc-linux-gcc -g -O2 -o calc calc.o <example> <title>Local Config File</title> - <programlisting> + <programlisting> ## these variables are automatically generated by make ## # Do not edit here. If you wish to override these values # add them to the last section @@ -1594,8 +1594,8 @@ powerpc-linux-gcc -g -O2 -o calc calc.o set tmpdir /build/devo-builds/i586-pc-linux-gnulibc1/gcc/testsuite set srcdir "${srcdir}/testsuite" ## All variables above are generated by configure. Do Not Edit ## - - </programlisting> + + </programlisting> </example> <para>This file defines the required fields for a local config @@ -1608,7 +1608,7 @@ powerpc-linux-gcc -g -O2 -o calc calc.o </sect1> <sect1 id=global xreflabel="Global Config File"> <title>Global Config File</title> - + <para>The master config file is where all the target specific config variables for a whole site get set. The idea is that for a centralized testing lab where people have to share a @@ -1686,7 +1686,7 @@ powerpc-linux-gcc -g -O2 -o calc calc.o <sect1 id=boardconfig xreflabel="Board Config File"> <title>Board Config File</title> - + <para>The board config file is where board specfic config data is stored. A board config file contains all the higher-level configuration settings. There is a rough inheritance scheme, where it is @@ -1896,7 +1896,7 @@ powerpc-linux-gcc -g -O2 -o calc calc.o <sect1 id=configfile xreflabel="Config File Values"> <title>Config File Values</title> - + <para>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 @@ -1911,7 +1911,7 @@ powerpc-linux-gcc -g -O2 -o calc calc.o variables captured in the first section, but also specify default values for all on the <command>runtest</command> command line options. Save for <option>--debug</option>, - <option>--help</option>, and <option>--version</option>, each + <option>--help</option>, and <option>--version</option>, each command line option has an associated Tcl variable. Use the Tcl <command>set</command> command to specify a new default value (as for the configuration variables). The following @@ -2032,7 +2032,7 @@ powerpc-linux-gcc -g -O2 -o calc calc.o <sect2 id=personal xreflabel="Personal Config File"> <title>Personal Config File</title> - + <para>The personal config file is used to customize <command>runtest's</command> behaviour for each person. It's typically used to set the user prefered setting for verbosity, @@ -2063,13 +2063,13 @@ powerpc-linux-gcc -g -O2 -o calc calc.o </sect1> </chapter> - + <chapter id=Extending xreflabel="Extending DejaGnu"> <title>Extending DejaGnu</title> - + <sect1 id=addsuite xreflabel="Adding a new Testsuite"> <title>Adding A New Testsuite</title> - + <para>The testsuite for a new tool should always be located in that tools source directory. DejaGnu require the directory be named <filename>testsuite</filename>. Under this directory, the test cases go @@ -2081,7 +2081,7 @@ powerpc-linux-gcc -g -O2 -o calc calc.o <sect1 id=addtool xreflabel="Adding A New Tool"> <title>Adding A New Tool</title> - + <para>In general, the best way to learn how to write (code or even prose) is to read something similar. This principle applies to test cases and to testsuites. Unfortunately, well-established testsuites have a way @@ -2109,11 +2109,11 @@ powerpc-linux-gcc -g -O2 -o calc calc.o steps to begin building a testsuite for a program example.</para> <itemizedlist mark=bullet> - + <listitem><para>Create or select a directory to contain your new collection of tests. Change into that directory (shown here as <filename>testsuite</filename>):</para> - + <para>Create a <filename>configure.in</filename> file in this directory, to control configuration-dependent choices for your tests. So far as DejaGnu is concerned, the important thing is to set a value for the @@ -2164,10 +2164,10 @@ powerpc-linux-gcc -g -O2 -o calc calc.o # The flags to pass to runtest RUNTESTFLAGS = - # Execute the tests + # Execute the tests check: site.exp all $(RUNTEST) $(RUNTESTFLAGS) \ - --tool <symbol>${example}</symbol> --srcdir $(srcdir) + --tool <symbol>${example}</symbol> --srcdir $(srcdir) # Make the local config file site.exp: ./config.status Makefile @@ -2206,7 +2206,7 @@ powerpc-linux-gcc -g -O2 -o calc calc.o </programlisting> </example> </listitem> - + <listitem><para>Create a directory (in <filename>testsuite</filename>) called <filename>config</filename>. Make a <emphasis>Tool Init File</emphasis> in this directory. Its name must start with the @@ -2223,9 +2223,9 @@ powerpc-linux-gcc -g -O2 -o calc calc.o <example> <title>Simple Batch Program Tool Init File</title> - + <programlisting> - + proc foo_exit {} {} proc foo_version {} {} @@ -2321,7 +2321,7 @@ powerpc-linux-gcc -g -O2 -o calc calc.o <sect1 id=addtarget xreflabel="Adding A New Target"> <title>Adding A New Target</title> - + <para>DejaGnu has some additional requirements for target support, beyond the general-purpose provisions of configure. DejaGnu must actively communicate with the target, rather than simply generating or managing @@ -2365,7 +2365,7 @@ powerpc-linux-gcc -g -O2 -o calc calc.o <sect1 id=addboard xreflabel="Adding A New Board"> <title>Adding A New Board</title> - + <para>Adding a new board consists of creating a new board config file. Examples are in <filename>dejagnu/baseboards</filename>. Usually to make a new @@ -2386,7 +2386,7 @@ powerpc-linux-gcc -g -O2 -o calc calc.o contains other procedures used for a certain class of target. The board description file is where the board specfic settings go. Commonly there are similar target environments with just different - processors.</para> + processors.</para> <example> <title>Testing a New Board Config File</title> @@ -2403,7 +2403,7 @@ powerpc-linux-gcc -g -O2 -o calc calc.o testing in the build tree, because the executables to be tested are in the same tree as the new dejagnu files. The helper procedures are the ones in square braces - <emphasis>[]</emphasis>, which is the Tcl execution characters.</para> + <emphasis>[]</emphasis>, which is the Tcl execution characters.</para> <example> <title>Example Board Config File</title> @@ -2784,7 +2784,7 @@ powerpc-linux-gcc -g -O2 -o calc calc.o <sect1 id=writing xreflabel="Writing A Test Case"> <title>Writing A Test Case</title> - + <para>The easiest way to prepare a new test case is to base it on an existing one for a similar situation. There are two major categories of tests: batch or interactive. Batch oriented tests @@ -2842,7 +2842,7 @@ powerpc-linux-gcc -g -O2 -o calc calc.o <sect1 id=debugging xreflabel="Debugging A Test Case"> <title>Debugging A Test Case</title> - + <para>These are the kinds of debugging information available from DejaGnu:</para> @@ -2899,7 +2899,7 @@ powerpc-linux-gcc -g -O2 -o calc calc.o <sect1 id=adding xreflabel="Adding A Test Case To A Testsuite"> <title>Adding A Test Case To A Testsuite.</title> - + <para>There are two slightly different ways to add a test case. One is to add the test case to an existing directory. The other is to create a new directory to hold your test. The @@ -2948,14 +2948,14 @@ powerpc-linux-gcc -g -O2 -o calc calc.o <listitem><para>To add support in the new directory for configure and make, you must also create a <filename>Makefile.in</filename> and a - <filename>configure.in</filename>.</para></listitem> + <filename>configure.in</filename>.</para></listitem> </itemizedlist> </sect1> <sect1 id=hints xreflabel="Hints On Writing A Test Case"> <title>Hints On Writing A Test Case</title> - + <para>It is safest to write patterns that match all the output generated by the tested program; this is called closure. If a pattern does not match the entire output, any output that @@ -3014,7 +3014,7 @@ powerpc-linux-gcc -g -O2 -o calc calc.o <sect1 id=tvariables xreflabel="Test Case Variables"> <title>Special variables used by test cases.</title> - + <para>There are special variables used by test cases. These contain other information from DejaGnu. Your test cases can use these variables, with conventional meanings (as well as the variables saved in @@ -3063,20 +3063,20 @@ powerpc-linux-gcc -g -O2 -o calc calc.o <function>${tool}_start</function> command. This is conventionally used for batch oriented programs, like GCC and GAS, that may produce interesting output (warnings, errors) without further - interaction.</para></listitem> + interaction.</para></listitem> </varlistentry> </variablelist> </sect1> - + </chapter> <chapter id=unit xreflabel="Unit Testing"> <title>Unit Testing</title> - + <sect1 id=unittest xreflabel="What Is Unit Testing ?"> <title>What Is Unit Testing ?</title> - + <para>Most regression testing as done by DejaGnu is system testing. This is the complete application is tested all at once. Unit testing is for testing single files, or small @@ -3095,7 +3095,7 @@ powerpc-linux-gcc -g -O2 -o calc calc.o <sect1 id=djh xreflabel="The dejagnu.h Header File"> <title>The dejagnu.h Header File</title> - + <para>DejaGnu uses a single header file to assist in unit testing. As this file also produces it's one test state output, it can be run standalone, which is very useful for testing on @@ -3107,7 +3107,7 @@ powerpc-linux-gcc -g -O2 -o calc calc.o messages, and then merge them into DejaGnu's.</para> </sect1> - + </chapter> <!-- Keep this comment at the end of the file |