Openembedded Core Discussions
 help / color / mirror / Atom feed
From: "André Draszik" <git@andred.net>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH 1/6] testimage.bbclass: support hardware-controlled targets
Date: Wed, 16 Oct 2019 10:18:20 +0100	[thread overview]
Message-ID: <20191016091825.1910-2-git@andred.net> (raw)
In-Reply-To: <20191016091825.1910-1-git@andred.net>

From: André Draszik <andre.draszik@jci.com>

Since the introduction of the new runtime framework for target
testing in commit 2aa5a4954d76
("testimage.bbclass: Migrate class to use new runtime framework")
commit 3857e5c91da6 in poky.git, target controllers have no
access to the global datastore 'd' anymore.

This makes it impossible for a specific OEQA (hardware)
controller to access documented properties like
TEST_POWERCONTROL_CMD, TEST_SERIALCONTROL_CMD, etc,
meaning it's impossible for those controllers to actually
control the hardware.

To solve this, simply add those documented variables into
the target_kwargs[].

Signed-off-by: André Draszik <andre.draszik@jci.com>
---
 meta/classes/testimage.bbclass | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/meta/classes/testimage.bbclass b/meta/classes/testimage.bbclass
index 525c5a6173..befda6b72c 100644
--- a/meta/classes/testimage.bbclass
+++ b/meta/classes/testimage.bbclass
@@ -262,6 +262,12 @@ def testimage_main(d):
     # It would be better to find these modules using instrospection.
     target_kwargs['target_modules_path'] = d.getVar('BBPATH')
 
+    # hardware controlled targets might need further access
+    target_kwargs['powercontrol_cmd'] = d.getVar("TEST_POWERCONTROL_CMD") or None
+    target_kwargs['powercontrol_extra_args'] = d.getVar("TEST_POWERCONTROL_EXTRA_ARGS") or ""
+    target_kwargs['serialcontrol_cmd'] = d.getVar("TEST_SERIALCONTROL_CMD") or None
+    target_kwargs['serialcontrol_extra_args'] = d.getVar("TEST_SERIALCONTROL_EXTRA_ARGS") or ""
+
     # runtime use network for download projects for build
     export_proxies(d)
 
-- 
2.23.0.rc1



  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 ` André Draszik [this message]
2019-10-16  9:18 ` [PATCH 2/6] testimage.bbclass: enable ssh agent forwarding André Draszik
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-2-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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox