From: "André Draszik" <git@andred.net>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH 2/6] testimage.bbclass: enable ssh agent forwarding
Date: Wed, 16 Oct 2019 10:18:21 +0100 [thread overview]
Message-ID: <20191016091825.1910-3-git@andred.net> (raw)
In-Reply-To: <20191016091825.1910-1-git@andred.net>
Some targets might use ssh to do their power- or serial-
control. In that case, ssh might need access to the
ssh agent, or otherwise won't work.
So export it into the environment.
Note that the (old) oeqa/controllers/masterimage.py
tries to do that as well by exporting all of BB_ORIGENV
into the test environment. Here in testimage.bbclass we
are a bit more strict and only pass the ssh related
environment variables.
Signed-off-by: André Draszik <git@andred.net>
---
meta/classes/testimage.bbclass | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/meta/classes/testimage.bbclass b/meta/classes/testimage.bbclass
index befda6b72c..844ed87944 100644
--- a/meta/classes/testimage.bbclass
+++ b/meta/classes/testimage.bbclass
@@ -268,6 +268,18 @@ def testimage_main(d):
target_kwargs['serialcontrol_cmd'] = d.getVar("TEST_SERIALCONTROL_CMD") or None
target_kwargs['serialcontrol_extra_args'] = d.getVar("TEST_SERIALCONTROL_EXTRA_ARGS") or ""
+ def export_ssh_agent(d):
+ import os
+
+ variables = ['SSH_AGENT_PID', 'SSH_AUTH_SOCK']
+ for v in variables:
+ if v not in os.environ.keys():
+ val = d.getVar(v)
+ if val is not None:
+ os.environ[v] = val
+
+ export_ssh_agent(d)
+
# runtime use network for download projects for build
export_proxies(d)
--
2.23.0.rc1
next prev parent reply other threads:[~2019-10-16 9:18 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-16 9:18 [PATCH 0/6] various oeqa fixes André Draszik
2019-10-16 9:18 ` [PATCH 1/6] testimage.bbclass: support hardware-controlled targets André Draszik
2019-10-16 9:18 ` André Draszik [this message]
2019-10-16 9:18 ` [PATCH 3/6] oeqa/runtime/df: don't fail on long device names André Draszik
2019-10-16 9:18 ` [PATCH 4/6] oeqa/core/decorator: add skipIfFeature André Draszik
2019-10-16 9:18 ` [PATCH 5/6] oeqa/runtime/opkg: skip install on read-only-rootfs André Draszik
2019-10-16 9:18 ` [PATCH 6/6] oeqa/runtime/systemd: skip unit enable/disable " André Draszik
2019-10-17 9:28 ` [PATCH v2] " André Draszik
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191016091825.1910-3-git@andred.net \
--to=git@andred.net \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.