aboutsummaryrefslogtreecommitdiff
path: root/lib/remote.exp
diff options
context:
space:
mode:
authorRob Savoye <rob@welcomehome.org>2002-02-27 05:33:07 +0000
committerRob Savoye <rob@welcomehome.org>2002-02-27 05:33:07 +0000
commit8bd9e0e9da1fadb663b268cb061ea7540935b18c (patch)
tree891d07aa5da20ba304589b862abc69fd4a90c790 /lib/remote.exp
parent76cd0d97ff9c211e8c49403b7f7fe338d991abf8 (diff)
downloaddejagnu-8bd9e0e9da1fadb663b268cb061ea7540935b18c.zip
dejagnu-8bd9e0e9da1fadb663b268cb061ea7540935b18c.tar.gz
dejagnu-8bd9e0e9da1fadb663b268cb061ea7540935b18c.tar.bz2
Wed Nov 21 18:02:49 PST 2001 Brendan Conoboy <blc@redhat.com>
* lib/rsh.exp: Obey rsh_prog/rcp_prog, support username * lib/remote.exp: same.
Diffstat (limited to 'lib/remote.exp')
-rw-r--r--lib/remote.exp34
1 files changed, 31 insertions, 3 deletions
diff --git a/lib/remote.exp b/lib/remote.exp
index d9c5c9d..a209930 100644
--- a/lib/remote.exp
+++ b/lib/remote.exp
@@ -442,6 +442,7 @@ proc call_remote { type proc dest args } {
if [board_info $dest exists name] {
set dest [board_info $dest name];
}
+verbose "In call_remote with $dest, $args"
if { $dest != "host" && $dest != "build" && $dest != "target" } {
if { ![board_info $dest exists name] } {
@@ -781,12 +782,29 @@ proc remote_raw_spawn { dest commandline } {
proc standard_spawn { dest commandline } {
global board_info
+ if ![board_info $dest exists rsh_prog] {
+ if { [which remsh] != 0 } {
+ set RSH remsh
+ } else {
+ set RSH rsh
+ }
+ } else {
+ set RSH [board_info $dest rsh_prog];
+ }
+
+ if ![board_info $dest exists username] {
+ set rsh_useropts ""
+ } else {
+ set rsh_useropts "-l $username"
+ }
+
if [board_info $dest exists hostname] {
set remote [board_info $dest hostname];
} else {
set remote $dest;
}
- spawn rsh $remote $commandline;
+
+ spawn $RSH $rsh_useropts $remote $commandline;
set board_info($dest,fileid) $spawn_id;
return $spawn_id;
}
@@ -1050,6 +1068,16 @@ proc standard_wait { dest timeout } {
proc check_for_board_status { variable } {
upvar $variable output;
+ # If all programs of this board have a wrapper that always outputs a
+ # 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
+ } else {
+ set nomatch_return -1
+ }
+
if [regexp "(^|\[\r\n\])\\*\\*\\* EXIT code" $output] {
regsub "^.*\\*\\*\\* EXIT code " $output "" result;
regsub "\[\r\n\].*$" $result "" result;
@@ -1059,12 +1087,12 @@ proc check_for_board_status { variable } {
verbose "got board status $result" 3
verbose "output is $output" 3
if { $result == "" } {
- return -1;
+ return $nomatch_return;
} else {
return [expr $result];
}
} else {
- return -1;
+ return $nomatch_return;
}
}