From 6b5cde5bf1dfa159ed178e024f81006c5c507cf2 Mon Sep 17 00:00:00 2001 From: Ben Elliston Date: Sat, 16 Aug 2003 13:08:57 +0000 Subject: Whitespace fixes. --- 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 +++---- 11 files changed, 141 insertions(+), 141 deletions(-) (limited to 'contrib') 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 -- cgit v1.1