aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristophe Lyon <christophe.lyon@linaro.org>2018-09-28 08:26:02 +0000
committerChristophe Lyon <christophe.lyon@linaro.org>2020-06-12 13:12:44 +0000
commitb6a3e52aec69146e930d85b84a81b1e059f2ffe5 (patch)
treea2b84673c40912e7761f60f930e2b65d83db7db3
parent382440f145811eeb3e85d0e57d9b8aa5418d1e80 (diff)
2018-09-28 Christophe Lyon <christophe.lyon@linaro.org>linaro-local/master-2020
* lib/ssh.exp (ssh_exec): Redirect stderr to stdout on the remote machine, to avoid race conditions. Change-Id: Ie0613a85fa990484fda41b13738025edf7477a62
-rw-r--r--lib/ssh.exp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/ssh.exp b/lib/ssh.exp
index a72f794..3c7b840 100644
--- a/lib/ssh.exp
+++ b/lib/ssh.exp
@@ -171,7 +171,7 @@ proc ssh_exec { boardname program pargs inp outp } {
# We use && here, as otherwise the echo always works, which makes it look
# like execution succeeded when in reality it failed.
- set ret [local_exec "$SSH $ssh_useropts $ssh_user$hostname sh -c '$program $pargs && echo XYZ\\\${?}ZYX \\; rm -f $program'" $inp $outp $timeout]
+ set ret [local_exec "$SSH $ssh_useropts $ssh_user$hostname sh -c '$program $pargs 2>&1 && echo XYZ\\\${?}ZYX \\; rm -f $program'" $inp $outp $timeout]
set status [lindex $ret 0]
set output [lindex $ret 1]