From 6b5cde5bf1dfa159ed178e024f81006c5c507cf2 Mon Sep 17 00:00:00 2001 From: Ben Elliston Date: Sat, 16 Aug 2003 13:08:57 +0000 Subject: Whitespace fixes. --- .clean | 1 - ChangeLog.0 | 130 ++++++++++----------- baseboards/arm-sim.exp | 2 +- baseboards/mcore-moto-sim.exp | 4 +- baseboards/mn10300-cygmon.exp | 2 +- config/ddb-ether.exp | 8 +- config/gdb_stub.exp | 26 ++--- config/netware.exp | 8 +- config/sim.exp | 6 +- config/unix.exp | 8 +- config/vxworks.exp | 18 +-- contrib/bluegnu2.0.3/lib/bug.exp | 8 +- contrib/bluegnu2.0.3/lib/framework.exp | 52 ++++----- contrib/bluegnu2.0.3/lib/libgloss.exp | 18 +-- contrib/bluegnu2.0.3/lib/remote.exp | 52 ++++----- contrib/bluegnu2.0.3/lib/target.exp | 36 +++--- contrib/bluegnu2.0.3/lib/utils.exp | 48 ++++---- contrib/bluegnu2.0.3/lib/vxworks.exp | 14 +-- contrib/bluegnu2.0.3/runtest.exp | 24 ++-- .../bluegnu2.0.3/testsuite/bluegnu.all/options.exp | 6 +- contrib/bluegnu2.0.3/testsuite/config/default.exp | 8 +- contrib/bluegnu2.0.3/testsuite/lib/libsup.exp | 16 +-- example/hello/README | 40 +++---- lib/dejagnu.exp | 18 +-- lib/dg.exp | 12 +- lib/framework.exp | 66 +++++------ lib/ftp.exp | 8 +- lib/kermit.exp | 14 +-- lib/libgloss.exp | 14 +-- lib/remote.exp | 36 +++--- lib/rlogin.exp | 16 +-- lib/rsh.exp | 14 +-- lib/target.exp | 30 ++--- lib/telnet.exp | 10 +- lib/tip.exp | 12 +- lib/utils.exp | 46 ++++---- packaging/deb/changelog | 4 +- packaging/rpm/dejagnu.spec | 4 +- runtest.exp | 28 ++--- testsuite/config/default.exp | 10 +- testsuite/lib/libsup.exp | 18 +-- testsuite/runtest.all/config.test | 8 +- testsuite/runtest.all/options.exp | 8 +- 43 files changed, 455 insertions(+), 456 deletions(-) diff --git a/.clean b/.clean index 115bbd8..5b7eac5 100644 --- a/.clean +++ b/.clean @@ -33,4 +33,3 @@ stub-loader.c tcl-mode.el testglue.c testsuite - diff --git a/ChangeLog.0 b/ChangeLog.0 index e860404..06da7d4 100644 --- a/ChangeLog.0 +++ b/ChangeLog.0 @@ -77,7 +77,7 @@ 2002-08-30 Rob Savoye * configure.in: Add AC_NO_EXECUTABLES, so things configure without - building C++ executables. + building C++ executables. * example/hello/hello.c: New C version of the example. * example/hello/Makefile.am: Build C based example. * example/hello/configure.in: Add AC_NO_EXECUTABLES, so things @@ -145,7 +145,7 @@ Wed Jun 5 14:52:15 PDT 2002 Joey Ekstrom * runtest.exp: Add kfail_flag and kfail_prms variable initializations. - * lib/framework.exp (setup_kfail): New proc. Like setup_xfail, but + * lib/framework.exp (setup_kfail): New proc. Like setup_xfail, but for known tool bugs already registered in a bug database. (kfail): New proc. Record that a test has failed due to a known bug. (kpass): New proc. Record that a test for a known bug has passed @@ -180,7 +180,7 @@ Wed Jun 5 14:52:15 PDT 2002 Joey Ekstrom * example/calc/Makefile.in: Regenerate. 2002-03-22 Elena Zannoni - + * baseboards/powerpc-sim.exp: Don't disable inferior function calls. @@ -251,9 +251,9 @@ Wed Nov 21 18:02:49 PST 2001 Brendan Conoboy (libstdc++_include_flags): Add top level libstdc++-v3 build include path. -2001-11-10 Hans-Peter Nilsson +2001-11-10 Hans-Peter Nilsson - * baseboards/mmixware-sim.exp: New file. + * baseboards/mmixware-sim.exp: New file. * lib/remote.exp (check_for_board_status): Return 2 if the board uses a status wrapper and there was no match for the expected pattern. @@ -311,21 +311,21 @@ Thu Aug 30 19:31:44 2001 J"orn Rennecke directories as well as the basename. 2001-06-08 John Cotton - - * testglue.c: - * lib/remote.exp: - * lib/standard.exp: - * lib/target.exp: - * lib/utils.exp: + + * testglue.c: + * lib/remote.exp: + * lib/standard.exp: + * lib/target.exp: + * lib/utils.exp: * baseboards/mbx821_001.exp: * baseboards/mbx860_002.exp: * baseboards/mbx8xx.exp: - * baseboards/mvme167.exp: + * baseboards/mvme167.exp: Added support for automated testing of RTEMS targets, specifically the mbx821, mbx860 and mvme167. - -2001-06-08 John Cotton - + +2001-06-08 John Cotton + */lib/libgloss.exp: fixed regexp bug. 2001-05-30 Jeffrey Oldham @@ -366,7 +366,7 @@ Thu Aug 30 19:31:44 2001 J"orn Rennecke depending on the version. 2001-05-20 Stephane Carrez - + * baseboards/m68hc11-sim.exp: New file for 68HC11/68HC12 validation. * config/m68hc11.exp: New file. @@ -446,7 +446,7 @@ Thu Aug 30 19:31:44 2001 J"orn Rennecke * debian/rules: and install dejagnu.h 2001-05-01 Matt Hiller - + * lib/libgloss.exp (get_multilibs): Correction to Catherine Moore's patch of 2000-06-09. @@ -834,7 +834,7 @@ Mon May 3 11:14:37 1999 Jim Wilson 1999-04-23 Angela Marie Thomas * baseboards/cf.exp: gdb protocol is case-sensitive. - + 1999-04-19 Nick Clifton * baseboards/Makefile.am (boards): Add mcore-sim.exp @@ -910,14 +910,14 @@ Sun Feb 28 23:26:36 1999 Geoffrey Noer message. * lib/target.exp (proc default_target_compile): Add support for - timeout option. + timeout option. * baseboards/arm-sim.exp: Set gcc,timeout to 500. 1999-02-10 Nick Clifton * config/dos.exp: Fix typo: need_status_wrapper -> - needs_status_wrapper. + needs_status_wrapper. 1999-02-09 Nick Clifton @@ -953,8 +953,8 @@ Fri Jan 29 17:16:25 1999 Edith Epstein * lib/remote.exp: Added check for value of $outp. - * lib/target.exp: Ignore some hppa specific warning messages. Added - checks for CC_FOR_TARGET and CXX_FOR_TARGET. Check for redirection + * lib/target.exp: Ignore some hppa specific warning messages. Added + checks for CC_FOR_TARGET and CXX_FOR_TARGET. Check for redirection and optimization flags. 1999-01-26 Frank Ch. Eigler @@ -1786,7 +1786,7 @@ Wed Sep 3 16:55:52 1997 Bob Manson (standard_file): Added cmp operation to compare two binary files. - * lib/libgloss.exp: Add dwarf2 target variant. + * lib/libgloss.exp: Add dwarf2 target variant. * lib/target.exp: Make sure the CC_FOR_TARGET variable overrides any default compiler. @@ -1971,7 +1971,7 @@ Sat Jun 28 13:37:27 1997 Bob Manson load_board_description. * lib/target.exp(default_target_compile): If we're compiling - with the C++ compiler, include g++_include_flags and + with the C++ compiler, include g++_include_flags and g++_link_flags as appropriate. Fri Jun 27 15:17:12 1997 Bob Manson @@ -3115,7 +3115,7 @@ Fri Jan 31 11:36:12 1997 Bob Manson * lib/libgloss.exp(get_multilibs): If the host is remote, or if we have no compiler, or it can't be found, don't look for multilibs. (find_gcc): Don't even check to see if the compiler exists. - (libio_include_flags): Don't bother looking for the include dir if we + (libio_include_flags): Don't bother looking for the include dir if we haven't got libio.a. Thu Jan 30 11:48:29 1997 Bob Manson @@ -3274,7 +3274,7 @@ Thu Dec 12 18:11:24 1996 Rob Savoye * lib/utils.exp (diff): Set list_a and list_b to null so diffing empty files works. * lib/framework.exp (unknown): Set the exit status before calling - log_summary. + log_summary. Thu Dec 5 10:24:27 1996 Fred Fish @@ -3404,16 +3404,16 @@ Tue Jun 25 10:21:24 1996 Tom Tromey Mon Jun 24 17:26:20 1996 Jason Molenda (crash@godzilla.cygnus.co.jp) - * Makefile.in (bindir, libdir, datadir, infodir, includedir): Use + * Makefile.in (bindir, libdir, datadir, infodir, includedir): Use autoconf-set values. (docdir): Removed. * configure.in (AC_PREREQ): autoconf 2.5 or higher. * configure: Rebuilt. - * doc/Makefile.in (VPATH, mandir, infodir, INSTALL_PROGRAM, + * doc/Makefile.in (VPATH, mandir, infodir, INSTALL_PROGRAM, INSTALL_DATA): Use autoconf set values. * doc/configure.in (AC_PREREQ): autoconf 2.5 or higher. * doc/configure: Rebuilt. - * example/Makefile.in (bindir, libdir, datadir, mandir, infodir, + * example/Makefile.in (bindir, libdir, datadir, mandir, infodir, includedir): Use autoconf set values. (docdir): Removed. * example/configure.in (AC_PREREQ): autoconf 2.5 or higher. @@ -3480,9 +3480,9 @@ Thu Feb 1 22:48:15 1996 Rob Savoye error message is from a subroutine is accessible to the calling proc. * remote.exp (rlogin, telnet, rsh): Trap various kerberos message - when kinit is needed. + when kinit is needed. * testsuite/runtest.all/libs.exp: Trap untested, unsupported, - warnings, and errors too. + warnings, and errors too. * testsuite/runtest.all/remote.exp: Look for kerberos messages so those come up untested, rather than failures. This is only cause we're testing by connecting to the localhost. @@ -3522,7 +3522,7 @@ Thu Jan 18 19:51:11 1996 Rob Savoye * runtest.exp: Minor formatting changes. * lib/target.exp: Fix a few config bugs. * testsuite/runtest.all/{remote,target}.exp: New test cases for - remote.exp and target.exp. + remote.exp and target.exp. Wed Jan 17 11:32:21 1996 Tom Tromey @@ -3639,7 +3639,7 @@ Fri Sep 29 12:36:43 1995 Rob Savoye * lib/targets.exp (prune_warnings): Only check for ld.so warning on sunos systems. Check against host, not target. - * lib/debugger.exp: + * lib/debugger.exp: * runtest.exp: Set target_abbrev to default to "unix" rather than "-unset-". @@ -3689,7 +3689,7 @@ Mon Sep 18 10:24:51 1995 Rob Savoye * runtest.exp: Get $tool dirs first, then process the subdirs. * lib/utils.exp (getdir,find): Search for directories and files - the old way. + the old way. * testsuite/runtest.all/options.exp: Fix broken options and add tests for new options. @@ -3909,7 +3909,7 @@ Fri Mar 24 13:44:52 1995 Jim Kingdon (kingdon@lioth.cygnus.com) Thu Mar 23 22:12:07 1995 Rob Savoye * aclocal.m4: Split AC_PATH_T* into two pieces, one for headers - and one for libraries. + and one for libraries. * testuite/configure.in: Use CY_PATH_TCLH so we don't get a warning looking for the libraries. @@ -4278,10 +4278,10 @@ Wed Dec 15 20:38:49 1993 Rob Savoye (rob@darkstar.cygnus.com) it actually exists after printing the summary. Fri Dec 3 20:58:27 1993 Rob Savoye (rob@darkstar.cygnus.com) - + * runtest.exp: Only consider a TCL_ERROR to be a sign of a problem worth handling. This is when sourcing the test case. - + Thu Dec 2 14:16:20 1993 Rob Savoye (rob@darkstar.cygnus.com) * runtest.exp: If the verbose level is greater than 2, display @@ -4302,7 +4302,7 @@ Mon Nov 15 19:43:28 1993 Rob Savoye (rob@darkstar.cygnus.com) variables specified by a regular expression.Add dumpvars which dumps the body of procedures specified by a regular expression. - * Makefile.in: Install site.exp as only config file. + * Makefile.in: Install site.exp as only config file. * runtest.exp: look for site.tmpl in $srcdir, not site.exp in $objdir. * lib/framework.exp: Make istarget and isnative procs use @@ -4392,7 +4392,7 @@ Mon Sep 13 11:30:37 1993 Jeffrey Wheat (cassidy@cygnus.com) * runtest.exp: add global testcnt variable. * lib/framework.exp: add testcnt mechanism. Gives a total number of testcases run in summary. incremented by the - pass/fail/etc procs. Also added a "Tool version" string + pass/fail/etc procs. Also added a "Tool version" string in the summary. Thu Sep 9 12:37:27 1993 Rob Savoye (rob@darkstar.cygnus.com) @@ -4437,7 +4437,7 @@ Tue Jul 20 15:32:51 1993 Jeffrey Wheat (cassidy@cygnus.com) Mon Jul 19 09:31:48 1993 Jeffrey Wheat (cassidy@cygnus.com) - * remote.exp: Added a supplied patch to allow specifing a port + * remote.exp: Added a supplied patch to allow specifing a port to the telnet command. Mon Jul 12 17:54:58 1993 Rob Savoye (rob at darkstar.cygnus.com) @@ -4469,7 +4469,7 @@ Sun Jun 13 21:05:25 1993 Rob Savoye (rob at darkstar.cygnus.com) Thu May 27 20:01:51 1993 Rob Savoye (rob at darkstar.cygnus.com) * Makefile.in: Make the release image of the testsuites from the - special stubs. + special stubs. Sun May 23 18:40:01 1993 Rob Savoye (rob at darkstar.cygnus.com) @@ -4716,7 +4716,7 @@ Thu Feb 11 12:23:53 1993 Fred Fish (fnf@cygnus.com) * gdb.t21/demangle.exp (demangle): Fix proc so that demangling failures don't trigger two failure reports, one erroneously indicating the cause as a timeout. - * gdb.t21/demangle.exp (various): Print number of correct + * gdb.t21/demangle.exp (various): Print number of correct demanglings when suppressing remaining tests. * gdb.t21/demangle.exp (test_cfront_style_demangling): New test for cfront style demangling. @@ -4776,7 +4776,7 @@ Wed Jan 27 21:48:15 1993 Fred Fish (fnf@cygnus.com) compiled with ALIGN_STACK_ON_STARTUP defined. Fix "print foo" expected output to match current gdb. Fix tests for finding pathname to gdb executable to use the TCL "file" command. - * gdb.t20/classes.exp: Change error when binfile does not + * gdb.t20/classes.exp: Change error when binfile does not exist to be a simple fail instead. * tcl.tests/Makefile.in (tcltest): Use CC_FOR_TARGET. * tcl.tests/Makefile.in (Makefile): Add target. @@ -4870,11 +4870,11 @@ Tue Jan 12 12:51:46 1993 Fred Fish (fnf@cygnus.com) * config/{abug-g++.exp, aout-g++.exp, coff-g++.exp, mt-a29k-udi, mt-i960-nindy, mt-i960-vx, mt-m68k-abug-aout, mt-m68k-abug-coff, mt-m68k-aout, mt-m68k-coff, mt-m68k-vx, mt-unix, nind-g++.exp, - udi-g++.exp, unix-g++.exp, vx-g++.exp}, doc/deja-gnu.texi, + udi-g++.exp, unix-g++.exp, vx-g++.exp}, doc/deja-gnu.texi, g++.mike/{misc2.exp, misc8.exp, misc9.exp}, g++.old-deja/tests/ g++.sun/g++.frag/1076585.C, gdb.t20/Makefile.in, gdb.t21/ Makefile.in, gdb.t22/Makefile.in, lib/mike-g++.exp: - Use CXX rather than CPLUS, CPLUSPLUS, or C++, use CXXFLAGS + Use CXX rather than CPLUS, CPLUSPLUS, or C++, use CXXFLAGS rather than CFLAGS or CPLUSFLAGS or C++FLAGS. * Makefile.in (CHILL): Use freshly built binaries if available. * Makefile.in (CHILLFLAGS): Provide default flags for CHILL. @@ -4886,7 +4886,7 @@ Mon Jan 11 18:02:48 1993 Rob Savoye (rob at darkstar.cygnus.com) send-exp.test, spawn.test: Test case for expect tests. * expect.tests/exp-test.exp: Test driver for expect tests. * expect.tests/Makefile.in, configure.in: Configure - support. + support. * expect.tests/exp-test.c: Simple interactive program for expect tests. * expect.tests: New directory. @@ -4968,7 +4968,7 @@ Sun Dec 27 11:52:45 1992 Rob Savoye (rob at darkstar.cygnus.com) * lib/udi.exp: Fixed so that it downloads stably. Added better error trapping. Works with simulator or demo board. * runtest.exp: Cleaned up handling of signals during the init - phase. + phase. * lib/old-dejagnu.exp: Fixed bug that made $CFLAGS accumulate repititions of the same flags. * runtest.exp: cleans up temp file better. @@ -5137,7 +5137,7 @@ Wed Dec 2 11:39:28 1992 Fred Fish (fnf@cygnus.com) * lib/gdb.exp (gdb_reinitialize_dir): New utility proc. * gdb.t03/ptype.exp, gdb.t06/break.exp, gdb.t07/watchpoint.exp, - gdb.t08/opaque.exp, gdb.t09/corefile.exp, gdb.t11/list.exp, + gdb.t08/opaque.exp, gdb.t09/corefile.exp, gdb.t11/list.exp, gdb.t12/scope.exp, gdb.t13/bitfields.exp, gdb.t15/funcargs.exp, gdb.t16/printcmds.exp, gdb.t20/{classes.exp, inherit.exp, misc.exp}, gdb.t21/{cplusfuncs.exp, demangle.exp}, @@ -5198,13 +5198,13 @@ Sun Nov 29 23:10:43 1992 Mike Stump (mrs@rtl.cygnus.com) Sun Nov 29 15:16:06 1992 Rob Savoye (rob at darkstar.cygnus.com) * config:/vx-g++.exp, udi-g++.exp: Replaced with gcc init code. - * runtest.exp: Now executes recursively any *.exp files. + * runtest.exp: Now executes recursively any *.exp files. * lib/old-dejagnu.exp: proc old-dejagnu executes tests that are supposed to. * g++.old-deja/old-deja.exp: Recursively get all the C code in a subdirectory tree. * lib/utils.exp: New file, contains utility procs grep, find, - and which. + and which. * runtest.exp: Applied Fred's patch for the output. Sun Nov 29 08:51:15 1992 Fred Fish (fnf@cygnus.com) @@ -5546,12 +5546,12 @@ Thu Oct 29 19:07:28 1992 Rob Savoye (rob at darkstar.cygnus.com) * runtest.exp: Removed the --nfshost option cause it's become unnessary. * configure.in: Deals with the shorter names in config. Creates an - abbreviation for the OS and uses that for the filename substring. + abbreviation for the OS and uses that for the filename substring. * config/*: All names shortened to <= 14 characters. - All init-$target_os-$tool.exp changed to $target_os-$tool.exp. + All init-$target_os-$tool.exp changed to $target_os-$tool.exp. * config/mt-vxworks68, mt-vxworks960: Changed to use the abbreviated triplet form like all the other stubs. Now mt-m68k-vx - and mt-i960-vx. + and mt-i960-vx. Tue Oct 27 10:27:33 1992 Mike Stump (mrs@cygnus.com) @@ -5608,7 +5608,7 @@ Mon Oct 26 09:16:24 1992 Ian Lance Taylor (ian@cygnus.com) Sun Oct 25 11:35:49 1992 Rob Savoye (rob at darkstar.cygnus.com) * config/init-vxworks-gcc.exp: Now works good, traps load errors - cleanly. + cleanly. * runtest.exp, doc/dejagnu.texi: Changed all occurences of $defaultmode to $connectmode. * config/init-vxworks-gcc.exp, init-unix-gcc.exp: Fixed so @@ -5631,7 +5631,7 @@ Sat Oct 24 22:44:09 1992 Rob Savoye (rob at darkstar.cygnus.com) test code. * config/init-unix-gcc.exp: Made gcc_load work and set $status. * runtest.exp: Moved regex variables for decimal and hex from - init-unix-gdb.exp. + init-unix-gdb.exp. Fri Oct 23 12:03:47 1992 Rob Savoye (rob at darkstar.cygnus.com) @@ -5729,7 +5729,7 @@ Fri Oct 16 17:25:31 1992 Rob Savoye (rob at darkstar.cygnus.com) * g++.mike/misc1.C, misc4.C misc5.C p646.C: Changed all occurences of 'i' as a variable, cause it screws up the vxworks 'i' shell - command. + command. Fri Oct 16 15:51:10 1992 Fred Fish (fnf@cygnus.com) @@ -5849,22 +5849,22 @@ Fri Oct 2 15:42:10 1992 Rob Savoye (rob at darkstar.cygnus.com) Thu Oct 1 21:26:35 1992 Rob Savoye (rob at darkstar.cygnus.com) * teststrategy.exp: Changed the test for target vs host to using - $target_alias & $host_alias instead of $target_os & $host_os. + $target_alias & $host_alias instead of $target_os & $host_os. * corefile.exp: Added line to dump output of tests to detail - log. + log. * scope.exp: Added line to dump output of tests to detail - log. + log. * opaque.exp: Added line to dump output of tests to detail - log. + log. * crossload.exp: Added line to dump output of tests to detail - log. + log. * watchpoint.exp: Added line to dump output of tests to detail - log. + log. Thu Oct 1 21:05:28 1992 Rob Savoye (rob at darkstar.cygnus.com) * runtest: Changed the test for target vs host to using - $target_alias & $host_alias instead of $target_aos & $host_os. + $target_alias & $host_alias instead of $target_aos & $host_os. Sep 30 08:45:00 1992 Fred Fish (fnf@fishpond.cygnus.com) @@ -5886,7 +5886,7 @@ Sep 30 08:45:00 1992 Fred Fish (fnf@fishpond.cygnus.com) opaque.exp}: New tests for opaque structs. * gdb.t09/{Makefile.in, configure.in, in-gdbme.c, corefile.exp}: New tests for core file handling. - * gdb.t10/{Makefile.in, configure.in, README, in-gdbme.c, + * gdb.t10/{Makefile.in, configure.in, README, in-gdbme.c, crossload.exp, i486-elf.u, i860-elf.u, m68k-aout.u, m68k-aout2.u, m68k-elf.u, mips-ecoff.u, sparc-aout.u}: New files for non-native executable handling tests. @@ -5964,7 +5964,7 @@ Fri Aug 7 21:55:48 1992 Rob Savoye (rob at darkstar.cygnus.com) * init-vxworks-gdb.exp: Now uses config file. * Makefile.in: Now has a target to make a config file. * site.exp: Created by make/configure. Holds init values for - init module. + init module. * configure.in: Now configures init modules for tool. * runtest: Now uses init setup by configure. diff --git a/baseboards/arm-sim.exp b/baseboards/arm-sim.exp index af91f7f..1372019 100644 --- a/baseboards/arm-sim.exp +++ b/baseboards/arm-sim.exp @@ -13,7 +13,7 @@ if { [board_info $board obj_format] == "pe" } { # if [istarget "*-*-coff"] { # set_board_info uses_underscores 1 # } - + set additional_options "" } diff --git a/baseboards/mcore-moto-sim.exp b/baseboards/mcore-moto-sim.exp index 92fac5f..90f0c39 100644 --- a/baseboards/mcore-moto-sim.exp +++ b/baseboards/mcore-moto-sim.exp @@ -54,7 +54,7 @@ proc sim_spawn { dest cmdline args } { puts $handle "g 28" puts $handle "quit" close $handle - + return [eval remote_spawn host \{ $sim $simflags "-sdoit" \} $args] } @@ -118,7 +118,7 @@ proc find_sim { target_alias sim_dir sim_name } { ## XXX - fixme - this should not be hardcoded. ## XXX - fixme - this should vary depending upon endianism selected. - + return "/home/nickc/bin/linux/sim-be" } diff --git a/baseboards/mn10300-cygmon.exp b/baseboards/mn10300-cygmon.exp index 3a435ea..8757855 100644 --- a/baseboards/mn10300-cygmon.exp +++ b/baseboards/mn10300-cygmon.exp @@ -20,7 +20,7 @@ if {[string compare [board_info $board boardtype] "asb2303"] == 0} { set_board_info ldflags "[libgloss_link_flags] [newlib_link_flags] [board_info $board addl_link_flags] -mno-crt0 -mam33-2" set_board_info ldscript "-mam33-2 -Tasb2303.ld" } - + # Standard remote protocol. set_board_info gdb_protocol "remote" diff --git a/config/ddb-ether.exp b/config/ddb-ether.exp index 336763c..05912ab 100644 --- a/config/ddb-ether.exp +++ b/config/ddb-ether.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. @@ -118,7 +118,7 @@ proc ddb_ether_ld { dest prog } { exp_continue } } - -re ".*${shell_prompt}$" { + -re ".*${shell_prompt}$" { set state "fail" } default { @@ -131,7 +131,7 @@ proc ddb_ether_ld { dest prog } { } return "pass" } - + proc ddb_ether_spawn { dest prog args } { set state [ddb_ether_ld $dest $prog] diff --git a/config/gdb_stub.exp b/config/gdb_stub.exp index 4f88b7a..95b8ec8 100644 --- a/config/gdb_stub.exp +++ b/config/gdb_stub.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. @@ -188,7 +188,7 @@ proc gdb_stub_startup { dest } { } -re "Reading symbols from.*done..*$gdb_prompt $" {} -re "$gdb_prompt $" { warning "GDB couldn't find loader" } - timeout { + timeout { warning "(timeout) read symbol file" return -1 } @@ -203,7 +203,7 @@ proc gdb_stub_startup { dest } { remote_expect host 60 { -re "appears to be alive.*$gdb_prompt" { } -re "Remote target.*connected to.*$gdb_prompt" { } - -re "$gdb_prompt" { + -re "$gdb_prompt" { warning "Error reconnecting to stub." return -1 } @@ -262,12 +262,12 @@ proc gdb_stub_startup { dest } { remote_send host "y\n" exp_continue } - -re "Starting program:.*loader.*$" { + -re "Starting program:.*loader.*$" { verbose "Starting loader succeeded" } - timeout { + timeout { warning "(timeout) starting the loader" - return -1 + return -1 } default { warning "error starting the loader" @@ -286,9 +286,9 @@ proc gdb_stub_startup { dest } { -re "$gdb_prompt $" { verbose "Running loader succeeded" } - timeout { + timeout { warning "(timeout) interrupting the loader" - return -1 + return -1 } default { warning "error interrupting the loader" @@ -369,7 +369,7 @@ proc gdb_stub_start { dest } { } remote_send host "break copyloop\n" remote_expect host 10 { - -re "Breakpoint.*$gdb_prompt $" { + -re "Breakpoint.*$gdb_prompt $" { set start_comm "continue\n" } -re "Function.*not defined.*$gdb_prompt $" { } @@ -491,7 +491,7 @@ proc gdb_stub_load { dest prog args } { set result [remote_wait $dest 120] set status [lindex $result 0] set output [lindex $result 1] - + if { $status == 0 } { return [list "pass" $output] } else if { $status > 0 } { @@ -546,7 +546,7 @@ proc gdb_stub_ld { dest prog } { warning "GDB couldn't read file" return [gdb_stub_retry_ld "$dest" "$prog"] } - timeout { + timeout { warning "(timeout) read symbol file" return [gdb_stub_retry_ld "$dest" "$prog"] } @@ -572,7 +572,7 @@ proc gdb_stub_ld { dest prog } { -re "$gdb_prompt $" { verbose "Set remote target to $serial" 2 } - timeout { + timeout { warning "Couldn't set remote target." return 0 } diff --git a/config/netware.exp b/config/netware.exp index af670b1..7fd79b5 100644 --- a/config/netware.exp +++ b/config/netware.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. @@ -107,9 +107,9 @@ proc ${board}_load { dest prog args } { return "untested" } - # + # set exe [file tail $prog] - + # We can't blindly append a suffix to the object name, because the # result may not be valid on netware's 8.3 filesystem. set nlm "$tmpdir/x.nlm" diff --git a/config/sim.exp b/config/sim.exp index 3471f27..50cc508 100644 --- a/config/sim.exp +++ b/config/sim.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. @@ -36,7 +36,7 @@ proc sim_spawn { dest cmdline args } { } else { set simflags "" } - + if ![is_remote host] { if { [which $sim] == 0 } { verbose -log "Simulator $sim missing." 3 diff --git a/config/unix.exp b/config/unix.exp index c8263d7..2de2299 100644 --- a/config/unix.exp +++ b/config/unix.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. @@ -90,7 +90,7 @@ proc unix_load { dest prog args } { setenv LD_LIBRARY_PATH $orig_ld_library_path setenv SHLIB_PATH $orig_ld_library_path } - } else { + } else { set remotefile "/tmp/[file tail $prog].[pid]" set remotefile [remote_download $dest $prog $remotefile] if { $remotefile == "" } { @@ -123,7 +123,7 @@ proc unix_load { dest prog args } { set output [lindex $status 1] set status [lindex $status 0] } - + setenv LD_LIBRARY_PATH $orig_ld_library_path setenv SHLIB_PATH $orig_ld_library_path diff --git a/config/vxworks.exp b/config/vxworks.exp index 233ae5a..e05c175 100644 --- a/config/vxworks.exp +++ b/config/vxworks.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 @@ -30,7 +30,7 @@ proc ${board}_init { dest } { set do_reboot 0 set desired_kernel [board_info $dest "kernel,$target_os"] - + if { $desired_kernel == "" } { vxworks_final_init $dest # Nothing to see here, nothing to do. Move along. @@ -47,7 +47,7 @@ proc ${board}_init { dest } { remote_send $dest "\n" exp_continue } - -re "VxWorks Boot" { + -re "VxWorks Boot" { set boot_mon 0 set boot_mon_prompt "VxWorks Boot" } @@ -264,7 +264,7 @@ proc vxworks_open { dest args } { # 1 - failed (eg: link failed so testcase should fail) # -1 - unresolved (eg: timeout), may be fixed by rebooting # -proc vxworks_ld { dest prog } { +proc vxworks_ld { dest prog } { global decimal hex global board_info @@ -312,7 +312,7 @@ proc vxworks_ld { dest prog } { perror "Need to set the user and password." set result 1 } - -re "Stale NFS file handle.*$shell_prompt $" { + -re "Stale NFS file handle.*$shell_prompt $" { # Need to retry. } -re "undefined symbol:.*$shell_prompt $" { @@ -336,13 +336,13 @@ proc vxworks_ld { dest prog } { -re "(.*)$shell_prompt $" { warning "Load failed: $expect_out(1,string)" } - timeout { + timeout { warning "Timed out trying load $prog." set result -1 } } } - + if { $result && [info exists expect_out(buffer)] } { send_log "$expect_out(buffer)" } diff --git a/contrib/bluegnu2.0.3/lib/bug.exp b/contrib/bluegnu2.0.3/lib/bug.exp index 5d52182..d0e4589 100644 --- a/contrib/bluegnu2.0.3/lib/bug.exp +++ b/contrib/bluegnu2.0.3/lib/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, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ @@ -87,7 +87,7 @@ proc bug_load { shell_id file } { return -1 } } - + catch "exec rm -f $file.srec" return 0 } @@ -115,7 +115,7 @@ proc bug_execute { shell_id addr } { set exec_output $expect_out(buffer) return 0 } - -i $shell_id timeout { + -i $shell_id timeout { perror "Couldn't execute program (timed out)." return 1 } diff --git a/contrib/bluegnu2.0.3/lib/framework.exp b/contrib/bluegnu2.0.3/lib/framework.exp index 2018c4a..5491274 100644 --- a/contrib/bluegnu2.0.3/lib/framework.exp +++ b/contrib/bluegnu2.0.3/lib/framework.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. @@ -38,7 +38,7 @@ proc open_logs { } { global outdir global tool global sum_file - + if { ${tool} == "" } { set tool testrun } @@ -58,7 +58,7 @@ proc open_logs { } { # proc close_logs { } { global sum_file - + catch "close $sum_file" } @@ -70,7 +70,7 @@ proc close_logs { } { proc isbuild { args } { global build_triplet global host_triplet - + if ![info exists build_triplet] { set build_triplet ${host_triplet} } @@ -78,7 +78,7 @@ proc isbuild { args } { return $build_triplet } verbose "Checking pattern \"$args\" with $build_triplet" 2 - + if [string match "$args" $build_triplet] { return 1 } else { @@ -93,7 +93,7 @@ proc isbuild { args } { proc is3way {} { global host_triplet global build_triplet - + if ![info exists build_triplet] { set build_triplet ${host_triplet} } @@ -111,12 +111,12 @@ proc is3way {} { # proc ishost { args } { global host_triplet - + if [string match "" $args] { return $host_triplet } verbose "Checking pattern \"$args\" with $host_triplet" 2 - + if [string match "$args" $host_triplet] { return 1 } else { @@ -132,7 +132,7 @@ proc ishost { args } { # proc istarget { args } { global target_triplet - + # if no arg, return the config string if [string match "" $args] { if [info exists target_triplet] { @@ -162,7 +162,7 @@ proc istarget { args } { proc isnative { } { global target_triplet global build_triplet - + if [string match $build_triplet $target_triplet] { return 1 } @@ -175,7 +175,7 @@ proc isnative { } { proc unknown { args } { global errorCode global errorInfo - + clone_output "ERROR: (DejaGnu) proc \"$args\" does not exist." if [info exists errorCode] { send_error "The error code is $errorCode\n" @@ -200,7 +200,7 @@ proc unknown { args } { proc clone_output { message } { global sum_file global all_flag - + puts $sum_file "$message" case [lindex $message 0] in { {"PASS:" "XFAIL:" "UNRESOLVED:" "UNSUPPORTED:" "UNTESTED:"} { @@ -239,7 +239,7 @@ proc reset_vars {} { # other miscellaneous variables global prms_id global bug_id - + # reset them all set prms_id 0 set bug_id 0 @@ -278,9 +278,9 @@ proc log_summary {} { global mail_logs global outdir global mailing_list - + clone_output "\n\t\t=== $tool Summary ===\n" - + # If the tool set `testcnt', it wants us to do a sanity check on the # total count, so compare the reported number of testcases with the # expected number. Maintaining an accurate count in `testcnt' isn't easy @@ -289,7 +289,7 @@ proc log_summary {} { # total all the testcases reported set totlcnt [expr $failcnt+$passcnt+$xfailcnt+$xpasscnt] set totlcnt [expr $totlcnt+$untestedcnt+$unresolvedcnt+$unsupportedcnt] - + if { $testcnt>$totlcnt || $testcnt<$totlcnt } { if { $testcnt > $totlcnt } { set mismatch "unreported [expr $testcnt-$totlcnt]" @@ -353,7 +353,7 @@ proc cleanup {} { global done_list global base_dir global subdir - + #catch "exec rm -f [glob xgdb core *.x *.o *_soc a.out]" #catch "exec rm -f [glob -nocomplain $subdir/*.o $subdir/*.x $subdir/*_soc]" } @@ -368,13 +368,13 @@ proc cleanup {} { proc setup_xfail { args } { global xfail_flag global xfail_prms - + set xfail_prms 0 set argc [ llength $args ] for { set i 0 } { $i < $argc } { incr i } { set sub_arg [ lindex $args $i ] # is a prms number. we assume this is a number with no characters - if [regexp "^\[0-9\]+$" $sub_arg] { + if [regexp "^\[0-9\]+$" $sub_arg] { set xfail_prms $sub_arg continue } @@ -391,7 +391,7 @@ proc setup_xfail { args } { proc clear_xfail { args } { global xfail_flag global xfail_prms - + set argc [ llength $args ] for { set i 0 } { $i < $argc } { incr i } { set sub_arg [ lindex $args $i ] @@ -507,7 +507,7 @@ proc record_test { type message } { } else { clone_output "$type: $message" } - + # Reset these so they're ready for the next test case. We don't reset # prms_id or bug_id here. There may be multiple tests for them. Instead # they are reset in the main loop after each test. It is also the @@ -580,14 +580,14 @@ proc get_warning_threshold { } { proc warning { args } { global warncnt global errno - + if { [llength $args] > 1 } { set warncnt [lindex $args 1] } else { incr warncnt } set message [lindex $args 0] - + clone_output "WARNING: $message" set errno "WARNING: $message" @@ -599,7 +599,7 @@ proc warning { args } { # # Prints error messages -# These are errors from the framework, not from the tools being tested. +# These are errors from the framework, not from the tools being tested. # It takes a string, and an optional number and returns nothing. # proc perror { args } { @@ -612,7 +612,7 @@ proc perror { args } { incr errcnt } set message [lindex $args 0] - + clone_output "ERROR: $message" set errno "ERROR: $message" diff --git a/contrib/bluegnu2.0.3/lib/libgloss.exp b/contrib/bluegnu2.0.3/lib/libgloss.exp index 7e54e8d..bf753b8 100644 --- a/contrib/bluegnu2.0.3/lib/libgloss.exp +++ b/contrib/bluegnu2.0.3/lib/libgloss.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 @@ -66,13 +66,13 @@ proc libgloss_script { } { warning "Couldn't find the linker script name for target" return "" } - + # if we're on a remote host, we can't search for the file, so use the # linker script in the path. if [is3way] { return "-T${script}" } - + # search for the general directories foreach i ".. ../.. ../../.. ../../../.." { verbose "Looking for a ${srcdir}/${i}/libgloss/${target_cpu}/${script}" 2 @@ -88,7 +88,7 @@ proc libgloss_script { } { # # Find all the pieces of libgloss for testing the GNU development tools -# needed to use $CC or $CXX. It returns a string suitable to pass to +# needed to use $CC or $CXX. It returns a string suitable to pass to # $CC or $CXX to get a fully linked binary for the target. # proc libgloss_flags { } { @@ -107,7 +107,7 @@ proc libgloss_flags { } { if [is3way] { return "[libgloss_script]" } - + # search for the general directories foreach i ".. ../.. ../../.. ../../../.." { if [file exists ${base_dir}/${i}/${target_alias}/libgloss/${target_cpu} ] { @@ -115,7 +115,7 @@ proc libgloss_flags { } { return "-L${base_dir}/${i}/${target_alias}/libgloss/${target_cpu} [libgloss_script]" } } - + # we didn't find any support at all return "[libgloss_script]" } @@ -206,7 +206,7 @@ proc libgloss_ld {} { } else { perror "No crt0.o built for this target" } - + # find the BSP (currently an object, it may become an archive soon) foreach i "[list_targets]" { if [info exists target_info($i,name}] { diff --git a/contrib/bluegnu2.0.3/lib/remote.exp b/contrib/bluegnu2.0.3/lib/remote.exp index 1b80617..a7fdf94 100644 --- a/contrib/bluegnu2.0.3/lib/remote.exp +++ b/contrib/bluegnu2.0.3/lib/remote.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. */ @@ -24,7 +24,7 @@ # Remove at some point. set shell_id 0 -# +# # Open a connection to a remote host or target. This requires the target_info # array be filled in with the proper info to work. The old variables are also # still functional. @@ -41,7 +41,7 @@ proc remote_open { args } { global reboot global shell_id global spawn_id - + if { [llength $args] == 0 } { set type "target" } else { @@ -92,7 +92,7 @@ proc remote_open { args } { # # Close the remote connection. # shell_id - This is the id number returned by the any of the connection -# procedures, or an index into one of the arrays. +# procedures, or an index into one of the arrays. # proc remote_close { arg } { # get the type of connection, host or target @@ -141,14 +141,14 @@ proc telnet { args } { global errno set hostname [lindex $args 0] - + # get the port number if { [llength $args] > 1 } { set port [lindex $args 1] } else { set port 23 } - + # get the hostname and port number from the config array if [expr [string match "host" $hostname] || [string match "target" $hostname]] { set type $hostname @@ -167,7 +167,7 @@ proc telnet { args } { if ![info exists shell_prompt] { # if no prompt, then set it to something generic set shell_prompt ".*> " } - + set tries 0 set result -1 verbose "Starting a telnet connection to $hostname:$port" 2 @@ -221,7 +221,7 @@ proc telnet { args } { warning "telnet: connection closed by foreign host." break } - timeout { + timeout { exp_send "\003" warning "telnet: timed out trying to connect." } @@ -283,12 +283,12 @@ proc rlogin { arg } { if ![info exists shell_prompt] { # if no prompt, then set it to something generic set shell_prompt ".*> " } - + # get the right version of rlogin if ![info exists RLOGIN] { set RLOGIN rlogin } - + # start connection and store the spawn_id verbose "Opening a $RLOGIN connection to $hostname" 2 spawn $RLOGIN $hostname @@ -300,7 +300,7 @@ proc rlogin { arg } { if [info exists target_info($type,name)] { set target_info($target_info($type,name),fileid) $spawn_id } - + # try to connect to the target. We give up after 3 attempts. At one point # we used to look for the prompt, but we may not know what it looks like. while { $tries <= 3 } { @@ -374,7 +374,7 @@ proc rlogin { arg } { catch wait break } - timeout { + timeout { warning "rlogin: timed out trying to connect." } eof { @@ -422,7 +422,7 @@ proc rlogin { arg } { } else { verbose "rlogin: connected to $hostname" 2 } - + return $spawn_id } @@ -452,7 +452,7 @@ proc rsh { arg } { if ![info exists shell_prompt] { # if no prompt, then set it to something generic set shell_prompt ".*> " } - + if ![info exists RSH] { set RSH rsh } @@ -528,17 +528,17 @@ proc rsh { arg } { -re "Sorry, shell is locked.*Connection closed.*$" { warning "rsh: already connected." } - timeout { + timeout { warning "rsh: timed out trying to connect." } - eof { + eof { perror "rsh: got EOF while trying to connect." break } } incr tries } - + if { $result < 0 } { # perror "rsh: couldn't connect after $tries tries." set spawn_id -1 @@ -627,7 +627,7 @@ proc tip { arg } { if ![info exists shell_prompt] { # if no prompt, then set it to something generic set shell_prompt ".*> " } - + spawn tip -v $port if { $spawn_id < 0 } { perror "invalid spawn id from tip" @@ -636,7 +636,7 @@ proc tip { arg } { set target_info(target,fileid) $spawn_id set target_info($target_info(target,name),fileid) $spawn_id expect { - -re ".*connected.*$" { + -re ".*connected.*$" { send "\r\n" expect { -re ".*$shell_prompt.*$" { @@ -660,7 +660,7 @@ proc tip { arg } { incr tries if { $tries <= 2 } { exp_continue - } + } } -re "Connection Closed.*$" { perror "Never connected." @@ -768,7 +768,7 @@ proc tip_download { shell_id file } { # # Connect to using kermit # args - first is the device name, ie. /dev/ttyb -# second is the optional baud rate. If this is "host" or "target" the +# second is the optional baud rate. If this is "host" or "target" the # config array is used instead. # returns -1 if it failed, otherwise it returns # the spawn_id. @@ -782,7 +782,7 @@ proc kermit { args } { set baud 9600 } else { set baud [lindex $args 1] - } + } if [expr [string match "host" [lindex $args 0]] || [string match "target" [lindex $arg 0]]] { set device $target_info(${type},serial) @@ -792,7 +792,7 @@ proc kermit { args } { } else { set device [lindex $args 0] } - + set tries 0 set result -1 spawn kermit -l $device -b $baud @@ -803,7 +803,7 @@ proc kermit { args } { set target_info(${type},fileid) $spawn_id set target_info($target_info(${type},name),fileid) $spawn_id expect { - -re ".*ermit.*>.*$" { + -re ".*ermit.*>.*$" { send "c\n" expect { -re ".*Connecting to $port.*Type the escape character followed by C to.*$" { @@ -829,7 +829,7 @@ proc kermit { args } { exp_continue } } - timeout { + timeout { warning "Timed out trying to connect." set result -1 incr tries diff --git a/contrib/bluegnu2.0.3/lib/target.exp b/contrib/bluegnu2.0.3/lib/target.exp index 1454dad..fd69f8b 100644 --- a/contrib/bluegnu2.0.3/lib/target.exp +++ b/contrib/bluegnu2.0.3/lib/target.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 @@ -268,7 +268,7 @@ proc pop_host { } { # proc list_targets { } { global target_info - + if ![info exists target_info] { return "" } @@ -306,7 +306,7 @@ proc prune_warnings { text } { regsub -all "(^|\n)(/usr/(ucb|bin)/ld.*without exceptions was\[^\n\]+\n?)" $text "\\1" text } - + # Ignore these. regsub -all "(^|\n)\[^\n\]*linker input file unused since linking not done" $text "" text regsub -all "(^|\n)\[^\n\]*file path prefix \[^\n\]* never used" $text "" text @@ -324,7 +324,7 @@ proc compile { arg } { global target_info global comp_output global CC - + if [info exists target_info(target,cflags)] { lappend options "$target_info(target,cflags)" } @@ -337,13 +337,13 @@ proc compile { arg } { } # -# Invoke the archiver. +# Invoke the archiver. # proc archive { arg } { global target_info global comp_output global AR - + if [info exists target_info(target,arflags)] { lappend options "$target_info(target,arflags)" } @@ -358,7 +358,7 @@ proc ranlib { arg } { global target_info global comp_output global RANLIB - + append options "$arg" verbose "Invoking the archiver as $RANLIB $options" @@ -374,12 +374,12 @@ proc link_objects { arg } { global target_info global comp_output global LD - + set options "$arg" if [info exists target_info(target,ldlags)] { lappend options "$target_info(target,ldlags)" } - + set comp_output [execute_anywhere "$LD $args"] return [ prune_warnings $comp_output] } @@ -393,13 +393,13 @@ proc link_objects { arg } { proc execute_anywhere { cmdline } { global exec_output global target_info - + if ![info exists target_info(current,prompt)] { set prompt "" } else { set prompt $target_info(current,prompt) } - + # if we're running stuff that's hosted on the same machine if ![is3way] { verbose -log "Executing on local host: ${cmdline}" 2 @@ -443,12 +443,12 @@ proc execute_anywhere { cmdline } { if [info exists exec_output] { verbose "EXEC_OUTPUT = \"$exec_output\"" 2 } - - + + # stty echo # close the connection remote_close $shellid - + if [info exists exec_output] { return $exec_output } else { @@ -474,7 +474,7 @@ proc getprompt { shellid } { set tries 0 set text "" - + while { $tries <=3 } { verbose "Trying to get the remote host's prompt" send -i $shellid "ACK\r\n" @@ -503,7 +503,7 @@ proc getprompt { shellid } { } incr tries } - + # see if we maxed out on errors if { $tries >= 3 } { warning "Couldn't get the prompt" diff --git a/contrib/bluegnu2.0.3/lib/utils.exp b/contrib/bluegnu2.0.3/lib/utils.exp index 2372264..6ea6745 100644 --- a/contrib/bluegnu2.0.3/lib/utils.exp +++ b/contrib/bluegnu2.0.3/lib/utils.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 @@ -20,7 +20,7 @@ # This file was written by Rob Savoye. (rob@welcomehome.org) # -# Most of the procedures found here mimic their unix counter-part. +# Most of the procedures found here mimic their unix counter-part. # This file is sourced by runtest.exp, so they are usable by any test case. # @@ -67,7 +67,7 @@ proc getdirs { args } { perror "$tmp" return "" } - + if ![info exists dirs] { return "" } else { @@ -80,7 +80,7 @@ proc getdirs { args } { # rootdir - this is the directory to start the search # from. This is and all subdirectories are search for # filenames. Directory names are not included in the -# list, but the filenames have path information. +# list, but the filenames have path information. # pattern - this is the pattern to match. Patterns are csh style # globbing rules. # returns: a list or a NULL. @@ -106,7 +106,7 @@ proc find { rootdir pattern } { } set tmp "" } - + # find all the files that match the pattern foreach i $dirs { verbose "Looking in $i" 3 @@ -120,7 +120,7 @@ proc find { rootdir pattern } { } } } - + if ![info exists files] { lappend files "" } @@ -136,10 +136,10 @@ proc find { rootdir pattern } { # proc which { file } { global env - + # strip off any extraneous arguments (like flags to the compiler) set file [lindex $file 0] - + # if it exists then the path must be OK # ??? What if $file has no path and "." isn't in $PATH? if [file exists $file] { @@ -150,7 +150,7 @@ proc which { file } { } else { return 0 } - + foreach i $path { verbose "Checking against $i" 3 if [file exists $i/$file] { @@ -166,7 +166,7 @@ proc which { file } { } # -# Looks for a string in a file. +# Looks for a string in a file. # return:list of lines that matched or NULL if none match. # args: first arg is the filename, # second is the pattern, @@ -174,12 +174,12 @@ proc which { file } { # Options: line - puts line numbers of match in list # proc grep { args } { - + set file [lindex $args 0] set pattern [lindex $args 1] - + verbose "Grepping $file for the pattern \"$pattern\"" 3 - + set argc [llength $args] if { $argc > 2 } { for { set i 2 } { $i < $argc } { incr i } { @@ -189,7 +189,7 @@ proc grep { args } { } else { set options "" } - + set i 0 set fd [open $file r] while { [gets $fd cur_line]>=0 } { @@ -259,7 +259,7 @@ proc absolute { path } { if [string match "." $path] { return [pwd] } - + set basedir [pwd] cd $path set path [pwd] @@ -359,23 +359,23 @@ if { [info procs prune_system_crud] == "" } { proc diff { file_1 file_2 } { set eof -1 set differences 0 - + if [file exists ${file_1}] { set file_a [open ${file_1} r] } else { warning "${file_1} doesn't exist" return 0 } - + if [file exists ${file_2}] { set file_b [open ${file_2} r] } else { warning "${file_2} doesn't exist" return 0 } - + verbose "# Diff'ing: ${file_1} ${file_2}\n" 1 - + while { [gets ${file_a} line] != ${eof} } { if [regexp "^#.*$" ${line}] { continue @@ -384,7 +384,7 @@ proc diff { file_1 file_2 } { } } close ${file_a} - + while { [gets ${file_b} line] != ${eof} } { if [regexp "^#.*$" ${line}] { continue @@ -411,7 +411,7 @@ proc diff { file_1 file_2 } { set differences -1 } } - + if { [llength ${list_a}] != [llength ${list_b}] } { verbose "Files not the same" 2 set differences -1 @@ -427,7 +427,7 @@ proc diff { file_1 file_2 } { # proc setenv { var val } { global env - + set env($var) $val } diff --git a/contrib/bluegnu2.0.3/lib/vxworks.exp b/contrib/bluegnu2.0.3/lib/vxworks.exp index cf7c3bd..e412ab9 100644 --- a/contrib/bluegnu2.0.3/lib/vxworks.exp +++ b/contrib/bluegnu2.0.3/lib/vxworks.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. */ @@ -77,7 +77,7 @@ if { [info procs vxworks_transform_path] == "" } { # -2 - unsupported (not used) # -3 - untested (not used) # -proc vxworks_ld { shell_id prog } { +proc vxworks_ld { shell_id prog } { global shell_prompt global expect_out global logname @@ -165,13 +165,13 @@ proc vxworks_ld { shell_id prog } { warning "Load failed: $expect_out(1,string)" set result -1 } - -i $shell_id timeout { + -i $shell_id timeout { warning "Timed out trying load $prog." set result -1 } } } - + if { $result && [info exists expect_out(buffer)] } { send_log "$expect_out(buffer)" } @@ -245,14 +245,14 @@ proc vxworks_spawn { shell_id function } { # Task is no longer running. set result 0 } - -i $shell_id timeout { + -i $shell_id timeout { warning "$function started, can't determine status (timed out)" set result -1 } } } } - -i $shell_id timeout { + -i $shell_id timeout { warning "Couldn't run $function (timed out)" set result -1 } diff --git a/contrib/bluegnu2.0.3/runtest.exp b/contrib/bluegnu2.0.3/runtest.exp index b436e2d..e9a7464 100755 --- a/contrib/bluegnu2.0.3/runtest.exp +++ b/contrib/bluegnu2.0.3/runtest.exp @@ -6,18 +6,18 @@ # 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. # Please email any bugs, comments, and/or additions to this file to: -# +# # This file was written by Rob Savoye. (rob@welcomehome.org) # and modified by Jan-Willem Neurdenburg. (neurdenburgj@acm.org) @@ -77,7 +77,7 @@ set reboot 0 set configfile site.exp ;# (local to this file) set multipass "" ;# list of passes and var settings set target_abbrev "unix" ;# environment (unix, sim, vx, etc.). -set errno ""; ;# +set errno ""; ;# # # set communication parameters here # @@ -200,7 +200,7 @@ proc verbose { args } { set level [lindex $args [expr $i+1]] } set message [lindex $args $i] - + if { $verbose >= $level } { # There is no need for the "--" argument here, but play it safe. # We assume send_user also sends the text to the log file (which @@ -228,7 +228,7 @@ proc transform { name } { global target_triplet global target_alias global host_triplet - + if [string match $target_triplet $host_triplet] { return $name } @@ -258,7 +258,7 @@ proc transform { name } { # arg2 is optional, and it's what gets returned if # the file doesn't exist. # -proc findfile { args } { +proc findfile { args } { # look for the file verbose "Seeing if [lindex $args 0] exists." 2 if [file exists [lindex $args 0]] { @@ -520,7 +520,7 @@ if [expr { $build_triplet == "" && $host_triplet == ""} ] { break } } - + # get the canonical config name if ![info exists config_guess] { send_error "ERROR: Couldn't guess configuration.\n" @@ -782,7 +782,7 @@ for { set i 0 } { $i < $argc } { incr i } { "--sr*" { # (--srcdir) where the testsuite source code lives # Already parsed, but parse again to make sure command line # options override any config file. - + set srcdir $optarg continue } @@ -933,7 +933,7 @@ open_logs clone_output "Test Run By $logname on [timestamp -format %c]" if [is3way] { clone_output "Target is $target_triplet" - clone_output "Host is $host_triplet" + clone_output "Host is $host_triplet" clone_output "Build is $build_triplet" } else { if [isnative] { @@ -956,7 +956,7 @@ clone_output "\n\t\t=== $tool tests ===\n" # be purely host based. Unknown is mostly for error trapping. # -set found 0 +set found 0 if ![info exists target_abbrev] { set target_abbrev "unix" } @@ -1099,7 +1099,7 @@ foreach pass $multipass { # We can't call `perror' here, it resets `errorInfo' # before we want to look at it. Also remember that perror # increments `errcnt'. If we do call perror we'd have to - # reset errcnt afterwards. + # reset errcnt afterwards. clone_output "ERROR: tcl error sourcing $test_name." if [info exists errorInfo] { clone_output "ERROR: $errorInfo" diff --git a/contrib/bluegnu2.0.3/testsuite/bluegnu.all/options.exp b/contrib/bluegnu2.0.3/testsuite/bluegnu.all/options.exp index 87777fa..0e1a078 100644 --- a/contrib/bluegnu2.0.3/testsuite/bluegnu.all/options.exp +++ b/contrib/bluegnu2.0.3/testsuite/bluegnu.all/options.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. */ @@ -72,7 +72,7 @@ foreach i $tests { pass "[lindex $i 2]" } } - + set fd [open site.exp w] puts ${fd} "set host_triplet $host_triplet" diff --git a/contrib/bluegnu2.0.3/testsuite/config/default.exp b/contrib/bluegnu2.0.3/testsuite/config/default.exp index 719c21b..5954252 100644 --- a/contrib/bluegnu2.0.3/testsuite/config/default.exp +++ b/contrib/bluegnu2.0.3/testsuite/config/default.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. */ @@ -70,10 +70,10 @@ proc runtest_start { } { global objdir global RUNTEST global RUNTESTFLAGS - + if {[which $RUNTEST] != 0} then { perror "Can't find $RUNTEST" } - + # return [open [concat "$RUNTEST $RUNTESTFLAGS"] r] } diff --git a/contrib/bluegnu2.0.3/testsuite/lib/libsup.exp b/contrib/bluegnu2.0.3/testsuite/lib/libsup.exp index 64ef858..ed47679 100644 --- a/contrib/bluegnu2.0.3/testsuite/lib/libsup.exp +++ b/contrib/bluegnu2.0.3/testsuite/lib/libsup.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. */ @@ -84,7 +84,7 @@ proc start_expect { } { set EXPECT [findfile $base_dir/../../expect/expect "$base_dir/../../expect/expect" expect] verbose "EXPECT defaulting to $EXPECT" 2 } - + # catch close # catch wait @@ -99,7 +99,7 @@ proc start_expect { } { return -1 } } - + # Load the defaults file exp_send "source ${defaults_file}\n" expect { @@ -119,7 +119,7 @@ proc start_expect { } { # proc stop_expect { } { global spawn_id - + # make expect exit exp_send "exit\n" catch "close -i $spawn_id" @@ -148,7 +148,7 @@ proc load_test_lib { lib } { # proc exp_test { cmd pattern msg } { global spawn_id - + exp_send "puts ACK ; $cmd ; puts NAK\r\n" expect { "puts ACK*puts NAK" { @@ -158,7 +158,7 @@ proc exp_test { cmd pattern msg } { warning "Never got command echo" } } - + expect { "ACK" { exp_continue @@ -196,7 +196,7 @@ proc config_test { cmd true false msg } { warning "Never got command echo" } } - + expect { -re "Checking pattern*with*\[\r\n\]" { exp_continue diff --git a/example/hello/README b/example/hello/README index c2e8835..dfedcdd 100644 --- a/example/hello/README +++ b/example/hello/README @@ -25,7 +25,7 @@ that you may (or may not) find helpful in understanding just what is going on with the runtest script. Fortunately tcl is a pretty simply language and a quick scan of Ousterhout's text on tcl has been more than sufficient for me to conduct these experiments. Again, this document -only records my observations. +only records my observations. SECOND: I am not interested in or concerned with testing cross-compilation systems or anything exotic like remote execution. I @@ -36,7 +36,7 @@ was simply trying to gain an overall understanding of what and when the various tcl/expect files and procedures are executed. THIRD: There are really two parts to my studies, specifically: (i) the -study of runtest, and (ii) the use of the auto- tools to realize a +study of runtest, and (ii) the use of the auto- tools to realize a "make check" target that will invoke the runtest script for you. As a result, this document is organized into three parts: @@ -45,7 +45,7 @@ result, this document is organized into three parts: Part III: Running the example For small projects, you may not be interested in the autoconf/automake -tools and can safely skip Part II of this document. +tools and can safely skip Part II of this document. FOURTH: This example is setup only for recording the files and procedures that runtest uses. Technically it will compile a simple c++ @@ -85,31 +85,31 @@ let's take a look at the contents of the helloworld.* subdirectories in the testsuite subdirectory of this example: peabody>ls -R testsuite/helloworld.test* - ~/test/dejagnu/helloDemo + ~/test/dejagnu/helloDemo testsuite/helloworld.test1: total 8 4 helloworld.test1-1/ 4 test1.exp - + testsuite/helloworld.test1/helloworld.test1-1: total 4 4 test1-1.exp - + testsuite/helloworld.test2: total 8 4 test2.exp 4 test3.exp - + testsuite/helloworld.test3: total 12 4 config/ 4 lib/ 4 non_compliant_dir_name/ - + testsuite/helloworld.test3/config: total 4 4 config.exp - + testsuite/helloworld.test3/lib: total 4 4 lib.exp - + testsuite/helloworld.test3/non_compliant_dir_name: total 4 4 non_compliant.exp @@ -173,10 +173,10 @@ runtest command is issued): this file will be automagically created for you). Technically this file is organized into two parts, one that is set when the .configure script is executed; the second part can be edited and changed by the - user. + user. 3. It will try to load the file ./lib/TOOL.exp (this is probably a good place to locate definitions for the TOOL_init/TOOL_exit/TOOL_version - procedures. + procedures. 4. It will try to load some configuration files. Specifically 4a. It will try to load a base-config.exp file. On my system it searches, in order, the following subdirectories: @@ -234,7 +234,7 @@ I.3 Some notes I made during my week of study 3a. Look into srcdir (where the runtest command was issued) for lib/tool.exp; I guess the principle concept is to put tool specific - and platform independent expect scripts here. + and platform independent expect scripts here. 3b. Next look for for platform scripts in --srcdir/config (on my linux system it looks for one of unix.exp, gnu.exp, and default.exp (in @@ -247,7 +247,7 @@ I.3 Some notes I made during my week of study 4. Executing expect scripts. 4a. If an expect script is named on the command line it (and only it) is - run. otherwise.... + run. otherwise.... 4b. runtest looks in the testsuite directory and does a glob on TOOL.*/*.exp (ok, it's a recursive glob TOOL.*/.../*.exp) and @@ -263,7 +263,7 @@ I.3 Some notes I made during my week of study particular, on my machine, the search path is: 5a. the dejagnu install directory (/usr/share/dejagnu) and its - accompanying library directory (/usr/share/dejagnu/lib) + accompanying library directory (/usr/share/dejagnu/lib) 5b. in a dejagnu/lib directory one above the current directory (where runtest was run). that is in ../dejagnu/lib 5c. in the --srcdir lib @@ -275,14 +275,14 @@ I.3 Some notes I made during my week of study investigate this. 7. COOL: I can name an expect script in the --ignore command line option - to prune it from the set of scripts that are executed. + to prune it from the set of scripts that are executed. I.4 Some gotchas ---------------- 1. As far as I can tell the "testsuite" name is completely artificial - and you can store your tests in whatever subdirectory name you like. + and you can store your tests in whatever subdirectory name you like. 2. Don't try to issue the runtest command from outside the testsuite subdirectory using the "--srcdir target" command line argument. @@ -311,12 +311,12 @@ autoconf/automake and friends (I still don't). directory containing the testsuite you must have a Makefile.am to build the "make check" target. You only need to define the dejagnu option for AUTOMAKE_OPTIONS. If you want you can also add runtest - command line arguments to the RUNTESTDEFAULTFLAGS variable. + command line arguments to the RUNTESTDEFAULTFLAGS variable. The only problem I had with this was realizing that the Makefile.am to locate these definitions in is the one located *in* the testsuite subdirectory. DO NOT make these definitions in the root Makefile.am - file (unless you intend to place you TOOL.* subdirectories there). + file (unless you intend to place you TOOL.* subdirectories there). 2. I cannot figure out a good way to add alternate check targets (e.g., make check-test1) to run alternate tests on the command line. Since @@ -355,4 +355,4 @@ relevant targets, namely: make check make check-demo -Good Luck. \ No newline at end of file +Good Luck. diff --git a/lib/dejagnu.exp b/lib/dejagnu.exp index 5cf6f20..1224f36 100755 --- a/lib/dejagnu.exp +++ b/lib/dejagnu.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 @@ -42,7 +42,7 @@ proc exe_size {object} { perror "Need GNU size from the binutils" 0 return [list "-1" "Need GNU size."] } - + # Get the object size. We pass -x, to force hex output verbose "Getting the object file size for $object" 2 set status [catch "exec $SIZE -x $object" output] @@ -64,7 +64,7 @@ proc exe_size {object} { return [list $text $data] } -# Run the host's native compiler, not the cross one. Filter out the +# Run the host's native compiler, not the cross one. Filter out the # warnings and other extraneous stuff. # Returns: # A "" (empty) string if everything worked, or the @@ -78,7 +78,7 @@ proc host_compile {compline} { verbose "Compiling for the host using: $CC $INCLUDES $LIBS $compline" 2 set status [catch "exec $CC $INCLUDES $LIBS $compline" comp_output] verbose "Compiler returned $comp_output" 2 - + # prune common warnings and other stuff we can safely ignore set comp_output [prune_warnings $comp_output] @@ -97,7 +97,7 @@ proc host_compile {compline} { return ${comp_output} } -# Execute the executable file, and anaylyse the output for the +# Execute the executable file, and anaylyse the output for the # test state keywords. # Returns: # A "" (empty) string if everything worked, or an error message @@ -110,9 +110,9 @@ proc host_execute {args} { set file all set timetol 0 set arguments "" - + expect_before buffer_full { perror "Buffer full" } - + if { [llength $args] == 0} { set executable $args } else { diff --git a/lib/dg.exp b/lib/dg.exp index 7d9bea5..1712b76 100644 --- a/lib/dg.exp +++ b/lib/dg.exp @@ -5,12 +5,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. @@ -156,7 +156,7 @@ # The default do-what keyword. set dg-do-what-default compile -# When dg-interpreter-batch-mode is 1, no execution test or excess error +# When dg-interpreter-batch-mode is 1, no execution test or excess error # tests are performed. set dg-interpreter-batch-mode 0 @@ -591,7 +591,7 @@ proc dg-runtest { testcases flags default-extra-flags } { # Syntax: dg-trim-dirname dir_name file_name # We need to go through this contorsion in order to properly support # directory-names which might have embedded regexp special characters. - + proc dg-trim-dirname { dir_name file_name } { set special_character "\[\?\+\-\.\(\)\$\|\]" regsub -all $special_character $dir_name "\\\\&" dir_name @@ -658,9 +658,9 @@ proc dg-test { args } { if { "$tool_flags" != "" } { set name "$name $tool_flags" } - + # Process any embedded dg options in the testcase. - + # Use "" for the second element of dg-do-what so we can tell if it's been # explicitly set to "S". set dg-do-what [list ${dg-do-what-default} "" P] diff --git a/lib/framework.exp b/lib/framework.exp index ced1283..04a4ceb 100644 --- a/lib/framework.exp +++ b/lib/framework.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. @@ -69,7 +69,7 @@ proc open_logs { } { global sum_file global xml_file global xml - + if { ${tool} == "" } { set tool testrun } @@ -98,7 +98,7 @@ proc close_logs { } { global sum_file global xml global xml_file - + if { $xml } { xml_output "" catch "close $xml_file" @@ -115,7 +115,7 @@ proc close_logs { } { proc isbuild { pattern } { global build_triplet global host_triplet - + if ![info exists build_triplet] { set build_triplet ${host_triplet} } @@ -123,7 +123,7 @@ proc isbuild { pattern } { return $build_triplet } verbose "Checking pattern \"$pattern\" with $build_triplet" 2 - + if [string match "$pattern" $build_triplet] { return 1 } else { @@ -191,7 +191,7 @@ proc is_remote { board } { proc is3way {} { global host_triplet global build_triplet - + if ![info exists build_triplet] { set build_triplet ${host_triplet} } @@ -209,12 +209,12 @@ proc is3way {} { # proc ishost { pattern } { global host_triplet - + if [string match "" $pattern] { return $host_triplet } verbose "Checking pattern \"$pattern\" with $host_triplet" 2 - + if [string match "$pattern" $host_triplet] { return 1 } else { @@ -230,7 +230,7 @@ proc ishost { pattern } { # proc istarget { args } { global target_triplet - + # if no arg, return the config string if [string match "" $args] { if [info exists target_triplet] { @@ -262,7 +262,7 @@ proc istarget { args } { proc isnative { } { global target_triplet global build_triplet - + if [string match $build_triplet $target_triplet] { return 1 } @@ -302,7 +302,7 @@ proc unknown { args } { proc clone_output { message } { global sum_file global all_flag - + if { $sum_file != "" } { puts $sum_file "$message" } @@ -338,7 +338,7 @@ proc reset_vars {} { # other miscellaneous variables global prms_id global bug_id - + # reset them all set prms_id 0 set bug_id 0 @@ -423,7 +423,7 @@ proc log_summary { args } { incr totlcnt test_counts($x,$which) } set testcnt test_counts(total,$which) - + if { $testcnt>$totlcnt || $testcnt<$totlcnt } { if { $testcnt > $totlcnt } { set mismatch "unreported [expr $testcnt-$totlcnt]" @@ -470,7 +470,7 @@ proc cleanup {} { global exit_status global done_list global subdir - + #catch "exec rm -f [glob xgdb core *.x *.o *_soc a.out]" #catch "exec rm -f [glob -nocomplain $subdir/*.o $subdir/*.x $subdir/*_soc]" } @@ -485,13 +485,13 @@ proc cleanup {} { proc setup_xfail { args } { global xfail_flag global xfail_prms - + set xfail_prms 0 set argc [ llength $args ] for { set i 0 } { $i < $argc } { incr i } { set sub_arg [ lindex $args $i ] # is a prms number. we assume this is a string with no '-' characters - if [regexp "^\[^\-\]+$" $sub_arg] { + if [regexp "^\[^\-\]+$" $sub_arg] { set xfail_prms $sub_arg continue } @@ -512,19 +512,19 @@ proc setup_xfail { args } { # bug id. # # Multiple target triplet patterns can be specified for targets -# for which the test is known to fail. +# for which the test is known to fail. # # proc setup_kfail { args } { global kfail_flag global kfail_prms - + set kfail_prms 0 set argc [ llength $args ] for { set i 0 } { $i < $argc } { incr i } { set sub_arg [ lindex $args $i ] # is a prms number. we assume this is a string with no '-' characters - if [regexp "^\[^\-\]+$" $sub_arg] { + if [regexp "^\[^\-\]+$" $sub_arg] { set kfail_prms $sub_arg continue } @@ -542,7 +542,7 @@ proc setup_kfail { args } { # check to see if a conditional xfail is triggered # message {targets} {include} {exclude} -# +# # proc check_conditional_xfail { args } { global compiler_flags @@ -565,10 +565,10 @@ proc check_conditional_xfail { args } { } else { set excludes "" } - + # loop through all the targets, checking the options for each one verbose "Compiler flags are: $compiler_flags" 2 - + set incl_hit 0 set excl_hit 0 foreach targ $target_list { @@ -577,7 +577,7 @@ proc check_conditional_xfail { args } { # this is really messy cause each set of options to look for # may also be a list. We also want to find each element of the # list, regardless of order to make sure they're found. - # So we look for lists in side of lists, and make sure all + # So we look for lists in side of lists, and make sure all # the elements match before we decide this is legit. # Se we 'incl_hit' to 1 before the loop so that if the 'includes' # list is empty, this test will report a hit. (This can be @@ -644,7 +644,7 @@ proc check_conditional_xfail { args } { proc clear_xfail { args } { global xfail_flag global xfail_prms - + set argc [ llength $args ] for { set i 0 } { $i < $argc } { incr i } { set sub_arg [ lindex $args $i ] @@ -666,7 +666,7 @@ proc clear_xfail { args } { proc clear_kfail { args } { global kfail_flag global kfail_prms - + set argc [ llength $args ] for { set i 0 } { $i < $argc } { incr i } { set sub_arg [ lindex $args $i ] @@ -723,7 +723,7 @@ proc record_test { type message args } { if [info exists errorInfo] { set error $errorInfo } - global expect_out + global expect_out set rio { "" "" } if { [catch { set rio [split $expect_out(buffer) "\n"] } result]} { #do nothing - leave as { "" "" } @@ -835,7 +835,7 @@ proc record_test { type message args } { if {[info exists local_record_procs($lowcase_type)]} { $local_record_procs($lowcase_type) "$message" } - + # Reset these so they're ready for the next test case. We don't reset # prms_id or bug_id here. There may be multiple tests for them. Instead # they are reset in the main loop after each test. It is also the @@ -861,7 +861,7 @@ proc pass { message } { } unset compiler_conditional_xfail_data } - + if $kfail_flag { record_test KPASS $message } elseif $xfail_flag { @@ -949,14 +949,14 @@ proc get_warning_threshold { } { # proc warning { args } { global warncnt - + if { [llength $args] > 1 } { set warncnt [lindex $args 1] } else { incr warncnt } set message [lindex $args 0] - + clone_output "WARNING: $message" global errorInfo @@ -967,7 +967,7 @@ proc warning { args } { # # Prints error messages -# These are errors from the framework, not from the tools being tested. +# These are errors from the framework, not from the tools being tested. # It takes a string, and an optional number and returns nothing. # proc perror { args } { @@ -979,7 +979,7 @@ proc perror { args } { incr errcnt } set message [lindex $args 0] - + clone_output "ERROR: $message" global errorInfo diff --git a/lib/ftp.exp b/lib/ftp.exp index c3df24d..4e22232 100644 --- a/lib/ftp.exp +++ b/lib/ftp.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 @@ -177,7 +177,7 @@ proc ftp_download { host localfile remotefile } { } else { set remotehost $host } - + set spawn_id [ftp_open $host] if { $spawn_id < 0 } { return "" diff --git a/lib/kermit.exp b/lib/kermit.exp index ed31f40..d51b6e2 100644 --- a/lib/kermit.exp +++ b/lib/kermit.exp @@ -4,21 +4,21 @@ # 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 # -# Connect to DEST using kermit. Note that we're just using kermit as a +# Connect to DEST using kermit. Note that we're just using kermit as a # simple serial or network connect program; we don't actually use Kermit # protocol to do downloads. # returns -1 if it failed, otherwise it returns @@ -41,7 +41,7 @@ proc kermit_open { dest args } { set port [board_info ${dest} netport] set device "-j [board_info ${dest} netport]" } - + set tries 0 set result -1 verbose "kermit $device" @@ -52,7 +52,7 @@ proc kermit_open { dest args } { } expect { - -re ".*ermit.*>.*$" { + -re ".*ermit.*>.*$" { send "c\n" expect { -re "Connecting to.*$port.*Type the escape character followed by C to.*options.*\[\r\n\]$" { @@ -78,7 +78,7 @@ proc kermit_open { dest args } { exp_continue } } - timeout { + timeout { warning "Timed out trying to connect." set result -1 incr tries diff --git a/lib/libgloss.exp b/lib/libgloss.exp index 1fc5bb8..13d30d0 100644 --- a/lib/libgloss.exp +++ b/lib/libgloss.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 @@ -377,7 +377,7 @@ proc libstdc++_link_flags { args } { # # Get the list of directories and -m options for gcc. This is kinda bogus that -# generic testing software needs support for gcc hardwired in, but to make +# generic testing software needs support for gcc hardwired in, but to make # testing the GNU tools work right, there didn't seem to be any other way. # @@ -513,7 +513,7 @@ proc get_multilibs { args } { # extract the MULTILIB_MATCHES from dumpspecs set multimatches "" - set lines [split [exec $compiler -dumpspecs] "\n"] + set lines [split [exec $compiler -dumpspecs] "\n"] for {set i 0} {$i <= [llength $lines] - 1} {incr i 1} { if {"*multilib_matches:" == "[lindex $lines $i]"} { set multimatches [lindex $lines [expr $i + 1]] @@ -597,7 +597,7 @@ proc find_binutils_prog { name } { global tool_root_dir if ![is_remote host] { - + set file [lookfor_file $tool_root_dir $name] if { $file == "" } { set file [lookfor_file $tool_root_dir ${name}-new] @@ -878,7 +878,7 @@ proc winsup_include_flags { args } { } } verbose "No winsup support for this target" - + } # # Find the winsup libraries in the current source tree. diff --git a/lib/remote.exp b/lib/remote.exp index 537e606..8fc011e 100644 --- a/lib/remote.exp +++ b/lib/remote.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 @@ -30,11 +30,11 @@ load_lib "tip.exp" load_lib "rsh.exp" load_lib "ftp.exp" -# +# # Open a connection to a remote host or target. This requires the target_info # array be filled in with the proper info to work. # -# type is either "build", "host", "target", or the name of a board loaded +# type is either "build", "host", "target", or the name of a board loaded # into the board_info array. The default is target if no name is supplied. # It returns the spawn id of the process that is the connection. # @@ -124,9 +124,9 @@ proc local_exec { commandline inp outp timeout } { } # Why do we use tee? Because open can't redirect both input and output. if { $use_tee } { - set result [catch {open "| ${commandline} $inp |& tee $outpf" RDONLY} id] + set result [catch {open "| ${commandline} $inp |& tee $outpf" RDONLY} id] } else { - set result [catch {open "| ${commandline} $inp $outp" $mode} id] + set result [catch {open "| ${commandline} $inp $outp" $mode} id] } if { $result != 0 } { @@ -175,7 +175,7 @@ proc local_exec { commandline inp outp timeout } { # Uuuuuuugh. Now I'm getting really sick. # If we didn't get an EOF, we have to kill the poor defenseless program. - # However, Tcl has no kill primitive, so we have to execute an external + # However, Tcl has no kill primitive, so we have to execute an external # command in order to execute the execution. (English. Gotta love it.) if { ! $got_eof } { verbose "killing $pid $pgid" @@ -221,7 +221,7 @@ proc local_exec { commandline inp outp timeout } { } } -# +# # Execute the supplied program on HOSTNAME. There are four optional arguments # the first is a set of arguments to pass to PROGRAM, the second is an # input file to feed to stdin of PROGRAM, the third is the name of an @@ -240,7 +240,7 @@ proc remote_exec { hostname program args } { } else { set pargs "" } - + if { [llength $args] > 1 } { set inp "[lindex $args 1]" } else { @@ -262,7 +262,7 @@ proc remote_exec { hostname program args } { verbose -log "Executing on $hostname: $program $pargs $inp $outp (timeout = $timeout)" 2 - # Run it locally if appropriate. + # Run it locally if appropriate. if { ![is_remote $hostname] } { return [local_exec "$program $pargs" $inp $outp $timeout] } else { @@ -586,8 +586,8 @@ proc remote_transmit { dest file } { proc remote_raw_transmit { dest file } { return [call_remote raw transmit "$dest" "$file"] } - -# + +# # The default transmit procedure if no other exists. This feeds the # supplied file directly into the connection. # @@ -667,7 +667,7 @@ proc remote_raw_file { dest args } { return [eval call_remote raw file \"$dest\" $args] } -# +# # Perform the specified file op on a remote Unix board. # @@ -798,7 +798,7 @@ proc remote_spawn { dest commandline args } { return -1 } } else { - set result [catch {open "| ${commandline}" "w"} id] + set result [catch {open "| ${commandline}" "w"} id] if { $result != 0 } { return -1 } @@ -1019,7 +1019,7 @@ proc standard_load { dest prog args } { if [board_info $dest exists remote_link] { if [[board_info $dest remote_link] $remotefile] { verbose -log "Couldn't do remote link" - remote_file target delete $remotefile + remote_file target delete $remotefile return "unresolved" } } @@ -1142,8 +1142,8 @@ proc check_for_board_status { variable } { # status message, then the absence of it means that the program # crashed, regardless of status found elsewhere (e.g. simulator exit # code). - if { [target_info needs_status_wrapper] != "" } then { - set nomatch_return 2 + if { [target_info needs_status_wrapper] != "" } then { + set nomatch_return 2 } else { set nomatch_return -1 } diff --git a/lib/rlogin.exp b/lib/rlogin.exp index ec915e4..fc1cc16 100644 --- a/lib/rlogin.exp +++ b/lib/rlogin.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 @@ -45,7 +45,7 @@ proc rlogin_open { arg } { } else { set shell_prompt [board_info $arg shell_prompt] } - + if [board_info $arg exists fileid] { unset board_info($arg,fileid) } @@ -55,7 +55,7 @@ proc rlogin_open { arg } { } else { set RLOGIN [board_info $arg rlogin_prog] } - + # start connection and store the spawn_id verbose "Opening a $RLOGIN connection to $hostname" 2 spawn $RLOGIN $hostname @@ -64,7 +64,7 @@ proc rlogin_open { arg } { return } set board_info($arg,fileid) $spawn_id - + # Try to connect to the target. We give up after 3 attempts. while { $tries <= 3 } { expect { @@ -107,7 +107,7 @@ proc rlogin_open { arg } { -re "Sorry, this system is engaged.*Connection closed.*$" { warning "rlogin: system engaged." } - timeout { + timeout { warning "rlogin: timed out trying to connect." } eof { @@ -153,7 +153,7 @@ proc rlogin_spawn { dest cmdline } { set prefix "shell " set ok 1 } - -re ".*$shell_prompt" { + -re ".*$shell_prompt" { set ok 1 } default { } diff --git a/lib/rsh.exp b/lib/rsh.exp index ed71143..4c91cec 100644 --- a/lib/rsh.exp +++ b/lib/rsh.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 @@ -56,7 +56,7 @@ proc rsh_open { hostname } { if [board_info $hostname exists fileid] { unset board_info($hostname,fileid) } - + spawn $RSH $rsh_useropts $hostname if { $spawn_id < 0 } { perror "invalid spawn id from $RSH" @@ -133,7 +133,7 @@ proc rsh_open { hostname } { } incr tries } - + if { $result < 0 } { # perror "$RSH: couldn't connect after $tries tries." close -i $spawn_id @@ -227,7 +227,7 @@ proc rsh_upload {desthost srcfile destfile} { # # Execute "$cmd $args[0]" on $boardname. -# +# proc rsh_exec { boardname cmd args } { if { [llength $args] > 0 } { set pargs [lindex $args 0] @@ -252,7 +252,7 @@ proc rsh_exec { boardname cmd args } { } else { set RSH [board_info $boardname rsh_prog] } - + if [board_info $boardname exists username] { set rsh_useropts "-l [board_info $boardname username]" } else { diff --git a/lib/target.exp b/lib/target.exp index d5540e1..93b08a8 100644 --- a/lib/target.exp +++ b/lib/target.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 @@ -41,7 +41,7 @@ set text "\[- A-Za-z0-9\.\;\"\_\:\'\`\(\)\!\#\=\+\?\&\*]" # connect - the connectmode for this target. This is for both IP and # serial connections. # hostname - the hostname of the target. This is for TCP/IP based -# connections, and is also used for versions of tip that +# connections, and is also used for versions of tip that # use /etc/remote. # serial - the serial port. This is typically /dev/tty? or com?:. # baud - the baud rate for a serial port connection. @@ -144,9 +144,9 @@ proc prune_warnings { text } { } if [ishost "hppa*-*-hpux*"] { # Ignore the compiler's warnings about PA incompatibility. - regsub -all "(^|\n)\[^\n\]*PA 2.0 object file \[^\n\]* was detected. The linked output may not run on a PA 1.x system." $text "" text - - regsub -all "(^|\n)\[^\n\]*PA 2.0 object file \[^\n\]* was detected. The linked output may not run on a PA 1.x system." $text "" text + regsub -all "(^|\n)\[^\n\]*PA 2.0 object file \[^\n\]* was detected. The linked output may not run on a PA 1.x system." $text "" text + + regsub -all "(^|\n)\[^\n\]*PA 2.0 object file \[^\n\]* was detected. The linked output may not run on a PA 1.x system." $text "" text # And the linker's +vcompatwarnings verbage. regsub -all "(^|\n)\[^\n\]*Linker features were used that may not be supported\[^\n\]*.\[^\n\]*." $text "" text @@ -162,7 +162,7 @@ proc prune_warnings { text } { # the source line and underline chars. # regsub -all "Warning .*The linkage directive is ignored for an object or function declared static..\[^\n\]*.\[^\n\]*." $text "" text - + # Ignore these warnings, which I often see from the ANSI C # compiler installed on HP-UX 11.0 machines. (Something is # probably wrong with an installation, or perhaps NLS isn't @@ -175,19 +175,19 @@ proc prune_warnings { text } { # regsub -all "Warning: Unable to open pxdb message catalog.*" $text "" text regsub -all ".* Using internal messages.*" $text "" text - + # Another form of the "unable to find message catalog" warning. # regsub -all "cpp: warning .*Possibly incorrect message catalog." $text "" text - + # Another odd warning on 11.0. # regsub -all "aCC .assigner.: Warning .*Could not find library for -l.*" $text "" text - + # Oh heck, just keep adding 'em here... # regsub -all "aCC .assigner.: Warning .*Could not satisfy instantiation request for \[^\n\]* contained in\[^\n\]*\n\t/lib/pa20_64/lib\[a-zA-Z0-9\]*.sl" $text "" text - + # Remove the lines that are output by the HP F77 compiler to # indicate the functions that are being compiled. upvar compiler_type compiler_type @@ -270,7 +270,7 @@ proc prune_warnings { text } { # GNU ld warns about functions marked as dangerous in GNU libc. regsub -all "(^|\n)\[^\n\]*: In function\[^\n\]*\n\[^\n\]\[^\n\]*function is dangerous\[^\n\]*" $text "" text - # GNU ld warns about functions marked as dangerous in GNU libc. + # GNU ld warns about functions marked as dangerous in GNU libc. regsub -all "(^|\n)\[^\n\]*: In function\[^\n\]*\n\[^\n\]\[^\n\]*the use of \[^\n\]* is dangerous, better use \[^\n\]*" $text "" text # Libgloss libnosys defines functions that warn when linked in @@ -405,7 +405,7 @@ proc default_target_compile {source destfile type options} { global CC_FOR_TARGET global CXX_FOR_TARGET global F77_FOR_TARGET - + if [info exists CC_FOR_TARGET] { if { $compiler == "" } { set compiler $CC_FOR_TARGET @@ -444,7 +444,7 @@ proc default_target_compile {source destfile type options} { if { $type == "preprocess" } { append add_flags " -E" } - + if { $type == "assembly" } { append add_flags " -S" } diff --git a/lib/telnet.exp b/lib/telnet.exp index 3c21752..69ba6bc 100644 --- a/lib/telnet.exp +++ b/lib/telnet.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 @@ -78,7 +78,7 @@ proc telnet_open { hostname args } { if ![info exists shell_prompt] { # if no prompt, then set it to something generic set shell_prompt ".*> " } - + set tries 0 set result -1 set need_respawn 1 @@ -174,7 +174,7 @@ proc telnet_open { hostname args } { -re "\[\r\n\]+" { exp_continue } - timeout { + timeout { exp_send "\n" } eof { diff --git a/lib/tip.exp b/lib/tip.exp index 0828cec..cac2e85 100644 --- a/lib/tip.exp +++ b/lib/tip.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 @@ -38,7 +38,7 @@ proc tip_open { hostname } { } else { set shell_prompt ".*> " # Pick something reasonably generic. } - + if [board_info ${hostname} exists fileid] { unset board_info(${hostname},fileid) } @@ -48,7 +48,7 @@ proc tip_open { hostname } { return -1 } expect { - -re ".*connected.*$" { + -re ".*connected.*$" { send "\r\n" expect { -re ".*$shell_prompt.*$" { @@ -72,7 +72,7 @@ proc tip_open { hostname } { incr tries if { $tries <= 2 } { exp_continue - } + } } -re "Connection Closed.*$" { perror "Never connected." diff --git a/lib/utils.exp b/lib/utils.exp index 8c5d338..c3df545 100644 --- a/lib/utils.exp +++ b/lib/utils.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 @@ -20,7 +20,7 @@ # This file was written by Rob Savoye. (rob@welcomehome.org) # -# Most of the procedures found here mimic their unix counter-part. +# Most of the procedures found here mimic their unix counter-part. # This file is sourced by runtest.exp, so they are usable by any test case. # @@ -78,7 +78,7 @@ proc getdirs { args } { perror "$tmp" return "" } - + if ![info exists dirs] { return "" } else { @@ -101,7 +101,7 @@ proc find { rootdir pattern } { # find all the directories set dirs [concat [getdirs -all $rootdir] $rootdir] - + # find all the files in the directories that match the pattern foreach i $dirs { verbose "Looking in $i" 3 @@ -125,10 +125,10 @@ proc find { rootdir pattern } { # proc which { file } { global env - + # strip off any extraneous arguments (like flags to the compiler) set file [lindex $file 0] - + # if it exists then the path must be OK # ??? What if $file has no path and "." isn't in $PATH? if [file exists $file] { @@ -139,7 +139,7 @@ proc which { file } { } else { return 0 } - + foreach i $path { verbose "Checking against $i" 3 if [file exists $i/$file] { @@ -155,7 +155,7 @@ proc which { file } { } # -# Looks for a string in a file. +# Looks for a string in a file. # return:list of lines that matched or NULL if none match. # args: first arg is the filename, # second is the pattern, @@ -163,12 +163,12 @@ proc which { file } { # Options: line - puts line numbers of match in list # proc grep { args } { - + set file [lindex $args 0] set pattern [lindex $args 1] - + verbose "Grepping $file for the pattern \"$pattern\"" 3 - + set argc [llength $args] if { $argc > 2 } { for { set i 2 } { $i < $argc } { incr i } { @@ -178,7 +178,7 @@ proc grep { args } { } else { set options "" } - + set i 0 set fd [open $file r] while { [gets $fd cur_line]>=0 } { @@ -225,7 +225,7 @@ proc prune { list pattern } { return $tmp } -# +# # Attempt to kill a process that you started on the local machine. # proc slay { name } { @@ -249,7 +249,7 @@ proc absolute { path } { if [string match "." $path] { return [pwd] } - + set basedir [pwd] cd $path set path [pwd] @@ -322,23 +322,23 @@ proc runtest_file_p { runtests testcase } { proc diff { file_1 file_2 } { set eof -1 set differences 0 - + if [file exists ${file_1}] { set file_a [open ${file_1} r] } else { warning "${file_1} doesn't exist" return 0 } - + if [file exists ${file_2}] { set file_b [open ${file_2} r] } else { warning "${file_2} doesn't exist" return 0 } - + verbose "# Diff'ing: ${file_1} ${file_2}\n" 1 - + set list_a "" while { [gets ${file_a} line] != ${eof} } { if [regexp "^#.*$" ${line}] { @@ -348,7 +348,7 @@ proc diff { file_1 file_2 } { } } close ${file_a} - + set list_b "" while { [gets ${file_b} line] != ${eof} } { if [regexp "^#.*$" ${line}] { @@ -376,7 +376,7 @@ proc diff { file_1 file_2 } { set differences -1 } } - + if { $differences == -1 || [llength ${list_a}] != [llength ${list_b}] } { verbose "Files not the same" 2 set differences -1 @@ -392,7 +392,7 @@ proc diff { file_1 file_2 } { # proc setenv { var val } { global env - + set env($var) $val } diff --git a/packaging/deb/changelog b/packaging/deb/changelog index fbcec15..9fcf3a2 100644 --- a/packaging/deb/changelog +++ b/packaging/deb/changelog @@ -63,8 +63,8 @@ dejagnu (1.3-5) unstable; urgency=low -- Kevin Dalley Sat, 12 Oct 1996 02:05:21 -0700 - - + + Sun Jun 2 18:06:24 1996 Kevin Dalley diff --git a/packaging/rpm/dejagnu.spec b/packaging/rpm/dejagnu.spec index 7be877e..1f7414c 100644 --- a/packaging/rpm/dejagnu.spec +++ b/packaging/rpm/dejagnu.spec @@ -49,7 +49,7 @@ rm -rf $RPM_BUILD_ROOT # %config site.exp %doc COPYING NEWS README AUTHORS INSTALL ChangeLog doc/overview doc/overview.ps doc/overview.pdf - + %changelog * Thu Aug 29 2002 Rob Savoye - Update version number for 1.4.3 release. @@ -89,4 +89,4 @@ rm -rf $RPM_BUILD_ROOT * Sun Feb 1 1998 Jeff Johnson - Create. - \ No newline at end of file + diff --git a/runtest.exp b/runtest.exp index aaefb1d..aff9108 100755 --- a/runtest.exp +++ b/runtest.exp @@ -5,12 +5,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. @@ -52,7 +52,7 @@ set exit_status 0 ;# exit code returned by this program set xfail_flag 0 ;# indicates that a failure is expected set xfail_prms 0 ;# GNATS prms id number for this expected failure set kfail_flag 0 ;# indicates that it is a known failure -set kfail_prms 0 ;# bug id for the description of the known failure +set kfail_prms 0 ;# bug id for the description of the known failure set sum_file "" ;# name of the file that contains the summary log set base_dir "" ;# the current working directory set xml_file "" ;# name of the xml output if requested @@ -67,7 +67,7 @@ set objdir "." ;# directory where test case binaries live set reboot 0 set configfile site.exp ;# (local to this file) set multipass "" ;# list of passes and var settings -set errno ""; ;# +set errno ""; ;# set exit_error 0 ;# Toggle for whether to set the exit status ;# on Tcl bugs in test case drivers. # @@ -182,7 +182,7 @@ proc verbose { args } { set level [lindex $args [expr $i+1]] } set message [lindex $args $i] - + if { $verbose >= $level } { # There is no need for the "--" argument here, but play it safe. # We assume send_user also sends the text to the log file (which @@ -260,7 +260,7 @@ proc transform { name } { # arg2 is optional, and it's what gets returned if # the file doesn't exist. # -proc findfile { args } { +proc findfile { args } { # look for the file verbose "Seeing if [lindex $args 0] exists." 2 if [file exists [lindex $args 0]] { @@ -692,7 +692,7 @@ if [expr { $build_triplet == "" && $host_triplet == ""} ] { break } } - + # get the canonical config name if ![info exists config_guess] { send_error "ERROR: Couldn't find config.guess program.\n" @@ -743,7 +743,7 @@ proc get_local_hostname { } { # # We put these here so that they can be overridden later by site.exp or # friends. -# +# # Set up the target as machine NAME. We also load base-config.exp as a # default configuration. The config files are sourced with the global # variable $board set to the name of the current target being defined. @@ -1128,7 +1128,7 @@ for { set i 0 } { $i < $argc } { incr i } { "--sr*" { # (--srcdir) where the testsuite source code lives # Already parsed, but parse again to make sure command line # options override any config file. - + set srcdir $optarg continue } @@ -1180,7 +1180,7 @@ for { set i 0 } { $i < $argc } { incr i } { "[A-Z0-9_-.]*=*" { # skip makefile style args like CC=gcc, etc... (processed in first pass) continue } - + default { if [info exists tool] { if { [info proc ${tool}_option_proc] != "" } { @@ -1227,7 +1227,7 @@ open_logs clone_output "Test Run By $logname on [timestamp -format %c]" if [is3way] { clone_output "Target is $target_triplet" - clone_output "Host is $host_triplet" + clone_output "Host is $host_triplet" clone_output "Build is $build_triplet" } else { if [isnative] { @@ -1290,7 +1290,7 @@ proc load_config { args } { # are assumed to be two of them; one defines a basic set of # functionality for the target that can be used by all tool # testsuites, and the other defines any necessary tool-specific -# functionality. These files are loaded via load_config. +# functionality. These files are loaded via load_config. # # These used to all be named $target_abbrev-$tool.exp, but as the # $tool variable goes away, it's now just $target_abbrev.exp. First @@ -1467,7 +1467,7 @@ proc runtest { test_file_name } { # We can't call `perror' here, it resets `errorInfo' # before we want to look at it. Also remember that perror # increments `errcnt'. If we do call perror we'd have to - # reset errcnt afterwards. + # reset errcnt afterwards. clone_output "ERROR: tcl error sourcing $test_file_name." if [info exists errorInfo] { clone_output "ERROR: $errorInfo" @@ -1515,7 +1515,7 @@ if ![exp_debug] { # # Given a list of targets, process any iterative lists. -# +# proc process_target_variants { target_list } { set result {} foreach x $target_list { diff --git a/testsuite/config/default.exp b/testsuite/config/default.exp index fbec76b..d0acac6 100644 --- a/testsuite/config/default.exp +++ b/testsuite/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@gnu.org @@ -70,10 +70,10 @@ proc runtest_start { } { global objdir global RUNTEST global RUNTESTFLAGS - + if {[which $RUNTEST] != 0} then { perror "Can't find $RUNTEST" } - + # return [open [concat "$RUNTEST $RUNTESTFLAGS"] r] } diff --git a/testsuite/lib/libsup.exp b/testsuite/lib/libsup.exp index ce5cc84..136ae92 100644 --- a/testsuite/lib/libsup.exp +++ b/testsuite/lib/libsup.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 @@ -86,7 +86,7 @@ proc start_expect { } { set EXPECT [findfile $base_dir/../../expect/expect "$base_dir/../../expect/expect" expect] verbose "EXPECT defaulting to $EXPECT" 2 } - + # catch close # catch wait @@ -101,7 +101,7 @@ proc start_expect { } { return -1 } } - + # Load the defaults file exp_send "source ${defaults_file}\n" expect { @@ -121,7 +121,7 @@ proc start_expect { } { # proc stop_expect { } { global spawn_id - + # make expect exit exp_send "exit\n" catch "close -i $spawn_id" @@ -150,7 +150,7 @@ proc load_test_lib { lib } { # proc exp_test { cmd pattern msg } { global spawn_id - + exp_send "puts ACK ; $cmd ; puts NAK\r\n" expect { "puts ACK*puts NAK" { @@ -160,7 +160,7 @@ proc exp_test { cmd pattern msg } { warning "Never got command echo" } } - + expect { "ACK" { exp_continue @@ -198,7 +198,7 @@ proc config_test { cmd true false msg } { warning "Never got command echo" } } - + expect { -re "Checking pattern*with*\[\r\n\]" { exp_continue diff --git a/testsuite/runtest.all/config.test b/testsuite/runtest.all/config.test index a85095d..50c701e 100644 --- a/testsuite/runtest.all/config.test +++ b/testsuite/runtest.all/config.test @@ -39,7 +39,7 @@ if [isbuild $build_triplet] { } else { puts "FAILED: isbuild, native" } - + if [isbuild $target_cpu-*-$target_os ] { puts "PASSED: isbuild, native regexp" } else { @@ -98,7 +98,7 @@ if [isnative] { } if [is3way] { - puts "FAILED: is3way, native" + puts "FAILED: is3way, native" } else { puts "PASSED: is3way, native" } @@ -114,7 +114,7 @@ if [isnative] { } if [is3way] { - puts "FAILED: is3way, cross" + puts "FAILED: is3way, cross" } else { puts "PASSED: is3way, cross" } @@ -130,7 +130,7 @@ if [isnative] { } if [is3way] { - puts "PASSED: is3way, canadian cross" + puts "PASSED: is3way, canadian cross" } else { puts "FAILED: is3way, canadian cross" } diff --git a/testsuite/runtest.all/options.exp b/testsuite/runtest.all/options.exp index 63fbc97..8f2ca78 100644 --- a/testsuite/runtest.all/options.exp +++ b/testsuite/runtest.all/options.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 @@ -73,7 +73,7 @@ foreach i $tests { pass "[lindex $i 2]" } } - + set fd [open site.exp w] puts ${fd} "set host_triplet $host_triplet" -- cgit v1.1