From: "André Draszik" <git@andred.net>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH 4/6] oeqa/core/decorator: add skipIfFeature
Date: Wed, 16 Oct 2019 10:18:23 +0100 [thread overview]
Message-ID: <20191016091825.1910-5-git@andred.net> (raw)
In-Reply-To: <20191016091825.1910-1-git@andred.net>
skipIfFeature will skip a test if a given DIST_FEATURE
or IMAGE_FEATURE is enabled.
Signed-off-by: André Draszik <git@andred.net>
---
meta/lib/oeqa/core/decorator/data.py | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/meta/lib/oeqa/core/decorator/data.py b/meta/lib/oeqa/core/decorator/data.py
index babc9789d6..12d462f202 100644
--- a/meta/lib/oeqa/core/decorator/data.py
+++ b/meta/lib/oeqa/core/decorator/data.py
@@ -113,3 +113,21 @@ class skipIfNotFeature(OETestDecorator):
self.logger.debug(msg)
if not has_feature(self.case.td, self.value):
self.case.skipTest(self.msg)
+
+@registerDecorator
+class skipIfFeature(OETestDecorator):
+ """
+ Skip test based on DISTRO_FEATURES.
+
+ value must not be in distro features or it will skip the test
+ with msg as the reason.
+ """
+
+ attrs = ('value', 'msg')
+
+ def setUpDecorator(self):
+ msg = ('Checking if %s is not in DISTRO_FEATURES '
+ 'or IMAGE_FEATURES' % (self.value))
+ self.logger.debug(msg)
+ if has_feature(self.case.td, self.value):
+ self.case.skipTest(self.msg)
--
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 ` [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 ` André Draszik [this message]
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-5-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