summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Bachmeyer <jcb62281@gmail.com>2018-11-11 15:48:38 +1100
committerBen Elliston <bje@gnu.org>2018-11-11 15:48:38 +1100
commit4c3512a5587c6e3746a35f592ec8f4cacc7630fa (patch)
tree0917e81036830c00759e0c282205f8eedfd8d3f1
parentde4b0bfa5234ad6e7a2eb11410b7db72df946cec (diff)
downloaddejagnu-4c3512a5587c6e3746a35f592ec8f4cacc7630fa.tar.gz
dejagnu-4c3512a5587c6e3746a35f592ec8f4cacc7630fa.tar.bz2
dejagnu-4c3512a5587c6e3746a35f592ec8f4cacc7630fa.zip
* lib/ssh.exp: Clean up whitespace.
* lib/remote.exp: Clean up whitespace. (remote_expect): Change literal tab to "\t" in regexp. Signed-off-by: Ben Elliston <bje@gnu.org>
-rw-r--r--ChangeLog6
-rw-r--r--lib/remote.exp38
-rw-r--r--lib/ssh.exp2
3 files changed, 26 insertions, 20 deletions
diff --git a/ChangeLog b/ChangeLog
index fa5a219..40b0a9d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2018-11-11 Jacob Bachmeyer <jcb62281@gmail.com>
+
+ * lib/ssh.exp: Clean up whitespace.
+ * lib/remote.exp: Clean up whitespace.
+ (remote_expect): Change literal tab to "\t" in regexp.
+
2018-11-05 Ben Elliston <bje@gnu.org>
* config.guess: Update to latest version.
diff --git a/lib/remote.exp b/lib/remote.exp
index 3d5d176..56b75f2 100644
--- a/lib/remote.exp
+++ b/lib/remote.exp
@@ -76,9 +76,9 @@ proc close_wait_program { program_id pid {wres_varname ""} } {
# Do so separately for each PID in the list to avoid differences
# in return value behavior for kill between shells
foreach spid $pid {
- # Prepend "-" to generate the "process group ID" needed by
- # kill.
- exec sh -c "exec > /dev/null 2>&1 && (kill -2 -$spid || kill -2 $spid)"
+ # Prepend "-" to generate the "process group ID" needed by
+ # kill.
+ exec sh -c "exec > /dev/null 2>&1 && (kill -2 -$spid || kill -2 $spid)"
}
# If the program doesn't exit gracefully when stdin closes,
@@ -91,11 +91,11 @@ proc close_wait_program { program_id pid {wres_varname ""} } {
set sh_cmd "exec > /dev/null 2>&1"
append sh_cmd " && sleep $secs && ("
foreach spid $pid {
- append sh_cmd "(kill -15 -$spid || kill -15 $spid);"
+ append sh_cmd "(kill -15 -$spid || kill -15 $spid);"
}
append sh_cmd ") && sleep $secs && ("
foreach spid $pid {
- append sh_cmd "(kill -9 -$spid || kill -9 $spid);"
+ append sh_cmd "(kill -9 -$spid || kill -9 $spid);"
}
append sh_cmd ") && sleep $secs"
set exec_pid [exec sh -c "$sh_cmd" &]
@@ -321,14 +321,14 @@ proc remote_exec { hostname program args } {
if { ![is_remote $hostname] } {
set result [local_exec "$program $pargs" $inp $outp $timeout]
} else {
- if { [board_info $hostname exists remotedir] } {
- set remotedir [board_info $hostname remotedir]
+ if { [board_info $hostname exists remotedir] } {
+ set remotedir [board_info $hostname remotedir]
# This is a bit too clever. Join cd $remotedir and
# $program on the command line with ';' and not '&&'. When
# called, $program may be mkdir to initially create the
# remote directory, in which case cd would fail.
- set program "test -d $remotedir && cd $remotedir; $program"
- }
+ set program "test -d $remotedir && cd $remotedir; $program"
+ }
set result [call_remote "" exec $hostname $program $pargs $inp $outp]
}
@@ -468,13 +468,13 @@ proc remote_download { dest file args } {
}
}
if { [board_info $dest exists remotedir] } {
- set remotedir [board_info $dest remotedir]
- set status [remote_exec $dest mkdir "-p $remotedir"]
- if { [lindex $status 0] != 0 } {
- perror "Couldn't create remote directory $remotedir on $dest"
+ set remotedir [board_info $dest remotedir]
+ set status [remote_exec $dest mkdir "-p $remotedir"]
+ if { [lindex $status 0] != 0 } {
+ perror "Couldn't create remote directory $remotedir on $dest"
return ""
- }
- set destfile "$remotedir/$destfile"
+ }
+ set destfile "$remotedir/$destfile"
}
return [call_remote "" download $dest $file $destfile]
@@ -1078,9 +1078,9 @@ proc standard_load { dest prog args } {
}
if {[is_remote $dest]} {
- if {![board_info $dest exists remotedir]} {
- set board_info($dest,remotedir) "/tmp/runtest.[pid]"
- }
+ if {![board_info $dest exists remotedir]} {
+ set board_info($dest,remotedir) "/tmp/runtest.[pid]"
+ }
set remotefile [file tail $prog]
set remotefile [remote_download $dest $prog $remotefile]
if { $remotefile == "" } {
@@ -1271,7 +1271,7 @@ proc remote_expect { board timeout args } {
}
set x "[lrange $args $i $i]"
- regsub "^\n*\[ \]*" "$x" "" x
+ regsub "^\n*\[ \t\]*" "$x" "" x
if { $x == "-i" || $x == "-timeout" || $x == "-ex" } {
append res "$x "
diff --git a/lib/ssh.exp b/lib/ssh.exp
index 5487589..c589ca9 100644
--- a/lib/ssh.exp
+++ b/lib/ssh.exp
@@ -204,7 +204,7 @@ proc ssh_close { desthost } {
global SSH ssh_initialized
verbose "Closing the SSH connection to $desthost"
-
+
set ssh_port ""
set scp_port ""
set ssh_user ""