aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rwxr-xr-xlib/dejagnu.exp18
-rw-r--r--lib/dg.exp12
-rw-r--r--lib/framework.exp66
-rw-r--r--lib/ftp.exp8
-rw-r--r--lib/kermit.exp14
-rw-r--r--lib/libgloss.exp14
-rw-r--r--lib/remote.exp36
-rw-r--r--lib/rlogin.exp16
-rw-r--r--lib/rsh.exp14
-rw-r--r--lib/target.exp30
-rw-r--r--lib/telnet.exp10
-rw-r--r--lib/tip.exp12
-rw-r--r--lib/utils.exp46
13 files changed, 148 insertions, 148 deletions
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 "</testsuite>"
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
}