diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-07-23 16:51:27 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-07-25 14:41:42 +0100 |
commit | 672517e0718c163511ba3640a65215d9e46df9d9 (patch) | |
tree | d919e700e34d9ad584876e0cea44875baf655e00 /meta | |
parent | 98b5364baea1da08ded1e5b9b2fb553ec34322d3 (diff) | |
download | poky-672517e0718c163511ba3640a65215d9e46df9d9.tar.gz |
oeqa/sshcontrol: Ensure we don't trigger ssh-askpass
If DISPLAY is set, ssh-askpass can be triggered which is not what
we want in the middle of sanity tests. We can disable this by
unsetting DISPLAY.
(From OE-Core rev: 085681a1418a29a8331cdde0f477f4e223de84be)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/lib/oeqa/utils/sshcontrol.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/meta/lib/oeqa/utils/sshcontrol.py b/meta/lib/oeqa/utils/sshcontrol.py index 1c81795a87..4f8d3d2c98 100644 --- a/meta/lib/oeqa/utils/sshcontrol.py +++ b/meta/lib/oeqa/utils/sshcontrol.py | |||
@@ -10,6 +10,7 @@ import subprocess | |||
10 | import time | 10 | import time |
11 | import os | 11 | import os |
12 | import select | 12 | import select |
13 | import copy | ||
13 | 14 | ||
14 | 15 | ||
15 | class SSHProcess(object): | 16 | class SSHProcess(object): |
@@ -31,6 +32,12 @@ class SSHProcess(object): | |||
31 | self.starttime = None | 32 | self.starttime = None |
32 | self.logfile = None | 33 | self.logfile = None |
33 | 34 | ||
35 | # Unset DISPLAY which means we won't trigger SSH_ASKPASS | ||
36 | env = copy.copy(os.environ) | ||
37 | if "DISPLAY" in env: | ||
38 | del env['DISPLAY'] | ||
39 | self.options['env'] = env | ||
40 | |||
34 | def log(self, msg): | 41 | def log(self, msg): |
35 | if self.logfile: | 42 | if self.logfile: |
36 | with open(self.logfile, "a") as f: | 43 | with open(self.logfile, "a") as f: |