aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Elliston <bje@gnu.org>2016-04-15 08:57:10 +1000
committerBen Elliston <bje@gnu.org>2016-04-15 08:57:10 +1000
commit8cda35c115404073d824594084af807e8412b3a1 (patch)
tree9a1334bac9baf9b3008e83dbf60a47934b2c53ed
parentda57e729a161d0df6ae74bae160622b89bcbd23e (diff)
downloaddejagnu-8cda35c115404073d824594084af807e8412b3a1.zip
dejagnu-8cda35c115404073d824594084af807e8412b3a1.tar.gz
dejagnu-8cda35c115404073d824594084af807e8412b3a1.tar.bz2
* lib/ssh.exp (ssh_exec): Handle regexp return status.
-rw-r--r--ChangeLog4
-rw-r--r--lib/ssh.exp4
2 files changed, 7 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 72656c6..5e13486 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2016-04-15 Ben Elliston <bje@gnu.org>
+
+ * lib/ssh.exp (ssh_exec): Handle regexp return status.
+
2016-04-13 Ben Elliston <bje@gnu.org>
* lib/rsh.exp (rsh_exec): Improve verbose message.
diff --git a/lib/ssh.exp b/lib/ssh.exp
index 8273af4..5487589 100644
--- a/lib/ssh.exp
+++ b/lib/ssh.exp
@@ -186,7 +186,9 @@ proc ssh_exec { boardname program pargs inp outp } {
regsub "XYZ(\[0-9\]*)ZYX\n?" $output "" output
return [list $status "$SSH to $boardname failed for $program, $output"]
}
- regexp "XYZ(\[0-9\]*)ZYX" $output junk status
+ if { [regexp "XYZ(\[0-9\]*)ZYX" $output junk status] == 0 } {
+ set status ""
+ }
verbose "ssh_exec: status:$status text:$output" 4
if { $status == "" } {
return [list -1 "Couldn't parse $SSH output, $output."]