diff options
author | Ben Elliston <bje@gnu.org> | 2016-04-07 16:57:08 +1000 |
---|---|---|
committer | Ben Elliston <bje@gnu.org> | 2016-04-07 16:57:08 +1000 |
commit | a5fe563337dd18f64a9e291764d6ddf16d681578 (patch) | |
tree | f6066e30f713bd6a3bf2837b34bdb726c6c22e89 | |
parent | 1de22bf567be9b0a1d9a2a9066f2f7e2f02563f4 (diff) | |
download | dejagnu-a5fe563337dd18f64a9e291764d6ddf16d681578.zip dejagnu-a5fe563337dd18f64a9e291764d6ddf16d681578.tar.gz dejagnu-a5fe563337dd18f64a9e291764d6ddf16d681578.tar.bz2 |
* lib/remote.exp (remote_exec): Join cd $remotedir and $program on
the command line with ';' and not &&.
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | lib/remote.exp | 6 |
2 files changed, 10 insertions, 1 deletions
@@ -1,5 +1,10 @@ 2016-04-07 Ben Elliston <bje@gnu.org> + * lib/remote.exp (remote_exec): Join cd $remotedir and $program on + the command line with ';' and not &&. + +2016-04-07 Ben Elliston <bje@gnu.org> + Reported by Faraz Shahbazker. * doc/dejagnu.texi (rsh_exec procedure): Fix broken @node. diff --git a/lib/remote.exp b/lib/remote.exp index 2b9a4da..fea11cf 100644 --- a/lib/remote.exp +++ b/lib/remote.exp @@ -314,7 +314,11 @@ proc remote_exec { hostname program args } { } else { if { [board_info $hostname exists remotedir] } { set remotedir [board_info $hostname remotedir] - set program "test -d $remotedir && cd $remotedir && $program" + # 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 result [call_remote "" exec $hostname $program $pargs $inp $outp] } |