Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH] oeqa/sshcontrol: Ensure we don't trigger ssh-askpass
@ 2015-07-23 15:51 Richard Purdie
  0 siblings, 0 replies; only message in thread
From: Richard Purdie @ 2015-07-23 15:51 UTC (permalink / raw)
  To: openembedded-core

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.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>

diff --git a/meta/lib/oeqa/utils/sshcontrol.py b/meta/lib/oeqa/utils/sshcontrol.py
index 1c81795..4f8d3d2 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:




^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2015-07-23 15:51 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-23 15:51 [PATCH] oeqa/sshcontrol: Ensure we don't trigger ssh-askpass Richard Purdie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox