From: Alexander Kanavin <alexander.kanavin@linux.intel.com>
To: openembedded-core@lists.openembedded.org
Cc: Costin Constantin <costin.c.constantin@intel.com>
Subject: [PATCH 2/2] oeqa/selftest/kernel.py: Add new file destined for kernel related tests
Date: Wed, 2 Nov 2016 19:05:05 +0200 [thread overview]
Message-ID: <20161102170505.14228-2-alexander.kanavin@linux.intel.com> (raw)
In-Reply-To: <20161102170505.14228-1-alexander.kanavin@linux.intel.com>
From: Costin Constantin <costin.c.constantin@intel.com>
[YP#7202]: Test for linux-dummy
The new kernel.py file is intended for kernel related test cases.
The test for linux-dummy will ensure it is in good shape and can
be used as a kernel replacement at build time. To do this, the
test will first clean sstate for linux-dummy target, ensuring no
file is present in the stamps directory. After, core-image-minimal
is built, ensuring linux-dummy can be used as a kernel substitute.
(From OE-Core rev: 98c6ebf1e05158c689e01b785d32757847cdb10c)
Signed-off-by: Costin Constantin <costin.c.constantin@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
---
meta/lib/oeqa/selftest/kernel.py | 29 +++++++++++++++++++++++++++++
1 file changed, 29 insertions(+)
create mode 100644 meta/lib/oeqa/selftest/kernel.py
diff --git a/meta/lib/oeqa/selftest/kernel.py b/meta/lib/oeqa/selftest/kernel.py
new file mode 100644
index 0000000..3fe3517
--- /dev/null
+++ b/meta/lib/oeqa/selftest/kernel.py
@@ -0,0 +1,29 @@
+import os
+import oeqa.utils.ftools as ftools
+from oeqa.selftest.base import oeSelfTest
+from oeqa.utils.commands import runCmd, bitbake, get_bb_var
+from oeqa.utils.decorators import testcase
+
+class KernelTests(oeSelfTest):
+ def test_dummy_kernel(self):
+ """
+ [YP#7202]
+ - test that linux-dummy target can be used as kernel provider for an image
+ - check no "multiple providers are available for" message is received while building the image
+ """
+ config_param = 'PREFERRED_PROVIDER_virtual/kernel = "linux-dummy"'
+ self.append_config(config_param)
+ arch_dir = get_bb_var('MULTIMACH_TARGET_SYS', target='linux-dummy')
+ stamps_dir = os.path.join(os.getenv('BUILDDIR'), "tmp/stamps")
+ lnx_dmy_stamps_dir = os.path.join(stamps_dir, arch_dir, 'linux-dummy')
+ res = bitbake("linux-dummy -ccleansstate") # ensure we have nothing related to linux-dummy in stamps dir.
+ self.assertFalse(os.listdir(lnx_dmy_stamps_dir), msg='linux-dummy stamps dir. should have been cleaned. Something \
+ happened with bitbake linux-dummy -ccleansstate')
+ res = bitbake("core-image-minimal")# testing linux-dummy is both buildable and usable within an image
+ self.remove_config(config_param)
+ self.assertEqual(res.status, 0, msg="core-image-minimal failed to build. Please check logs. ")
+ self.assertNotIn("multiple providers are available for", res.output, msg="'multiple providers are available for\
+ linux-dummy' message received during buildtime.")
+ self.assertTrue(os.listdir(lnx_dmy_stamps_dir), msg="linux-dummy didn't build correctly. No stamp present in stamps \
+ dir. %s" % lnx_dmy_stamps_dir)
+
--
2.10.1
next prev parent reply other threads:[~2016-11-02 17:07 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-02 17:05 [PATCH 1/2] lttng: enable optional building of manpages Alexander Kanavin
2016-11-02 17:05 ` Alexander Kanavin [this message]
2016-11-02 17:06 ` Alexander Kanavin
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=20161102170505.14228-2-alexander.kanavin@linux.intel.com \
--to=alexander.kanavin@linux.intel.com \
--cc=costin.c.constantin@intel.com \
--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