]> code.ossystems Code Review - openembedded-core.git/commitdiff
oeqa/sshcontrol: don't source profile
authorRoss Burton <ross.burton@intel.com>
Wed, 25 Nov 2015 15:00:50 +0000 (15:00 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 1 Dec 2015 21:30:56 +0000 (21:30 +0000)
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).

Signed-off-by: Ross Burton <ross.burton@intel.com>
meta/lib/oeqa/utils/sshcontrol.py

index 00f50510537f44087ba0e926dcadc74a19c72507..1658744165689f816017f447dbe07ada074f7036 100644 (file)
@@ -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)