From 9be9665de1bb8c36f9d9835d442a6e0352336cfe Mon Sep 17 00:00:00 2001 From: Ben Elliston Date: Sun, 17 Aug 2003 23:00:06 +0000 Subject: [PATCH] More trailing whitespace. --- baseboards/frv-sim.exp | 2 +- baseboards/mips-idt.exp | 2 +- baseboards/mips64-sim.exp | 2 +- baseboards/mmixware-sim.exp | 4 +- baseboards/sh-hms.exp | 2 +- baseboards/unix.exp | 2 +- baseboards/usparc-cygmon.exp | 2 +- baseboards/xtensa-sim.exp | 4 +- config/arc.exp | 6 +- config/arm-ice.exp | 6 +- config/base-config.exp | 6 +- config/base68k.exp | 6 +- config/bug.exp | 4 +- config/cfdbug.exp | 4 +- config/cygmon.exp | 6 +- config/d10v.exp | 6 +- config/ddb.exp | 8 +- config/default.exp | 6 +- config/dos.exp | 18 +- config/dve.exp | 4 +- config/gdb-comm.exp | 6 +- config/h8300.exp | 6 +- config/i386-bozo.exp | 6 +- config/i960.exp | 14 +- config/m32r-stub.exp | 6 +- config/m32r.exp | 6 +- config/m68hc11.exp | 6 +- config/m68k-emc.exp | 4 +- config/mips-idt.exp | 4 +- config/mn10200-eval.exp | 4 +- config/mn10300-eval.exp | 4 +- config/powerpc-bug.exp | 6 +- config/proelf.exp | 6 +- config/rom68k.exp | 4 +- config/sh.exp | 6 +- config/sid.exp | 4 +- config/slite.exp | 4 +- config/sparclet.exp | 4 +- config/tic80.exp | 4 +- config/udi.exp | 8 +- config/vr4100.exp | 6 +- config/vr4300.exp | 6 +- config/vr5000.exp | 6 +- config/vrtx.exp | 4 +- doc/Makefile.am | 4 +- doc/Makefile.in | 4 +- doc/dejagnu.texi | 84 +++--- doc/overview.sgml | 24 +- doc/overview/addtool.html | 8 +- doc/overview/builtins.html | 6 +- doc/overview/configfile.html | 4 +- doc/overview/customizing.html | 8 +- doc/overview/designgoals.html | 6 +- doc/overview/gettingup.html | 16 +- doc/overview/outputfiles.html | 8 +- doc/overview/runtest.html | 4 +- doc/overview/x227.html | 120 ++++---- doc/overview/x276.html | 100 +++---- doc/overview/x319.html | 122 ++++---- doc/ref.sgml | 426 +++++++++++++-------------- doc/runtest.1 | 24 +- doc/user.sgml | 464 +++++++++++++++--------------- example/calc/Makefile.in | 6 +- example/calc/calc.1 | 2 +- example/calc/testsuite/calc.test/calc.exp | 6 +- example/calc/testsuite/config/unix.exp | 6 +- example/hello/Makefile.in | 2 +- example/hello/aclocal.m4 | 2 +- example/hello/depcomp | 4 +- example/hello/install-sh | 10 +- example/hello/testsuite/Makefile.am | 4 +- example/hello/testsuite/Makefile.in | 2 +- lib/debugger.exp | 6 +- lib/mondfe.exp | 10 +- lib/standard.exp | 6 +- lib/targetdb.exp | 6 +- lib/xsh.exp | 20 +- packaging/deb/rules | 2 +- testsuite/libdejagnu/Makefile.in | 2 +- testsuite/libdejagnu/tunit.exp | 6 +- testsuite/libdejagnu/unit.cc | 8 +- testsuite/runtest.all/default_procs.tcl | 2 +- testsuite/runtest.all/libs.exp | 6 +- testsuite/runtest.all/remote.test | 6 +- testsuite/runtest.all/stats-sub.exp | 6 +- testsuite/runtest.all/stats.exp | 4 +- testsuite/runtest.all/target.test | 6 +- testsuite/runtest.all/utils.test | 4 +- 88 files changed, 905 insertions(+), 905 deletions(-) diff --git a/baseboards/frv-sim.exp b/baseboards/frv-sim.exp index 5d800d3..93e0044 100644 --- a/baseboards/frv-sim.exp +++ b/baseboards/frv-sim.exp @@ -29,7 +29,7 @@ set_board_info noargs 1 set_board_info gdb,nosignals 1 set_board_info gdb,noresults 1 -# More time is needed +# More time is needed set_board_info gcc,timeout 800 set_board_info gdb,timeout 60 diff --git a/baseboards/mips-idt.exp b/baseboards/mips-idt.exp index 9cd10d0..7bc63e8 100644 --- a/baseboards/mips-idt.exp +++ b/baseboards/mips-idt.exp @@ -20,7 +20,7 @@ if { [board_info $board obj_format] == "ecoff" } { } # The idt interface can't return exit statuses, so gcc (ctorture et -# al) needs to do what it can to get them. +# al) needs to do what it can to get them. set_board_info needs_status_wrapper 1 # GDB needs to use "target mips" to talk to the board. diff --git a/baseboards/mips64-sim.exp b/baseboards/mips64-sim.exp index b3364bb..d1924d5 100644 --- a/baseboards/mips64-sim.exp +++ b/baseboards/mips64-sim.exp @@ -1,5 +1,5 @@ # This is a list of toolchains that are supported on this board. -set_board_info target_install {mips64vr4300-elf +set_board_info target_install {mips64vr4300-elf mips64-elf} # Load the generic configuration for this board. This will define a basic diff --git a/baseboards/mmixware-sim.exp b/baseboards/mmixware-sim.exp index 0c51502..1a94833 100644 --- a/baseboards/mmixware-sim.exp +++ b/baseboards/mmixware-sim.exp @@ -32,7 +32,7 @@ set_board_info is_simulator 1 # It isn't visible in the target triple, so we set it explicitly. The # *linked* format is currently mmo, but those cases where this matters we # can deal with separately. -set_board_info obj_format "elf" +set_board_info obj_format "elf" # The compiler used to build for this board. This has *nothing* to do # with what compiler is tested if we're testing gcc. @@ -46,7 +46,7 @@ set_board_info cflags "[newlib_include_flags]" # simulator does not allow code to be executed in the "normal" documented # data and stack segments. Use a somewhat magic number, so stack addresses # are easily recognized when debugging. -set_board_info ldflags "[newlib_link_flags] -Wl,--defsym,__Stack_start=0x1680a00000000000" +set_board_info ldflags "[newlib_link_flags] -Wl,--defsym,__Stack_start=0x1680a00000000000" # No linker script needed - the simulator is the main environment for this # target. diff --git a/baseboards/sh-hms.exp b/baseboards/sh-hms.exp index 662f1d4..88f7c21 100644 --- a/baseboards/sh-hms.exp +++ b/baseboards/sh-hms.exp @@ -30,7 +30,7 @@ set_board_info gdb_protocol "remote" # Jumping to start is how we get the program started in GDB. set_board_info gdb_run_command "jump start" # The remote target uses a GDB stub. -set_board_info use_gdb_stub 1 +set_board_info use_gdb_stub 1 # We can't do I/O. set_board_info gdb,noinferiorio 1 # Or signals. diff --git a/baseboards/unix.exp b/baseboards/unix.exp index a1b8005..38e43bb 100644 --- a/baseboards/unix.exp +++ b/baseboards/unix.exp @@ -12,7 +12,7 @@ set_board_info bmk,use_alarm 1 #set_board_info host_library_path "[file dirname [file dirname [file dirname [file dirname [file dirname [exec [find_gcc] --print-prog-name=cc1]]]]]]/lib" # Do not use -lm on Cygwin -if { [istarget "*-*-cygwin*"] } { +if { [istarget "*-*-cygwin*"] } { set_board_info mathlib "" } diff --git a/baseboards/usparc-cygmon.exp b/baseboards/usparc-cygmon.exp index 6584f57..4edbdfe 100644 --- a/baseboards/usparc-cygmon.exp +++ b/baseboards/usparc-cygmon.exp @@ -13,7 +13,7 @@ proc ${board}_init { dest } { if { $usparc_init_count == 3 } { return -1 } - + } remote_close $dest set shell_id [remote_open $dest] diff --git a/baseboards/xtensa-sim.exp b/baseboards/xtensa-sim.exp index 1b3a91b..c9ff8b5 100644 --- a/baseboards/xtensa-sim.exp +++ b/baseboards/xtensa-sim.exp @@ -4,7 +4,7 @@ load_generic_config "sim" # basic-sim.exp is a basic description for the standard Cygnus simulator. load_base_board_description "basic-sim" # Command to invoke the simulator -set_board_info sim xt-run +set_board_info sim xt-run setup_sim xtensa # No multilib flags needed by default. process_multilib_options "" @@ -19,4 +19,4 @@ set_board_info ldscript "" # The simulator doesn't return exit statuses and we need to indicate this. set_board_info needs_status_wrapper 1 # No support for signals on this target. -set_board_info gdb,nosignals 1 \ No newline at end of file +set_board_info gdb,nosignals 1 diff --git a/config/arc.exp b/config/arc.exp index 33c948e..5fc3501 100644 --- a/config/arc.exp +++ b/config/arc.exp @@ -4,15 +4,15 @@ # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. -# +# # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # Please email any bugs, comments, and/or additions to this file to: # bug-dejagnu@gnu.org diff --git a/config/arm-ice.exp b/config/arm-ice.exp index 1affda1..b6cb2b7 100644 --- a/config/arm-ice.exp +++ b/config/arm-ice.exp @@ -4,15 +4,15 @@ # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. -# +# # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # Please email any bugs, comments, and/or additions to this file to: # bug-dejagnu@gnu.org diff --git a/config/base-config.exp b/config/base-config.exp index dba347a..e994143 100644 --- a/config/base-config.exp +++ b/config/base-config.exp @@ -4,15 +4,15 @@ # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. -# +# # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # Please email any bugs, comments, and/or additions to this file to: # bug-dejagnu@gnu.org diff --git a/config/base68k.exp b/config/base68k.exp index f8fb361..65db43c 100644 --- a/config/base68k.exp +++ b/config/base68k.exp @@ -4,12 +4,12 @@ # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. -# +# # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. @@ -148,7 +148,7 @@ proc base68k_ld { dest prog } { if [board_info $dest exists download_response] { remote_expect $dest 5 { [board_info $dest download_response] { } - timeout { + timeout { perror "Download command never responded." return "unresolved" } diff --git a/config/bug.exp b/config/bug.exp index f4f6b44..45d0c0d 100644 --- a/config/bug.exp +++ b/config/bug.exp @@ -4,12 +4,12 @@ # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. -# +# # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. diff --git a/config/cfdbug.exp b/config/cfdbug.exp index d461576..610e672 100644 --- a/config/cfdbug.exp +++ b/config/cfdbug.exp @@ -4,12 +4,12 @@ # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. -# +# # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. diff --git a/config/cygmon.exp b/config/cygmon.exp index 7fb7dd1..dbde7f6 100644 --- a/config/cygmon.exp +++ b/config/cygmon.exp @@ -4,15 +4,15 @@ # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. -# +# # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # Please email any bugs, comments, and/or additions to this file to: # bug-dejagnu@gnu.org diff --git a/config/d10v.exp b/config/d10v.exp index 1affda1..b6cb2b7 100644 --- a/config/d10v.exp +++ b/config/d10v.exp @@ -4,15 +4,15 @@ # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. -# +# # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # Please email any bugs, comments, and/or additions to this file to: # bug-dejagnu@gnu.org diff --git a/config/ddb.exp b/config/ddb.exp index 1be4324..bb6a943 100644 --- a/config/ddb.exp +++ b/config/ddb.exp @@ -4,15 +4,15 @@ # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. -# +# # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # Please email any bugs, comments, and/or additions to this file to: # bug-dejagnu@gnu.org @@ -59,7 +59,7 @@ proc ${board}_init { dest } { remote_send $dest "set prompt \"NEC010> \"\n" exp_continue } - -re "NEC010> $" { + -re "NEC010> $" { set i 10 } timeout { } diff --git a/config/default.exp b/config/default.exp index 11177cb..0b2547c 100644 --- a/config/default.exp +++ b/config/default.exp @@ -4,15 +4,15 @@ # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. -# +# # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software -# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. # Please email any bugs, comments, and/or additions to this file to: # bug-dejagnu@prep.ai.mit.edu diff --git a/config/dos.exp b/config/dos.exp index 8fc3b13..02ce39f 100644 --- a/config/dos.exp +++ b/config/dos.exp @@ -4,15 +4,15 @@ # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. -# +# # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software -# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. # Please email any bugs, comments, and/or additions to this file to: # bug-dejagnu@gnu.org @@ -155,13 +155,13 @@ proc dos_prep_command { dest cmdline } { return $result } -# +# # Run CMDLINE on DESTHOST. We handle two cases; one is where we're at # a DOS prompt, and the other is where we're in GDB. # We run CMDLINE by creating a batchfile, downloading it, and then # executing it; this handles the case where the commandline is too # long for command.com to deal with. -# +# proc dos_exec { dest program pargs inp outp } { set cmdline "$program $pargs" @@ -212,7 +212,7 @@ proc dos_exec { dest program pargs inp outp } { return [list -1 "program execution failed"] } -# +# # Start CMDLINE executing on DEST. # There are two cases that we handle, one where we're at a DOS prompt # and the other is when the remote machine is running GDB. @@ -233,7 +233,7 @@ proc dos_start_command { cmdline dest } { set prefix "shell " set ok 1 } - -re "$shell_prompt" { + -re "$shell_prompt" { set ok 1 } default { } @@ -278,7 +278,7 @@ proc dos_send { dest string } { } } -# +# # Spawn PROGRAM on DEST, and return the spawn_id associated with the # connection; we can only spawn one command at a time. # @@ -414,7 +414,7 @@ proc dos_file { dest op args } { remote_exec $dest "del" "$x" } return - + } default { return [eval standard_file \{$dest\} \{$op\} $args] diff --git a/config/dve.exp b/config/dve.exp index 02a2643..49ae1a9 100644 --- a/config/dve.exp +++ b/config/dve.exp @@ -4,12 +4,12 @@ # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. -# +# # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. diff --git a/config/gdb-comm.exp b/config/gdb-comm.exp index 9d20509..5f28393 100644 --- a/config/gdb-comm.exp +++ b/config/gdb-comm.exp @@ -4,12 +4,12 @@ # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. -# +# # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. @@ -139,7 +139,7 @@ proc gdb_comm_go_idle { } { remote_send host "y\n" exp_continue } - -re "No exec.* file now.*$gdb_prompt $" { + -re "No exec.* file now.*$gdb_prompt $" { return 0 } default { diff --git a/config/h8300.exp b/config/h8300.exp index 1affda1..b6cb2b7 100644 --- a/config/h8300.exp +++ b/config/h8300.exp @@ -4,15 +4,15 @@ # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. -# +# # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # Please email any bugs, comments, and/or additions to this file to: # bug-dejagnu@gnu.org diff --git a/config/i386-bozo.exp b/config/i386-bozo.exp index 4e28116..30c3fa0 100644 --- a/config/i386-bozo.exp +++ b/config/i386-bozo.exp @@ -4,15 +4,15 @@ # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. -# +# # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # Please email any bugs, comments, and/or additions to this file to: # bug-dejagnu@gnu.org diff --git a/config/i960.exp b/config/i960.exp index c44c0f5..cf3a1bb 100644 --- a/config/i960.exp +++ b/config/i960.exp @@ -4,15 +4,15 @@ # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. -# +# # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # Please email any bugs, comments, and/or additions to this file to: # bug-dejagnu@gnu.org @@ -81,7 +81,7 @@ proc i960_ld { dest prog } { remote_binary $dest remote_send $dest "\n" remote_expect $dest 5 { - -re $shell_prompt { } + -re $shell_prompt { } } remote_send $dest "do\n" remote_expect $dest 5 { @@ -117,7 +117,7 @@ proc i960_ld { dest prog } { set result 1 remote_send $dest "\n" remote_expect $dest 1 { - -re "$shell_prompt" { + -re "$shell_prompt" { set result 0 exp_continue } @@ -160,14 +160,14 @@ proc i960_wait { dest timeout } { set status $expect_out(3,string) exp_continue } - -re "(.*)$shell_prompt" { + -re "(.*)$shell_prompt" { append output $expect_out(1,string) set bstatus [check_for_board_status output] if { $bstatus >= 0 } { set status $bstatus } } - -re "\[\r\n\]+" { + -re "\[\r\n\]+" { # Sometimes the board goes wacky in the head, and we have # to shoot it. append output $expect_out(buffer) diff --git a/config/m32r-stub.exp b/config/m32r-stub.exp index fa43509..1c28647 100644 --- a/config/m32r-stub.exp +++ b/config/m32r-stub.exp @@ -4,15 +4,15 @@ # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. -# +# # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # Please email any bugs, comments, and/or additions to this file to: # bug-dejagnu@gnu.org diff --git a/config/m32r.exp b/config/m32r.exp index 1affda1..b6cb2b7 100644 --- a/config/m32r.exp +++ b/config/m32r.exp @@ -4,15 +4,15 @@ # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. -# +# # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # Please email any bugs, comments, and/or additions to this file to: # bug-dejagnu@gnu.org diff --git a/config/m68hc11.exp b/config/m68hc11.exp index fa8097c..b9cf839 100644 --- a/config/m68hc11.exp +++ b/config/m68hc11.exp @@ -4,15 +4,15 @@ # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. -# +# # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # Please email any bugs, comments, and/or additions to this file to: # bug-dejagnu@gnu.org diff --git a/config/m68k-emc.exp b/config/m68k-emc.exp index 60bda42..b4206c7 100644 --- a/config/m68k-emc.exp +++ b/config/m68k-emc.exp @@ -4,12 +4,12 @@ # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. -# +# # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. diff --git a/config/mips-idt.exp b/config/mips-idt.exp index 76c7ca2..2543840 100644 --- a/config/mips-idt.exp +++ b/config/mips-idt.exp @@ -4,12 +4,12 @@ # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. -# +# # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. diff --git a/config/mn10200-eval.exp b/config/mn10200-eval.exp index 0f7a051..4b4262f 100644 --- a/config/mn10200-eval.exp +++ b/config/mn10200-eval.exp @@ -4,12 +4,12 @@ # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. -# +# # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. diff --git a/config/mn10300-eval.exp b/config/mn10300-eval.exp index 3405287..3e98803 100644 --- a/config/mn10300-eval.exp +++ b/config/mn10300-eval.exp @@ -4,12 +4,12 @@ # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. -# +# # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. diff --git a/config/powerpc-bug.exp b/config/powerpc-bug.exp index 1affda1..b6cb2b7 100644 --- a/config/powerpc-bug.exp +++ b/config/powerpc-bug.exp @@ -4,15 +4,15 @@ # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. -# +# # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # Please email any bugs, comments, and/or additions to this file to: # bug-dejagnu@gnu.org diff --git a/config/proelf.exp b/config/proelf.exp index 5c34681..e57ef1a 100644 --- a/config/proelf.exp +++ b/config/proelf.exp @@ -4,15 +4,15 @@ # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. -# +# # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # Please email any bugs, comments, and/or additions to this file to: # bug-dejagnu@gnu.org diff --git a/config/rom68k.exp b/config/rom68k.exp index 9e9d0ca..2aa0be6 100644 --- a/config/rom68k.exp +++ b/config/rom68k.exp @@ -4,12 +4,12 @@ # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. -# +# # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. diff --git a/config/sh.exp b/config/sh.exp index 1affda1..b6cb2b7 100644 --- a/config/sh.exp +++ b/config/sh.exp @@ -4,15 +4,15 @@ # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. -# +# # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # Please email any bugs, comments, and/or additions to this file to: # bug-dejagnu@gnu.org diff --git a/config/sid.exp b/config/sid.exp index fceaf0d..1a4ffdb 100644 --- a/config/sid.exp +++ b/config/sid.exp @@ -4,12 +4,12 @@ # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. -# +# # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. diff --git a/config/slite.exp b/config/slite.exp index 392e347..7755f1d 100644 --- a/config/slite.exp +++ b/config/slite.exp @@ -4,12 +4,12 @@ # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. -# +# # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. diff --git a/config/sparclet.exp b/config/sparclet.exp index 9f13e68..d1ad202 100644 --- a/config/sparclet.exp +++ b/config/sparclet.exp @@ -4,12 +4,12 @@ # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. -# +# # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. diff --git a/config/tic80.exp b/config/tic80.exp index feeb5f2..04dae68 100644 --- a/config/tic80.exp +++ b/config/tic80.exp @@ -4,12 +4,12 @@ # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. -# +# # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. diff --git a/config/udi.exp b/config/udi.exp index c7a7f07..f0d31e6 100644 --- a/config/udi.exp +++ b/config/udi.exp @@ -4,12 +4,12 @@ # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. -# +# # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. @@ -85,7 +85,7 @@ proc udi_load { dest prog args } { exp_continue } -re "\[\r\n\]+" { - if { ! $noappend } { + if { ! $noappend } { append output $expect_out(buffer) if { [string length $output] < 512000 } { exp_continue @@ -118,7 +118,7 @@ proc udi_load { dest prog args } { warning "Resetting $dest." remote_send $dest "r\n" remote_expect $dest 5 { - -re "r.*$shell_prompt.*" { + -re "r.*$shell_prompt.*" { verbose "Target reset." 2 } timeout { diff --git a/config/vr4100.exp b/config/vr4100.exp index 9a9bb0c..e2b1f6c 100644 --- a/config/vr4100.exp +++ b/config/vr4100.exp @@ -4,15 +4,15 @@ # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. -# +# # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # Please email any bugs, comments, and/or additions to this file to: # bug-dejagnu@gnu.org diff --git a/config/vr4300.exp b/config/vr4300.exp index 9a9bb0c..e2b1f6c 100644 --- a/config/vr4300.exp +++ b/config/vr4300.exp @@ -4,15 +4,15 @@ # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. -# +# # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # Please email any bugs, comments, and/or additions to this file to: # bug-dejagnu@gnu.org diff --git a/config/vr5000.exp b/config/vr5000.exp index b5338e3..0971a93 100644 --- a/config/vr5000.exp +++ b/config/vr5000.exp @@ -4,15 +4,15 @@ # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. -# +# # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # Please email any bugs, comments, and/or additions to this file to: # bug-dejagnu@gnu.org diff --git a/config/vrtx.exp b/config/vrtx.exp index 298a8e1..db2b644 100644 --- a/config/vrtx.exp +++ b/config/vrtx.exp @@ -4,12 +4,12 @@ # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. -# +# # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 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 @{@}? 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 (now 13 years old as of September 2003), who was a toddler during DejaGnu's beginnings. - + DejaGnu offers several advantages for testing: @@ -214,7 +214,7 @@ into another language, under the above conditions for modified versions. What's New In This Release - + 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. Windows Support - + To use DejaGnu on Windows, you need to first install the Cygwin 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: - + PASS A test has succeeded. That is, it demonstrated that the assertion is true. - + XFAIL POSIX 1003.3 does not incorporate the notion of @@ -365,7 +365,7 @@ into another language, under the above conditions for modified versions. PASS is in some sense more ambiguous than if XPASS is also used. - + FAIL A test has produced the bug it was intended to @@ -376,7 +376,7 @@ into another language, under the above conditions for modified versions. FAIL rather than XFAIL even if a failure was expected. - + UNRESOLVED A test produced indeterminate results. Usually, this @@ -426,7 +426,7 @@ into another language, under the above conditions for modified versions. - + UNTESTED A test was not run. This is a place-holder, used when there is no real test case yet. @@ -438,7 +438,7 @@ into another language, under the above conditions for modified versions. conditional: - + UNSUPPORTED 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 gethostname would never work on a target board running only a boot monitor. - + - + 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. - + &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 ${example} --srcdir $(srcdir) +> --srcdir $(srcdir) # Make the local config file site.exp: ./config.status Makefile @@ -355,7 +355,7 @@ WIDTH="90%" >
	  
+>
 	  proc foo_exit {} {}
 	  proc foo_version {} {}
 
@@ -593,4 +593,4 @@ VALIGN="top"
 >
\ 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. xfail 
+>
 	  writes in the log files a message beginning with
 	  Compile Procedure

This invokes the compiler as set by CC to compile the +>This invokes the compiler as set by CC to compile the file file \ 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 --version, each +>, each command line option has an associated Tcl variable. Use the Tcl \ 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 file.

You can usually generate or update the testsuite's local +>You can usually generate or update the testsuite's local site.exp

  
+>
       ## 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 ##
-    
+
       
\ 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" >, tip, +>, kermit, and mondfe for remote +> for remote communications.

\ 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%" >
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 ===
Getting the source code for the calc example

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.

\ 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. Expect 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).

\ 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 --srcdir to point to +> to point to some other directory containing a collection of tests:

\ 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

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

set tool calc 
-set srcdir . 
+>set tool calc
+set srcdir .
 set objdir /home/dgt/dejagnu.test

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.

autoheader is another part of the auto-tools. +>autoheader is another part of the auto-tools. Run it to generate calc.h.in.

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”.

Running automake at this point contains a series of warning in its output as shown in the following example:

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

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.

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

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.

Build the calc executable:

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

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.

dgt:~/dejagnu.test$ ./calc 
-calc: version 
-Version: 1.1 
+>dgt:~/dejagnu.test$ ./calc
+calc: version
+Version: 1.1
 calc: add 3 4 
-7 
+>add 3 4
+7
 calc: multiply 3 4 
-12 
+12
 calc: multiply 2 4 
-12 
+12
 calc: quit

Look at the intentional bug that 2 times 4 equals 12.

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.

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...
\ 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%" >
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

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.

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. 

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:

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:

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:

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.

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

\ 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" >

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.

Setup telnet to your own host

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.

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.

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.
 <...>
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" }
 }
if [ "$REMOTEHOST" ]
-then 
-   PS1='remote:\w\$ ' 
+then
+   PS1='remote:\w\$ '
 fi
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.
A test case for login via telnet

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.

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"

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:

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:

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"
 }
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
Remote testing “Hello world”

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.

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" }
 }

Have a look at the procedures in /usr/share/dejagnu/remote.exp to have an overview of the offered procedures and their features.

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
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".

In order to let runtest run its test on the "powerbook" target change the following lines in ~/boards/standard.exp:

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:

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.

Add AC_CANONICAL_TARGET in dejagnu.test/configure.in at the following location. Copy config.guess from /usr/share/automake to dejagnu.test.

AM_CONFIG_HEADER(calc.h)
-AC_CANONICAL_TARGET([]) 
+AC_CANONICAL_TARGET([])
 AM_INIT_AUTOMAKE(calc, 1.1)

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:

$ 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%" >
$ 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
\ 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 @@ Installation - + 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. @@ -60,7 +60,7 @@ suites. - + Installing DejaGnu @@ -132,7 +132,7 @@ - + open_logs @@ -143,7 +143,7 @@ - + close_logs @@ -162,7 +162,7 @@ passed a NULL string, then it returns the name of the build canonical configuration. - + isbuild pattern @@ -179,7 +179,7 @@ - + is_remote board @@ -199,7 +199,7 @@ the result is 1; otherwise the result is 0. - + is3way @@ -216,7 +216,7 @@ shorter nicknames supported by configure (but you can use wildcard characters, using shell syntax, to specify sets of names). - + ishost pattern @@ -241,7 +241,7 @@ NULL string, then it returns the name of the build canonical configuration. - + istarget args @@ -261,7 +261,7 @@ a 1; otherwise it returns a 0. - + isnative @@ -272,7 +272,7 @@ - + unknown args @@ -289,7 +289,7 @@ - + clone_output message @@ -306,7 +306,7 @@ - + reset_vars @@ -317,7 +317,7 @@ - + log_and_exit @@ -328,7 +328,7 @@ - + log_summary args @@ -345,7 +345,7 @@ - + cleanup @@ -379,7 +379,7 @@ applies to whatever test runs next, leading to surprising results. - + setup_xfail config bugid @@ -403,7 +403,7 @@ - + record_test type message @@ -434,7 +434,7 @@ was expected), appending the argument string. - + pass string @@ -454,9 +454,9 @@ writes in the log files a message beginning with FAIL (or XFAIL, if failure was expected), appending the argument - string. + string. - + fail string @@ -479,7 +479,7 @@ was expected), appending the argument string. - + xpass string @@ -496,13 +496,13 @@ Xfail Procedure Declares a test to have expectably - failed. xfail + failed. xfail writes in the log files a message beginning with XFAIL (or PASS, if success was expected), appending the argument string. - + xpass string @@ -524,7 +524,7 @@ PASS or FAIL into an UNRESOLVED. - + set_warning_threshold threshold @@ -545,7 +545,7 @@ value controls how many warning procedures can be called before becoming UNRESOLVED. - + get_warning_threshold @@ -573,9 +573,9 @@ is 0, then there are no further side effects to calling this function, and the following test outcome doesn't become UNRESOLVED. This can be used for errors with no - known side effects. + known side effects. - + warning string number @@ -615,7 +615,7 @@ doesn't become UNRESOLVED. This can be used for errors with no known side effects. - + perror string number @@ -648,7 +648,7 @@ such messages, but in cases where a message is needed in the log file regardless of the verbosity level use note. - + note string @@ -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. - + untested string @@ -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). - + unresolved string @@ -713,7 +713,7 @@ writes in the log file a message beginning with UNSUPPORTED, appending the argument string. - + unsupported string @@ -731,7 +731,7 @@ - + init_testcounts @@ -742,7 +742,7 @@ - + incr_count name args @@ -768,9 +768,9 @@ tools are installed using the same naming conventions: For example, for a cross compiler supporting the m68k-vxworks configuration, the result of transform gcc is - m68k-vxworks-gcc. + m68k-vxworks-gcc. - + transform toolname @@ -778,7 +778,7 @@ toolname The name of the cross-development program to - transform. + transform. @@ -804,7 +804,7 @@ conditional is true, or 0 if the conditional is false. - + check_conditional_xfail message targets @@ -836,7 +836,7 @@ 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. + match) then this conditional is de-activated. @@ -872,9 +872,9 @@ of configuration target names. It is only necessary to call clear_xfail if a test case ends without calling either pass or fail, after - calling setup_xfail. + calling setup_xfail. - + clear_xfail config @@ -902,7 +902,7 @@ to print string without a trailing newline. Use the optional argument if string begins with "-". - + verbose -log -x @@ -952,7 +952,7 @@ duplicate definitions, the last one loaded takes precedence over the earlier ones. - + load_lib filespec @@ -994,7 +994,7 @@ - + call_remote type proc @@ -1023,7 +1023,7 @@ - + check_for_board_status variable @@ -1040,7 +1040,7 @@ - + file_on_build op file @@ -1067,7 +1067,7 @@ - + file_on_host op file @@ -1094,7 +1094,7 @@ - + local_exec commandline inp @@ -1122,7 +1122,7 @@ - + remote_binary host @@ -1139,7 +1139,7 @@ - + remote_close shellid @@ -1161,7 +1161,7 @@ - + remote_download dest file @@ -1188,7 +1188,7 @@ - + remote_exec hostname program @@ -1215,7 +1215,7 @@ - + remote_expect board timeout @@ -1242,7 +1242,7 @@ - + remote_file dest args @@ -1264,7 +1264,7 @@ - + remote_ld dest prog @@ -1286,7 +1286,7 @@ - + remote_load dest prog @@ -1313,7 +1313,7 @@ - + remote_open type @@ -1342,7 +1342,7 @@ - + remote_pop_conn host @@ -1359,7 +1359,7 @@ - + remote_push_conn host @@ -1376,7 +1376,7 @@ - + remote_raw_binary host @@ -1393,7 +1393,7 @@ - + remote_raw_close host @@ -1410,7 +1410,7 @@ - + remote_raw_file dest args @@ -1432,7 +1432,7 @@ - + remote_raw_ld dest prog @@ -1454,7 +1454,7 @@ - + remote_raw_load dest prog @@ -1481,7 +1481,7 @@ - + remote_raw_open args @@ -1498,7 +1498,7 @@ - + remote_raw_send dest string @@ -1520,7 +1520,7 @@ - + remote_raw_spawn dest commandline @@ -1543,7 +1543,7 @@ - + remote_raw_transmit dest file @@ -1565,7 +1565,7 @@ - + remote_raw_wait dest timeout @@ -1587,7 +1587,7 @@ - + remote_reboot host @@ -1604,7 +1604,7 @@ - + remote_send dest string @@ -1626,7 +1626,7 @@ - + remote_spawn dest commandline @@ -1653,7 +1653,7 @@ - + remote_swap_conn host @@ -1670,7 +1670,7 @@ - + remote_transmit dest file @@ -1692,7 +1692,7 @@ - + remote_upload dest srcfile @@ -1719,7 +1719,7 @@ - + remote_wait dest timeout @@ -1741,7 +1741,7 @@ - + standard_close host @@ -1758,7 +1758,7 @@ - + standard_download dest file @@ -1785,7 +1785,7 @@ - + standard_exec hostname args @@ -1807,7 +1807,7 @@ - + standard_file destop - + standard_load dest prog @@ -1853,7 +1853,7 @@ - + standard_reboot host @@ -1870,7 +1870,7 @@ - + standard_send dest string @@ -1892,7 +1892,7 @@ - + standard_spawn dest commandline @@ -1914,7 +1914,7 @@ - + standard_transmit dest file @@ -1936,7 +1936,7 @@ - + standard_upload dest srcfile destfile @@ -1961,7 +1961,7 @@ - + standard_wait dest timeout @@ -1984,7 +1984,7 @@ - + unix_clean_filename dest file @@ -2007,7 +2007,7 @@ - + exit_remote_shell spawnid @@ -2024,7 +2024,7 @@ --> - + Procedures For Using Utilities to Connect @@ -2146,7 +2146,7 @@ - + kermit_open dest args @@ -2168,7 +2168,7 @@ - + kermit_command dest args @@ -2190,7 +2190,7 @@ - + kermit_send dest string args @@ -2215,7 +2215,7 @@ - + kermit_transmit dest file @@ -2242,7 +2242,7 @@ - + telnet_open hostname args @@ -2264,7 +2264,7 @@ - + telnet_binary hostname @@ -2281,7 +2281,7 @@ - + telnet_transmit dest file @@ -2308,7 +2308,7 @@ - + tip_open hostname @@ -2325,7 +2325,7 @@ - + rlogin_open arg @@ -2342,7 +2342,7 @@ - + rlogin_spawn dest cmdline @@ -2364,7 +2364,7 @@ - + rsh_open hostname @@ -2381,7 +2381,7 @@ - + rsh_download desthost srcfile @@ -2408,7 +2408,7 @@ - + rsh_upload desthost srcfile @@ -2435,7 +2435,7 @@ - + rsh_exec boardname cmd @@ -2462,7 +2462,7 @@ - + ftp_open host @@ -2479,7 +2479,7 @@ - + ftp_upload host remotefile @@ -2506,7 +2506,7 @@ - + ftp_download host localfile @@ -2533,7 +2533,7 @@ - + ftp_close host @@ -2550,7 +2550,7 @@ - + tip_download spawnid file @@ -2587,7 +2587,7 @@ - + default_link board objects @@ -2620,7 +2620,7 @@ - + default_target_assemble source destfile @@ -2648,7 +2648,7 @@ - + default_target_compile source destfile @@ -2680,7 +2680,7 @@ - + pop_config type @@ -2697,7 +2697,7 @@ - + prune_warnings text @@ -2714,7 +2714,7 @@ - + push_build name @@ -2731,7 +2731,7 @@ - + push_config type name @@ -2753,7 +2753,7 @@ - + reboot_target @@ -2764,7 +2764,7 @@ - + target_assemble source destfile flags @@ -2789,7 +2789,7 @@ - + target_compile source destfile @@ -2825,7 +2825,7 @@ - + board_info machine op @@ -2852,7 +2852,7 @@ - + host_info op args @@ -2874,7 +2874,7 @@ - + set_board_info entry value @@ -2897,7 +2897,7 @@ - + set_currtarget_info entry value @@ -2919,7 +2919,7 @@ - + target_info op args @@ -2941,7 +2941,7 @@ - + unset_board_info entry @@ -2959,7 +2959,7 @@ - + unset_currtarget_info entry @@ -2979,7 +2979,7 @@ an index into the target_info array and is set in the global config file. - + push_target name @@ -2997,7 +2997,7 @@ This unsets the current target connection. - + pop_target @@ -3009,7 +3009,7 @@ This lists all the supported targets for this architecture. - + list_targets @@ -3024,7 +3024,7 @@ target_info array and is set in the global config file. - + push_host name @@ -3041,7 +3041,7 @@ This unsets the current host connection. - + pop_host @@ -3050,7 +3050,7 @@ Compile Procedure - This invokes the compiler as set by CC to compile the + This invokes the compiler as set by CC to compile the file file. The default options for many cross compilation targets are guessed 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 execute_anywhere. - + compile file @@ -3082,7 +3082,7 @@ host is not the same as the build machines, then then archiver is run on the remote host using execute_anywhere. - + archive file @@ -3101,7 +3101,7 @@ aren't POSIX yet. Any parameters passed to ranlib are used in for the flags. - + ranlib file @@ -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. - + execute_anywhere cmdline @@ -3193,7 +3193,7 @@ ${tool}_start (or makes other arrangements to run the tool). - + ${tool}_start @@ -3219,7 +3219,7 @@ downloading. Test scripts call ${tool}_load. - + ${tool}_load @@ -3233,9 +3233,9 @@ session. You can also use ${tool}_exit to remove any temporary files left over from the tests. runtest calls - ${tool}_exit. + ${tool}_exit. - + ${tool}_exit @@ -3250,7 +3250,7 @@ should consist of the full path name used for the tested tool, and its version number. - + ${tool}_version @@ -3268,7 +3268,7 @@ directory a single directory that match an optional pattern. - + getdirs rootdir pattern @@ -3302,7 +3302,7 @@ result include all intervening subdirectory names. If no files match the pattern, then a NULL string is returned. - + find rootdir pattern @@ -3330,9 +3330,9 @@ PATH. It returns 0 if the binary is not in the path, or if there is no PATH environment variable. If binary is in the path, it - returns the full path to binary. + returns the full path to binary. - + which file @@ -3353,14 +3353,14 @@ regexp. The result is a list of all the lines that match. If no lines match, the result is an empty string. Specify regexp using the standard regular expression style - used by the Unix utility program grep. + used by the Unix utility program grep. Use the optional third argument line to start lines in the result with the line number in filename. (This argument is simply an option flag; type it just as shown .) - + grep filename regexp @@ -3375,12 +3375,12 @@ regexp The Unix style regular expression (as used by the grep Unix utility) to search - for. + for. --line Prefix the line number to each line where the - regexp matches. + regexp matches. @@ -3392,9 +3392,9 @@ Elements are fields delimited by spaces. The result is a copy of list, without any elements that match pattern. You can use the common shell wildcard characters to specify the - pattern. + pattern. - + prune list pattern @@ -3423,7 +3423,7 @@ under Windows if you have Cygwin or another Unix subsystem for Windows installed. - + slay name @@ -3442,7 +3442,7 @@ This procedure takes the relative path, and converts it to an absolute path. - + absolute path @@ -3462,7 +3462,7 @@ error it returns a 1, otherwise it returns a 0. - + psource file @@ -3488,7 +3488,7 @@ pathname of the current testcase under consideration. This is used by tools like compilers where each testcase is a file. - + runtest_file_p runtests testcase @@ -3497,7 +3497,7 @@ runtests The list of patterns to compare against. - + testcase @@ -3514,7 +3514,7 @@ verbose is set, then it'll print the differences to the screen. - + diff file_1 file_2 @@ -3537,7 +3537,7 @@ Sets the environment variable var to the value val. - + setenv var val @@ -3560,7 +3560,7 @@ Unsets the environment variable var. - + unsetenv var @@ -3579,7 +3579,7 @@ Returns the value of var in the environment if it exists, otherwise it returns NULL. - + getenv var @@ -3601,7 +3601,7 @@ is the message that is printed if a shared library is out of date. - + prune_system_crud system test @@ -3634,7 +3634,7 @@ - + libgloss_link_flags args @@ -3652,7 +3652,7 @@ - + libgloss_include_flags args @@ -3669,7 +3669,7 @@ - + newlib_link_flags args @@ -3687,7 +3687,7 @@ - + newlib_include_flags args @@ -3705,7 +3705,7 @@ - + libio_include_flags args @@ -3722,7 +3722,7 @@ - + libio_link_flags args @@ -3739,7 +3739,7 @@ - + g++_include_flags args @@ -3756,7 +3756,7 @@ - + g++_link_flags args @@ -3774,7 +3774,7 @@ - + libstdc++_include_flags args @@ -3792,7 +3792,7 @@ - + libstdc++_link_flags args @@ -3809,7 +3809,7 @@ - + get_multilibs args @@ -3826,7 +3826,7 @@ - + find_binutils_prog name @@ -3843,7 +3843,7 @@ - + find_gcc @@ -3854,7 +3854,7 @@ - + find_gcj @@ -3865,7 +3865,7 @@ - + find_g++ @@ -3876,7 +3876,7 @@ - + find_g77 @@ -3888,7 +3888,7 @@ - + process_multilib_options args @@ -3906,7 +3906,7 @@ - + add_multilib_option args @@ -3923,7 +3923,7 @@ - + find_gas @@ -3934,7 +3934,7 @@ - + find_ld @@ -3945,7 +3945,7 @@ - + build_wrapper gluefile @@ -3963,7 +3963,7 @@ - + winsup_include_flags args @@ -3980,7 +3980,7 @@ - + winsup_link_flags args @@ -4006,7 +4006,7 @@ the values of the global variable names that match. It is abbreviated as dv. - + dumpvars vars @@ -4025,7 +4025,7 @@ prints the values of the local variable names that match. It is abbreviated as dl. - + dumplocals args @@ -4044,7 +4044,7 @@ prints the body of all procs that match. It is abbreviated as dp. - + dumprocs pattern @@ -4064,7 +4064,7 @@ prints all the watchpoints. It is abbreviated as dw. - + dumpwatch pattern @@ -4082,7 +4082,7 @@ - + watcharray element type @@ -4101,7 +4101,7 @@ - + watchvar var type @@ -4121,7 +4121,7 @@ var is unset. It is abbreviated as wu. - + watchunset arg @@ -4138,9 +4138,9 @@ This breaks program execution when the variable var is written. It is abbreviated as - ww. + ww. - + watchwrite var @@ -4159,7 +4159,7 @@ var is read. It is abbreviated as wr. - + watchread var @@ -4177,7 +4177,7 @@ This deletes a the watchpoint from the watch list. It is abbreviated as wd. - + watchdel args @@ -4196,7 +4196,7 @@ var. It is abbreviated as p. - + print var @@ -4214,7 +4214,7 @@ This makes runtest exit. It is abbreviated as q. - + quit @@ -4272,7 +4272,7 @@ C Unit Testing API - + All of the functions that take a msg parameter use a C char * that is the message to be dislayed. There currently is no support for @@ -4281,11 +4281,11 @@ Pass Function - + This prints a message for a successful test completion. - + pass msg @@ -4294,11 +4294,11 @@ Fail Function - + This prints a message for an unsuccessful test completion. - + fail msg @@ -4311,7 +4311,7 @@ This prints a message for an test case that isn't run for some technical reason. - + untested msg @@ -4325,7 +4325,7 @@ human to look over the results to determine what happened. - + unresolved msg @@ -4337,7 +4337,7 @@ This prints out the total numbers of all the test state outputs. - + totals @@ -4347,20 +4347,20 @@ C++ Unit Testing API - + All of the methods that take a msg parameter use a C char * or STL string, that is the message to be dislayed. There currently is no support for variable length arguments. - + Pass Method This prints a message for a successful test completion. - + TestState::pass msg @@ -4372,7 +4372,7 @@ This prints a message for an unsuccessful test completion. - + TestState::fail msg @@ -4384,7 +4384,7 @@ This prints a message for an test case that isn't run for some technical reason. - + TestState::untested msg @@ -4398,7 +4398,7 @@ human to look over the results to determine what happened. - + TestState::unresolved msg @@ -4410,7 +4410,7 @@ This prints out the total numbers of all the test state outputs. - + TestState::totals 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 @@ Getting DejaGnu up and running -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. +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. 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. 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) apt-get dejagnu. These examples were run on a primary machine with a AMD K6 and a Mac Powerbook G3 serving as a remote target. - 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. + 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. @@ -25,20 +25,20 @@ dgt:~$ cd ~/dejagnu.test -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 === 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. -:~/dejagnu.test$ rm testrun.sum testrun.log +:~/dejagnu.test$ rm testrun.sum testrun.log @@ -53,8 +53,8 @@ ERROR: Couldn't find tool config file for unix. Getting the source code for the calc example -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. +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. @@ -62,7 +62,7 @@ In this case download the sources of DejaGnu and adjust the pathes to the DejaGn Create a minimal project, e.g. calc -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 A simple project without the GNU autotools @@ -71,8 +71,8 @@ using the sample application calc, which is part of your DejaGnu distribution

The generated site.exp should like like:
-set tool calc -set srcdir . +set tool calc +set srcdir . set objdir /home/dgt/dejagnu.test
@@ -96,27 +96,27 @@ dgt:~/dejagnu.test$ cp -r /usr/share/doc/dejagnu/examples/calc/\ dgt:~/dejagnu.test$ aclocal -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. dgt:~/dejagnu.test$ autoconf -autoheader is another part of the auto-tools. +autoheader is another part of the auto-tools. Run it to generate calc.h.in. dgt:~/dejagnu.test$ autoheader -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”. Running automake at this point contains a series of warning in its output as shown in the following example: @@ -125,22 +125,22 @@ Change the RUNTESTDEFAULTFLAGS from Sample output of automake with missing files 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 -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. @@ -150,33 +150,33 @@ In a real project it would be time to add some meaningfull text in each file. Sample output of configure -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 -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. Build the calc executable: @@ -185,13 +185,13 @@ Any errors should be easy to fix for such a simple program. Sample output building calc -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 -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. @@ -211,29 +211,29 @@ dgt:~/dejagnu.test$ make A sample session might look like this: -dgt:~/dejagnu.test$ ./calc -calc: version -Version: 1.1 -calc: add 3 4 -7 +dgt:~/dejagnu.test$ ./calc +calc: version +Version: 1.1 +calc: add 3 4 +7 calc: multiply 3 4 -12 +12 calc: multiply 2 4 -12 +12 calc: quit Look at the intentional bug that 2 times 4 equals 12. -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. Sample output generating a site.exp -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... @@ -252,48 +252,48 @@ Making a new site.exp file... Sample output of runtest in a configured directory -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 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. -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. 
@@ -306,7 +306,7 @@ Exploring Expect is 602 pages long.  puts "I am ~/.dejagnurc" -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: @@ -319,16 +319,16 @@ puts "I am ~/my_dejagnu.exp" dgt:~/dejagnu.test$ export DEJAGNU=~/my_dejagnu.exp -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: puts "I am lib/calc.exp" -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: @@ -340,39 +340,39 @@ puts "I am boards/standard.exp" Sample output of runtest with the usual configuration files -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. <...> 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. @@ -402,17 +402,17 @@ set verbose 9 Testing “Hello world” locally 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 A first (local) test case -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" } } @@ -426,26 +426,26 @@ expect { 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. Setup telnet to your own host -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. -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. if [ "$REMOTEHOST" ] -then - PS1='remote:\w\$ ' +then + PS1='remote:\w\$ ' fi @@ -455,17 +455,17 @@ fi Sample log of a telnet login to localhost 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. @@ -473,23 +473,23 @@ Connection closed by foreign host. A test case for login via telnet -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. Defining a remote target board -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" -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: @@ -506,24 +506,24 @@ If you have any problems verify your setup: The LANG environment variable must be either empty or set to “C”. -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: DejaGnu script for logging in into a remote target 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" } @@ -531,9 +531,9 @@ if { $shell_id > 0 } { In the runtest output you should find something like: -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 @@ -543,19 +543,19 @@ parse the input. Remote testing “Hello world” -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. A first (local) remote "Hello world" test -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" } } @@ -565,12 +565,12 @@ remote_expect $target 5 { Have a look at the procedures in /usr/share/dejagnu/remote.exp to have an overview of the offered procedures and their features. -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 -PS1='test:>' to /home/dgt/.bash_profile. -Also add a corresponding entry "powerbook" to /etc/hosts and verify that you +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 +PS1='test:>' 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". In order to let runtest run its test on the "powerbook" target change the following lines in ~/boards/standard.exp: @@ -615,11 +615,11 @@ puts "status of remote_download ist $status" -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: @@ -637,8 +637,8 @@ set_board_info ftp_password "1234" Preparing for crosscompilation 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. @@ -646,12 +646,12 @@ The following examples assume a cross compiler for PowerPC which is called linux AM_CONFIG_HEADER(calc.h) -AC_CANONICAL_TARGET([]) +AC_CANONICAL_TARGET([]) AM_INIT_AUTOMAKE(calc, 1.1) -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: @@ -660,13 +660,13 @@ The sequence to regenerate all files is: $ 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 Everything should be ready to recompile for the target: $ 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 @@ -755,7 +755,7 @@ powerpc-linux-gcc -g -O2 -o calc calc.o Makefile.
- + Runtest @@ -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. - + FAIL 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. - + XFAIL 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 UNSUPPORTED instead. - + UNRESOLVED 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. - + UNTESTED 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. - + UNSUPPORTED 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 site.exp and you can override them by specifying Tcl variables on the command line. - + For example, including " gcc" on the runtest command line runs tests from all test subdirectories whose names match gcc.*, and uses @@ -1072,7 +1072,7 @@ powerpc-linux-gcc -g -O2 -o calc calc.o GCC=binname on the runtest command line. - + 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 (*.sum) log file. - + (-V) Prints out the version numbers of DejaGnu, @@ -1130,7 +1130,7 @@ powerpc-linux-gcc -g -O2 -o calc calc.o - testfile.exp="testfile1 ..." + testfile.exp="testfile1 ..." Specify a subset of tests in a suite to run. For compiler or assembler tests, which often use a single .exp 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 - You can use the option --srcdir to point to + You can use the option --srcdir to point to some other directory containing a collection of tests: @@ -1211,7 +1211,7 @@ powerpc-linux-gcc -g -O2 -o calc calc.o gdb.sum and gdb.log.) - + @@ -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 Empty output for the first attempted match. The first set of attempted matches shown ran against the output {} --- that is, no - output. Expect begins + output. Expect 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). @@ -1456,10 +1456,10 @@ powerpc-linux-gcc -g -O2 -o calc calc.o - + Customizing DejaGnu - + The site configuration file, site.exp, 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 site.exp file. - You can usually generate or update the testsuite's local + You can usually generate or update the testsuite's local site.exp by typing make site.exp in the testsuite directory, after the test suite is configured. @@ -1513,7 +1513,7 @@ powerpc-linux-gcc -g -O2 -o calc calc.o Local Config File - + It is usually more convenient to keep these manual overrides in the site.exp local to each test directory, rather than in the global @@ -1579,7 +1579,7 @@ powerpc-linux-gcc -g -O2 -o calc calc.o Local Config File - + ## 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 ## - - + + This file defines the required fields for a local config @@ -1608,7 +1608,7 @@ powerpc-linux-gcc -g -O2 -o calc calc.o Global Config File - + 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 Board Config File - + 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 Config File Values - + 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 runtest command line options. Save for , - , and , each + , and , each command line option has an associated Tcl variable. Use the Tcl set command to specify a new default value (as for the configuration variables). The following @@ -2032,7 +2032,7 @@ powerpc-linux-gcc -g -O2 -o calc calc.o Personal Config File - + The personal config file is used to customize runtest's 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 - + Extending DejaGnu - + Adding A New Testsuite - + The testsuite for a new tool should always be located in that tools source directory. DejaGnu require the directory be named testsuite. Under this directory, the test cases go @@ -2081,7 +2081,7 @@ powerpc-linux-gcc -g -O2 -o calc calc.o Adding A New Tool - + 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. - + Create or select a directory to contain your new collection of tests. Change into that directory (shown here as testsuite): - + Create a configure.in 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 ${example} --srcdir $(srcdir) + --tool ${example} --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 - + Create a directory (in testsuite) called config. Make a Tool Init File in this directory. Its name must start with the @@ -2223,9 +2223,9 @@ powerpc-linux-gcc -g -O2 -o calc calc.o Simple Batch Program Tool Init File - + - + proc foo_exit {} {} proc foo_version {} {} @@ -2321,7 +2321,7 @@ powerpc-linux-gcc -g -O2 -o calc calc.o Adding A New Target - + 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 Adding A New Board - + Adding a new board consists of creating a new board config file. Examples are in dejagnu/baseboards. 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. + processors. Testing a New Board Config File @@ -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 - [], which is the Tcl execution characters. + [], which is the Tcl execution characters. Example Board Config File @@ -2784,7 +2784,7 @@ powerpc-linux-gcc -g -O2 -o calc calc.o Writing A Test Case - + 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 Debugging A Test Case - + These are the kinds of debugging information available from DejaGnu: @@ -2899,7 +2899,7 @@ powerpc-linux-gcc -g -O2 -o calc calc.o Adding A Test Case To A Testsuite. - + 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 To add support in the new directory for configure and make, you must also create a Makefile.in and a - configure.in. + configure.in. Hints On Writing A Test Case - + 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 Special variables used by test cases. - + 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 ${tool}_start command. This is conventionally used for batch oriented programs, like GCC and GAS, that may produce interesting output (warnings, errors) without further - interaction. + interaction. - + Unit Testing - + What Is Unit Testing ? - + 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 The dejagnu.h Header File - + 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. - +