mirror of
https://git.yoctoproject.org/poky
synced 2026-02-08 18:02:12 +01:00
oeqa/sshcontrol: don't source profile
Instead of sourcing /etc/profile to get $PATH including /usr/sbin, just assign to PATH in the ssh invocation. The remote /etc/profile may not actually be manipulating PATH as we expect, and there may be other commands which can interfere with the tests (such as resize emitting a series of control characters on connection). (From OE-Core rev: 0f3fb5bbf2fd7db82898fed3281af143387316ff) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
d39192a848
commit
40cd22815c
@@ -136,8 +136,7 @@ class SSHControl(object):
|
||||
timeout=0 - no timeout, let command run until it returns
|
||||
"""
|
||||
|
||||
# We need to source /etc/profile for a proper PATH on the target
|
||||
command = self.ssh + [self.ip, ' . /etc/profile; ' + command]
|
||||
command = self.ssh + [self.ip, 'export PATH=/usr/sbin:/sbin:/usr/bin:/bin; ' + command]
|
||||
|
||||
if timeout is None:
|
||||
return self._internal_run(command, self.defaulttimeout, self.ignore_status)
|
||||
|
||||
Reference in New Issue
Block a user