From 672517e0718c163511ba3640a65215d9e46df9d9 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Thu, 23 Jul 2015 16:51:27 +0100 Subject: 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 --- meta/lib/oeqa/utils/sshcontrol.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'meta/lib/oeqa/utils/sshcontrol.py') 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 import time import os import select +import copy class SSHProcess(object): @@ -31,6 +32,12 @@ class SSHProcess(object): self.starttime = None self.logfile = None + # Unset DISPLAY which means we won't trigger SSH_ASKPASS + env = copy.copy(os.environ) + if "DISPLAY" in env: + del env['DISPLAY'] + self.options['env'] = env + def log(self, msg): if self.logfile: with open(self.logfile, "a") as f: -- cgit v1.2.3-54-g00ecf